Browse Source

Pipeline reordering

In order to utilize CI/CD more efficiently, it's better to execute
automatic uplift only on Seaworthy and keep Airsloop job for daily
PatchSet's.

Change-Id: I19983c9b95d78c32c667766eceaca234025fc625
changes/46/673846/2
Alexander Noskov 2 years ago
parent
commit
7f6a63909b
  1. 38
      tools/gate/airsloop/Jenkinsfile
  2. 47
      tools/gate/seaworthy/seed.groovy

38
tools/gate/airsloop/Jenkinsfile

@ -241,40 +241,6 @@ def uplift_versions = {
}
}
def uplift_review = {
withCredentials([sshUserPrivateKey(credentialsId: 'jenkins-uplifter-key',
keyFileVariable: 'SSH_KEY',
usernameVariable: 'SSH_USER')]) {
sh 'sudo apt-get install git-review -y'
sh "cp ${SSH_KEY} ~/.ssh/id_rsa"
sh "ssh-keyscan -p 29418 review.opendev.org >> ~/.ssh/known_hosts"
sh "git clone ssh://${SSH_USER}@review.opendev.org:29418/airship/treasuremap"
sh "scp -p -P 29418 ${SSH_USER}@review.opendev.org:hooks/commit-msg treasuremap/.git/hooks/"
sh "cp global/software/config/versions.yaml treasuremap/global/software/config/versions.yaml"
dir ('treasuremap') {
sh "git config --global user.name 'Jenkins Uplifter'"
sh "git config --global user.email ${SSH_USER}@gmail.com"
sh "git config --global gitreview.username ${SSH_USER}"
sh 'git checkout -b versions/uplift'
sh 'git add global/software/config/versions.yaml'
sh 'git status'
sh 'git commit -m "Auto chart/image uplift to latest"'
sh 'git review -s'
sh 'git review'
}
}
}
//// test utils
def sanity_tests = {
@ -363,9 +329,5 @@ vm(image: 'ubuntu-16.04-server-cloudimg-amd64',
}
sanity_tests()
if (AIRSHIP_MANIFESTS_REF == 'uplift') {
uplift_review()
}
}

47
tools/gate/seaworthy/seed.groovy

@ -28,53 +28,6 @@ pipelineJob('Seaworthy') {
concurrentBuild(false)
triggers {
gerritTrigger {
serverName('OS-CommunityGerrit')
silentMode(true)
gerritProjects {
gerritProject {
compareType('PLAIN')
pattern("airship/treasuremap")
branches {
branch {
compareType("ANT")
pattern("**")
}
}
disableStrictForbiddenFileVerification(false)
filePaths {
filePath {
compareType('ANT')
pattern('global/**')
}
filePath {
compareType('ANT')
pattern('type/foundry/**')
}
filePath {
compareType('ANT')
pattern('site/seaworthy/**')
}
filePath {
compareType('ANT')
pattern('tools/**')
}
}
}
}
triggerOnEvents {
patchsetCreated {
excludeDrafts(false)
excludeTrivialRebase(false)
excludeNoCodeChange(false)
}
commentAddedContains {
commentAddedCommentContains('recheck')
}
}
cron('H H * * *')
}

Loading…
Cancel
Save