Changeset View
Changeset View
Standalone View
Standalone View
jobs/templates/debian/gbp-buildpackage.groovy
Show First 20 Lines • Show All 234 Lines • ▼ Show 20 Lines | stage('Upload package') {{ | ||||
sshagent (credentials: ['jenkins-debian-repo-ssh']) {{ | sshagent (credentials: ['jenkins-debian-repo-ssh']) {{ | ||||
sh """ | sh """ | ||||
dcmd rsync -v *.changes ${{repo_user}}@${{repo_host}}:${{upload_target}} | dcmd rsync -v *.changes ${{repo_user}}@${{repo_host}}:${{upload_target}} | ||||
ssh ${{repo_user}}@${{repo_host}} '${{repo_command}}' | ssh ${{repo_user}}@${{repo_host}} '${{repo_command}}' | ||||
""" | """ | ||||
}} | }} | ||||
}} | }} | ||||
}} | }} | ||||
stage('Prepare backport') {{ | |||||
when {{ | |||||
beforeAgent true | |||||
expression {{ changelog_distribution != 'UNRELEASED' }} | |||||
expression {{ params.BACKPORT_ON_SUCCESS }} | |||||
expression {{ jobExists('/debian/packages/{name}/automatic-backport') }} | |||||
}} | |||||
steps {{ | |||||
script {{ | |||||
params.BACKPORT_ON_SUCCESS.split(',').each {{ bpo_pair -> | |||||
def (src_suite, dst_suite) = bpo_pair.split('>') | |||||
if (src_suite == changelog_distribution) {{ | |||||
build( | |||||
job: '/debian/packages/{name}/automatic-backport', | |||||
parameters: [ | |||||
string(name: 'GIT_TAG', value: params.GIT_REVISION), | |||||
string(name: 'SOURCE', value: src_suite), | |||||
string(name: 'DESTINATION', value: dst_suite), | |||||
], | |||||
wait: false, | |||||
) | |||||
}} | |||||
}} | |||||
}} | |||||
}} | |||||
}} | |||||
}} | }} | ||||
post {{ | post {{ | ||||
always {{ | always {{ | ||||
node('swh-tox') {{ | node('swh-tox') {{ | ||||
withCredentials([ | withCredentials([ | ||||
string(credentialsId: 'swh-public-ci', | string(credentialsId: 'swh-public-ci', | ||||
variable: 'PHAB_CONDUIT_TOKEN')]) {{ | variable: 'PHAB_CONDUIT_TOKEN')]) {{ | ||||
withEnv(["JOBSTATUS=${{currentBuild.currentResult}}"]) {{ | withEnv(["JOBSTATUS=${{currentBuild.currentResult}}"]) {{ | ||||
Show All 17 Lines |