代码拉取完成,页面将自动刷新
image: registry.cn-hangzhou.aliyuncs.com/choerodon-tools/cibase:0.5.0
stages:
- mvn-package
- maven-deploy
maven-test-branches:
stage: mvn-package
script:
- git_merge master
- mvn clean package source:jar -DskipTests=true
only:
- branches
except:
- master
- tags
- /^release-.*$/
- /^hotfix-.*$/
maven-test-build:
stage: mvn-package
script:
- update_pom_version
- mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install -Dmaven.test.failure.ignore=true -DskipTests=false -U
- mvn --batch-mode verify sonar:sonar -Dsonar.host.url=$SONAR_URL -Dsonar.login=$SONAR_LOGIN -Dsonar.gitlab.project_id=$CI_PROJECT_PATH -Dsonar.gitlab.commit_sha=$CI_COMMIT_SHA -Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME -Dsonar.analysis.serviceGroup=$GROUP_NAME -Dsonar.analysis.commitId=$CI_COMMIT_SHA -Dsonar.projectKey=$GROUP_NAME:$PROJECT_NAME
only:
- master
- tags
- /^release-.*$/
- /^hotfix-.*$/
maven-deploy-choerodon:
stage: maven-deploy
script:
- mvn clean package source:jar -DskipTests=true deploy -DaltDeploymentRepository=${CHOERODON_REPOSITORY_ID}::default::${CHOERODON_REPOSITORY_URL}
only:
- master
- tags
- /^release-.*$/
.auto_devops: &auto_devops |
curl -o .auto_devops.sh \
"${CHOERODON_URL}/devops/ci?token=${Token}&type=lib"
source .auto_devops.sh
function git_merge(){
git config user.name ${GITLAB_USER_NAME}
git config user.email ${GITLAB_USER_EMAIL}
git checkout origin/${1:-"master"}
git merge ${CI_COMMIT_SHA} --no-commit --no-ff
}
before_script:
- *auto_devops
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。