Bug 1409
Update the snapcraft dockerfile to ensure we use the latest on
each build.
Fixes Bug 1409
Change-Id: I762f46b82c6a6c1924560b4cfda4cfe7a416ccb3
Signed-off-by: beierlm <mark.beierl@canonical.com>
diff --git a/jenkins/ci-pipelines/ci_stage_2.groovy b/jenkins/ci-pipelines/ci_stage_2.groovy
index 049763c..aa9c906 100644
--- a/jenkins/ci-pipelines/ci_stage_2.groovy
+++ b/jenkins/ci-pipelines/ci_stage_2.groovy
@@ -81,9 +81,10 @@
if (fileExists('snap/snapcraft.yaml')) {
stage('Snap build') {
+ sh "docker pull snapcore/snapcraft:stable"
sh "sudo rm -rf ${WORKSPACE}/stage/ ${WORKSPACE}/parts/ ${WORKSPACE}/prime/ ${WORKSPACE}/*.snap"
- sh "docker run -v ${WORKSPACE}:/build --env BRANCH=${BRANCH_NAME} -w /build snapcore/snapcraft:stable /bin/bash -c 'apt update && snapcraft'"
- sh "sudo mv ${WORKSPACE}/${mdg}_*.snap ${WORKSPACE}/${mdg}.snap"
+ sh "snapcraft --use-lxd"
+ sh "mv ${WORKSPACE}/${mdg}_*.snap ${WORKSPACE}/${mdg}.snap"
sh "sudo rm -rf ${WORKSPACE}/stage/ ${WORKSPACE}/parts/ ${WORKSPACE}/prime/"
REV=""
@@ -100,6 +101,7 @@
sh "sudo docker run -v ~/.snapcraft:/snapcraft -v ${WORKSPACE}:/build " +
"-w /build snapcore/snapcraft:stable /bin/bash -c " +
"\"snapcraft login --with /snapcraft/config ; snapcraft push --release=${channel}/edge${REV} ${mdg}.snap\""
+ sh "sudo rm -rf ${WORKSPACE}/*.snap"
}
}
diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy
index 541213b..f482ee7 100644
--- a/jenkins/ci-pipelines/ci_stage_3.groovy
+++ b/jenkins/ci-pipelines/ci_stage_3.groovy
@@ -519,6 +519,7 @@
stage("Snap promotion") {
def snaps = ["osmclient"]
for (snap in snaps) {
+ sh "docker pull snapcore/snapcraft:stable"
channel=""
if (BRANCH_NAME.startsWith("v")) {
channel=BRANCH_NAME.substring(1)+"/"