3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-23 04:43:42 +01:00

[jenkins] Build deb packages only for tagged releases

This commit is contained in:
Nils Wentzell 2019-01-28 15:04:03 -05:00
parent 9d1a19b26f
commit 412c0c5b73

5
Jenkinsfile vendored
View File

@ -93,6 +93,7 @@ try {
/* Publish results */ /* Publish results */
stage("publish") { timeout(time: 1, unit: 'HOURS') { stage("publish") { timeout(time: 1, unit: 'HOURS') {
def commit = sh(returnStdout: true, script: "git rev-parse HEAD").trim() def commit = sh(returnStdout: true, script: "git rev-parse HEAD").trim()
def release = sh(returnStdout: true, script: "git describe --exact-match HEAD || true").trim()
def workDir = pwd() def workDir = pwd()
/* Update documention on gh-pages branch */ /* Update documention on gh-pages branch */
dir("$workDir/gh-pages") { dir("$workDir/gh-pages") {
@ -110,7 +111,7 @@ try {
sh "git push origin master || { git pull --rebase origin master && git push origin master ; }" sh "git push origin master || { git pull --rebase origin master && git push origin master ; }"
} }
/* Update docker repo submodule */ /* Update docker repo submodule */
dir("$workDir/docker") { try { if (release) { dir("$workDir/docker") { try {
git(url: "ssh://git@github.com/TRIQS/docker.git", branch: env.BRANCH_NAME, credentialsId: "ssh", changelog: false) git(url: "ssh://git@github.com/TRIQS/docker.git", branch: env.BRANCH_NAME, credentialsId: "ssh", changelog: false)
sh "echo '160000 commit ${commit}\t${projectName}' | git update-index --index-info" sh "echo '160000 commit ${commit}\t${projectName}' | git update-index --index-info"
sh """ sh """
@ -121,7 +122,7 @@ try {
} catch (err) { } catch (err) {
/* Ignore, non-critical -- might not exist on this branch */ /* Ignore, non-critical -- might not exist on this branch */
echo "Failed to update docker repo" echo "Failed to update docker repo"
} } } } }
} } } }
} } } }
} catch (err) { } catch (err) {