👷 delete jihulab

This commit is contained in:
徐晓伟 2023-12-04 11:44:45 +08:00
parent 97e1c5cca4
commit c6307a613d
1 changed files with 0 additions and 32 deletions

View File

@ -191,35 +191,3 @@ sync-github:
retry: 2
# 允许失败
allow_failure: true
sync-jihulab:
stage: sync
variables:
GIT_DEPTH: 0 # 取消浅层克隆
image: bitnami/git:2.40.1
script:
- git config --global user.email $GITLAB_USER_EMAIL
- git config --global user.name $GITLAB_USER_NAME
- git config --global user.email
- git config --global user.name
- git remote add jihulab https://xuxiaowei-com-cn:$JIHULAB_PRIVATE_TOKEN@jihulab.com/$CI_PROJECT_PATH.git
- echo 当前分支:$CI_COMMIT_BRANCH
- echo 当前标签:$CI_COMMIT_TAG
- if [ "$CI_COMMIT_BRANCH" ]; then
git checkout -b $CI_COMMIT_BRANCH;
git pull --progress -v --no-rebase jihulab $CI_COMMIT_BRANCH || echo 远端不存在$CI_COMMIT_BRANCH分支;
git push -u jihulab $CI_COMMIT_BRANCH;
fi
- if [ "$CI_COMMIT_TAG" ]; then
git push -u jihulab $CI_COMMIT_TAG;
fi
rules:
# 匹配以 dependabot 开头的分支
- if: $CI_SERVER_HOST == 'gitlab.helm.xuxiaowei.cn' && $CI_COMMIT_BRANCH =~ /^dependabot*/
# 不执行
when: never
# 非 PR 时触发
- if: $CI_SERVER_HOST == 'gitlab.helm.xuxiaowei.cn' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == null
retry: 2
# 允许失败
allow_failure: true