Warning, /packaging/snap-kf5/Jenkinsfile is written in an unsupported language. File is not indexed.
0001 env.DIST = 'xenial' 0002 env.TYPE = 'user' 0003 0004 cleanNode('master') { 0005 stage 'generate' 0006 git 'https://github.com/apachelogger/kf5-snap' 0007 sh '~/tooling/nci/contain.rb rake generate' 0008 sh "echo '----snapcraft----'; cat snapcraft.yaml; echo '----snapcraft----'" 0009 copyArtifacts projectName: env.JOB_NAME, filter: 'content.json, versions.json', optional: true 0010 // This should really be pushed into git, alas, somewhat tricky because github 0011 // and pipeline git plugin can't push on its own. 0012 archiveArtifacts 'snapcraft.yaml, content.json, versions.json' 0013 stash includes: 'Rakefile, snapcraft.yaml, extend_content.rb, stage-*.json, assets/*', name: 'snapcraft' 0014 } 0015 0016 cleanNode('cloud && amd64') { 0017 stage ('snapcraft') 0018 unstash 'snapcraft' 0019 try { 0020 sh '~/tooling/nci/contain.rb rake snapcraft' 0021 } finally { 0022 // Fix permissions, for some reason breeze' source is chowned to 1000. 0023 // That isn't even a legit user though. 0024 sh '~/tooling/nci/contain.rb chown -R root .' 0025 } 0026 sh 'ls -lah' 0027 archiveArtifacts 'stage-*.json, kde-frameworks-5_*_amd64.snap' 0028 stash name: 'snaps', includes: 'Rakefile, *_amd64.snap, kde-frameworks-5-dev_amd64.tar.xz*' 0029 } 0030 0031 cleanNode('master') { 0032 stage 'snapcraft push' 0033 unstash 'snaps' 0034 sh 'gpg2 --armor --detach-sign -o kde-frameworks-5-dev_amd64.tar.xz.sig kde-frameworks-5-dev_amd64.tar.xz' 0035 archiveArtifacts 'kde-frameworks-5-dev_amd64.tar.xz*' 0036 sh 'tree || ls -lahR' 0037 // Temporary workspace during pipeline execution can't be accessed via UI, so 0038 // this should be save. 0039 // Even so we should move to a contain.rb which forward mounts the snapcraft 0040 // dir as volume into the container. 0041 sh 'cp ~/.config/snapcraft/snapcraft.cfg snapcraft.cfg' 0042 sh '~/tooling/nci/contain.rb rake publish' 0043 } 0044 0045 def cleanNode(label = null, body) { 0046 node(label) { 0047 deleteDir() 0048 try { 0049 wrap([$class: 'AnsiColorBuildWrapper', colorMapName: 'xterm']) { 0050 wrap([$class: 'TimestamperBuildWrapper']) { 0051 body() 0052 } 0053 } 0054 } finally { 0055 step([$class: 'WsCleanup', cleanWhenFailure: true]) 0056 } 0057 } 0058 }