Issues a snapcraft clean to make sure there is nothing
left from any prior runs of the build.
Change-Id: I42109d8b4a750c0a4732afcf127cc407e6956ec9
Signed-off-by: beierlm <mark.beierl@canonical.com>
stage('Snap build') {
sh "docker pull snapcore/snapcraft:stable"
sh "sudo rm -rf ${WORKSPACE}/stage/ ${WORKSPACE}/parts/ ${WORKSPACE}/prime/ ${WORKSPACE}/*.snap"
+ sh "sudo snapcraft clean --use-lxd"
sh "snapcraft --use-lxd"
sh "mv ${WORKSPACE}/${mdg}_*.snap ${WORKSPACE}/${mdg}.snap"
sh "sudo rm -rf ${WORKSPACE}/stage/ ${WORKSPACE}/parts/ ${WORKSPACE}/prime/"