代码拉取完成,页面将自动刷新
同步操作将从 openEuler/community 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
def giteeCommentHeader = "| Check Name | Build Result | Build Details |\n| --- | --- | --- |\n"
pipeline {
agent { node { label 'docker_enabled' } }
environment {
GITEE_TOKEN = credentials('new_gitee_token_id')
}
stages {
stage('source code clone') {
steps {
checkout([$class: 'GitSCM',
branches: [[name: "FETCH_HEAD"]],
doGenerateSubmoduleConfigurations: false,
extensions: [[$class: 'LocalBranch'], [$class: 'RelativeTargetDirectory', relativeTargetDir: "community"]],
userRemoteConfigs: [[refspec: "+refs/pull/${env.giteePullRequestIid}/MERGE:refs/pull/${env.giteePullRequestIid}/MERGE",
url: "https://${env.GITEE_TOKEN}@gitee.com/openeuler/community"]]
])
}
}
stage('validate user and projects'){
parallel {
stage('validate gitee user') {
steps {
sh "validator owner check -f OWNERS -d ${WORKSPACE}/community/sig -g ${GITEE_TOKEN}"
}
}
stage('validate gitee project') {
steps {
sh '''#!/bin/bash
cd ${WORKSPACE}/community
git fetch origin master:master
export OPENEULER_IGNORE=$(git diff origin/master... -- repository/openeuler.yaml | grep '^+- name:' | sed 's/+- name://g' | tr -d '[:blank:]' | awk '{printf "openeuler/%s,", $0}')
export SRC_OPENEULER_IGNORE=$(git diff origin/master... -- repository/src-openeuler.yaml | grep '^+- name:' | sed 's/+- name://g' | tr -d '[:blank:]' | awk '{printf "src-openeuler/%s,", $0}')
echo "${OPENEULER_IGNORE}${SRC_OPENEULER_IGNORE}"
validator sig checkrepo -f ${WORKSPACE}/community/sig/sigs.yaml -g ${GITEE_TOKEN} -i " ${OPENEULER_IGNORE}${SRC_OPENEULER_IGNORE}"
'''
}
}
}
}
}
post {
success {
script {
comments = giteeCommentHeader + "| User&Project Validation | **success** :white_check_mark: | [#${currentBuild.fullDisplayName}](${env.BUILD_URL}/console) | \n"
}
addGiteeMRComment comment: comments
echo 'succeeeded!'
}
failure {
script {
comments = giteeCommentHeader + "| User&Project Validation | **failed** :x: | [#${currentBuild.fullDisplayName}](${env.BUILD_URL}/console) | \n"
}
addGiteeMRComment comment: comments
echo 'failed :('
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。