forked from rook/rook
The version suffix such as alpha.0, beta.0, or rc.0 only apply when running the tag pipeline or the release build. Otherwise, we don't want to use the suffix from the master build. Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
35 lines
1.2 KiB
Plaintext
35 lines
1.2 KiB
Plaintext
// Rook build for Jenkins Pipelines
|
|
|
|
pipeline {
|
|
agent { label 'ec2-stateful' }
|
|
|
|
options {
|
|
disableConcurrentBuilds()
|
|
timestamps()
|
|
}
|
|
|
|
parameters {
|
|
string(name: 'version', defaultValue: '', description: 'The version you are releasing, for example, v1.1.0 or v1.1.0-alpha.0 or v1.1.0-beta.0 or v1.1.0-rc.0')
|
|
string(name: 'commit', defaultValue: '', description: 'Optional commit hash for this release, for example, 56b65dba917e50132b0a540ae6ff4c5bbfda2db6. If empty the latest commit hash will be used.')
|
|
}
|
|
|
|
stages {
|
|
stage('Tag Release') {
|
|
environment {
|
|
GITHUB = credentials('rook-github')
|
|
}
|
|
steps {
|
|
// github credentials are not setup to push over https in jenkins. add the github token to the url
|
|
sh "git config remote.origin.url https://${GITHUB_USR}:${GITHUB_PSW}@\$(git config --get remote.origin.url | sed -e 's/https:\\/\\///')"
|
|
sh "make -j\$(nproc) -C build/release tag VERSION=${params.version} COMMIT_HASH=${params.commit} TAG_WITH_SUFFIX=true"
|
|
}
|
|
}
|
|
}
|
|
|
|
post {
|
|
always {
|
|
deleteDir()
|
|
}
|
|
}
|
|
}
|