3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-22 20:34:38 +01:00

[jenkins] allow packaging module to be triqs_*

Use triqs_PKG if it exists, otherwise PKG
This commit is contained in:
Dylan Simon 2019-04-29 14:51:15 -04:00
parent debb784431
commit 81c1a4aa14

13
Jenkinsfile vendored
View File

@ -113,13 +113,14 @@ try {
/* Update packaging repo submodule */
if (release) { dir("$workDir/packaging") { try {
git(url: "ssh://git@github.com/TRIQS/packaging.git", branch: env.BRANCH_NAME, credentialsId: "ssh", changelog: false)
sh "test -d ${projectName}"
sh "echo '160000 commit ${commit}\t${projectName}' | git update-index --index-info"
sh """
git commit --author='Flatiron Jenkins <jenkins@flatironinstitute.org>' --allow-empty -m 'Autoupdate ${projectName}' -m '${env.BUILD_TAG}'
"""
// note: credentials used above don't work (need JENKINS-28335)
sh "git push origin ${env.BRANCH_NAME} || { git pull --rebase origin ${env.BRANCH_NAME} && git push origin ${env.BRANCH_NAME} ; }"
sh """#!/bin/bash -ex
dir="${projectName}"
[[ -d triqs_\$dir ]] && dir=triqs_\$dir || [[ -d \$dir ]]
echo "160000 commit ${commit}\t\$dir" | git update-index --index-info
git commit --author='Flatiron Jenkins <jenkins@flatironinstitute.org>' --allow-empty -m 'Autoupdate ${projectName}' -m '${env.BUILD_TAG}'
git push origin ${env.BRANCH_NAME} || { git pull --rebase origin ${env.BRANCH_NAME} && git push origin ${env.BRANCH_NAME} ; }
"""
} catch (err) {
/* Ignore, non-critical -- might not exist on this branch */
echo "Failed to update packaging repo"