Add upload of snap package
parent
ba7511621e
commit
d38fd20f3d
|
@ -64,7 +64,10 @@ pipeline {
|
|||
}
|
||||
}
|
||||
}
|
||||
stage('Build snap package') {
|
||||
stage('Build and upload snap package') {
|
||||
environment {
|
||||
SNAP_LOGIN=credentials('snapcraft_login')
|
||||
}
|
||||
when {
|
||||
anyOf {
|
||||
branch 'dev'
|
||||
|
@ -75,8 +78,19 @@ pipeline {
|
|||
echo 'Building snap package...'
|
||||
sh 'docker build -f ./devops/snapcraft/Dockerfile -t \
|
||||
snapcraft-build .'
|
||||
echo 'Building snap package...'
|
||||
sh 'docker run -v "${PWD}":/build -w /build \
|
||||
snapcraft-build:latest snapcraft'
|
||||
snapcraft-build:latest snapcraft'
|
||||
echo 'Pushing package to snap store'
|
||||
sh('''
|
||||
mkdir -p .snapcraft
|
||||
cat ${SNAP_LOGIN} | base64 --decode --ignore-garbage \
|
||||
> .snapcraft/snapcraft.cfg
|
||||
docker run -v "${PWD}":/build -w /build \
|
||||
snapcraft-build:latest snapcraft \
|
||||
push --release edge *.snap
|
||||
rm -rf .snapcraft
|
||||
''')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue