diff --git a/kde-common-deps-artifact/Jenkinsfile b/kde-common-deps-artifact/Jenkinsfile index 7c6c146..b93ac8b 100644 --- a/kde-common-deps-artifact/Jenkinsfile +++ b/kde-common-deps-artifact/Jenkinsfile @@ -1,113 +1,114 @@ #!groovy /* The MIT License Copyright (c) 2015-, CloudBees, Inc., and a number of other of contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ pipeline { agent { node { label 'linux' } } environment { WORKSPACE=pwd() + HOME="/var/jenkins_home" PATH="/opt/usr/bin:$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH" JOB_NAME="kde-common-deps-artifact" RBENV_VERSION="2.5.0" } options { disableConcurrentBuilds() timestamps() buildDiscarder(logRotator(numToKeepStr: '3', artifactNumToKeepStr: '3')) } triggers { upstream(upstreamProjects: 'qt5webkit-artifact', threshold: hudson.model.Result.SUCCESS) } stages { stage( 'Checkout' ) { steps { checkout changelog: true, poll: false, scm: [$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, \ extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: '.']], submoduleCfg: [], userRemoteConfigs: [[url: 'https://anongit.kde.org/appimage-packaging']]] checkout changelog: true, poll: false, scm: [$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, \ extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: "$JOB_NAME/appimage-template"]], submoduleCfg: [], userRemoteConfigs: [[url: 'https://gitlab.com/sgclarkkde/appimage-tooling.git']]] copyArtifacts projectName: "qt5webkit-artifact", selector: lastCompleted(), target: "${env.WORKSPACE}/${env.JOB_NAME}", flatten: true } } stage( 'Setup' ) { steps { - sh 'echo "gem: --no-rdoc --no-ri" >> /var/lib/jenkins/.gemrc' + sh 'echo "gem: --no-rdoc --no-ri" >> $HOME/.gemrc' sh ''' - echo "BUNDLE_PATH: ~/vendor/bundle" >> /var/lib/jenkins/.bundle/config - echo 'BUNDLE_DISABLE_SHARED_GEMS: "1"' >> /var/lib/jenkins/.bundle/config + echo "BUNDLE_PATH: ~/vendor/bundle" >> $HOME/.bundle/config + echo 'BUNDLE_DISABLE_SHARED_GEMS: "1"' >> $HOME/.bundle/config ''' sh '''#!/usr/bin/env bash set -e echo $PATH if [[ ! -d ~/.rbenv ]] ; then git clone https://github.com/sstephenson/rbenv.git ~/.rbenv git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build git clone git://github.com/carsomyr/rbenv-bundler.git ~/.rbenv/plugins/bundler rbenv init - rbenv install 2.5.0 rbenv rehash else echo "Rbenv exists, moving on" - if [[ ! -d /var/lib/jenkins/.rbenv/versions/2.5.0 ]] ; then + if [[ ! -d $HOME/.rbenv/versions/2.5.0 ]] ; then rbenv install 2.5.0 rbenv rehash fi fi - echo 'eval "$(rbenv init -)"' >> /var/lib/jenkins/.bashrc && rbenv init - + echo 'eval "$(rbenv init -)"' >> $HOME/.bashrc && rbenv init - ''' sh '''#!/usr/bin/env bash set -e - if [[ ! -d /var/lib/jenkins/.gem ]] ; then - rm -rfv /var/lib/jenkins/.gem + if [[ ! -d $HOME/.gem ]] ; then + rm -rfv $HOME/.gem fi which ruby ruby -v gem install --no-ri --no-rdoc bundler && rbenv rehash ''' } } stage( 'Build' ) { steps { sh 'rbenv init -' sh 'which ruby && ruby -v' sh '''#!/usr/bin/env bash set -e echo $PATH cd $JOB_NAME && chmod +x setup.sh bundle lock --update bundle install bundle show rspec rbenv rehash bundle list --paths bundle env bundle exec ruby deploy.rb ''' } } stage('Tests') { steps { step([$class: 'LogParserPublisher', failBuildOnError: true, projectRulePath: "$JOB_NAME/appimage-template/parser.rules", showGraphs: true, unstableOnWarning: true, useProjectRule: true]) } } } post { always { archiveArtifacts artifacts: "$JOB_NAME/artifacts/*.gz", fingerprint: true } } } diff --git a/kde-kf5-artifact/Jenkinsfile b/kde-kf5-artifact/Jenkinsfile index 5e44a7d..1c8d0d9 100644 --- a/kde-kf5-artifact/Jenkinsfile +++ b/kde-kf5-artifact/Jenkinsfile @@ -1,113 +1,114 @@ #!groovy /* The MIT License Copyright (c) 2015-, CloudBees, Inc., and a number of other of contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ pipeline { agent { node { label 'linux' } } environment { WORKSPACE=pwd() + HOME="/var/jenkins_home" PATH="/opt/usr/bin:$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH" JOB_NAME="kde-kf5-artifact" RBENV_VERSION="2.5.0" } options { disableConcurrentBuilds() timestamps() buildDiscarder(logRotator(numToKeepStr: '3', artifactNumToKeepStr: '3')) } triggers { upstream(upstreamProjects: 'kde-common-deps-artifact', threshold: hudson.model.Result.SUCCESS) } stages { stage( 'Checkout' ) { steps { checkout changelog: true, poll: false, scm: [$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, \ extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: '.']], submoduleCfg: [], userRemoteConfigs: [[url: 'https://anongit.kde.org/appimage-packaging']]] checkout changelog: true, poll: false, scm: [$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, \ extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: "$JOB_NAME/appimage-template"]], submoduleCfg: [], userRemoteConfigs: [[url: 'https://gitlab.com/sgclarkkde/appimage-tooling.git']]] copyArtifacts projectName: "kde-common-deps-artifact", selector: lastCompleted(), target: "${env.WORKSPACE}/${env.JOB_NAME}", flatten: true } } stage( 'Setup' ) { steps { - sh 'echo "gem: --no-rdoc --no-ri" >> /var/lib/jenkins/.gemrc' + sh 'echo "gem: --no-rdoc --no-ri" >> $HOME/.gemrc' sh ''' - echo "BUNDLE_PATH: ~/vendor/bundle" >> /var/lib/jenkins/.bundle/config - echo 'BUNDLE_DISABLE_SHARED_GEMS: "1"' >> /var/lib/jenkins/.bundle/config + echo "BUNDLE_PATH: ~/vendor/bundle" >> $HOME/.bundle/config + echo 'BUNDLE_DISABLE_SHARED_GEMS: "1"' >> $HOME/.bundle/config ''' sh '''#!/usr/bin/env bash set -e echo $PATH if [[ ! -d ~/.rbenv ]] ; then git clone https://github.com/sstephenson/rbenv.git ~/.rbenv git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build git clone git://github.com/carsomyr/rbenv-bundler.git ~/.rbenv/plugins/bundler rbenv init - rbenv install 2.5.0 rbenv rehash else echo "Rbenv exists, moving on" - if [[ ! -d /var/lib/jenkins/.rbenv/versions/2.5.0 ]] ; then + if [[ ! -d $HOME/.rbenv/versions/2.5.0 ]] ; then rbenv install 2.5.0 rbenv rehash fi fi - echo 'eval "$(rbenv init -)"' >> /var/lib/jenkins/.bashrc && rbenv init - + echo 'eval "$(rbenv init -)"' >> $HOME/.bashrc && rbenv init - ''' sh '''#!/usr/bin/env bash set -e - if [[ ! -d /var/lib/jenkins/.gem ]] ; then - rm -rfv /var/lib/jenkins/.gem + if [[ ! -d $HOME/.gem ]] ; then + rm -rfv $HOME/.gem fi which ruby ruby -v gem install --no-ri --no-rdoc bundler && rbenv rehash ''' } } stage( 'Build' ) { steps { sh 'rbenv init -' sh 'which ruby && ruby -v' sh '''#!/usr/bin/env bash set -e echo $PATH cd $JOB_NAME && chmod +x setup.sh bundle lock --update bundle install bundle show rspec rbenv rehash bundle list --paths bundle env bundle exec ruby deploy.rb ''' } } stage('Tests') { steps { step([$class: 'LogParserPublisher', failBuildOnError: true, projectRulePath: "$JOB_NAME/appimage-template/parser.rules", showGraphs: true, unstableOnWarning: true, useProjectRule: true]) } } } post { always { archiveArtifacts artifacts: "$JOB_NAME/artifacts/*.gz", fingerprint: true } } } diff --git a/kde-libs-depend-kf5-artifact/Jenkinsfile b/kde-libs-depend-kf5-artifact/Jenkinsfile index 662cd4b..0b1858f 100644 --- a/kde-libs-depend-kf5-artifact/Jenkinsfile +++ b/kde-libs-depend-kf5-artifact/Jenkinsfile @@ -1,113 +1,114 @@ #!groovy /* The MIT License Copyright (c) 2015-, CloudBees, Inc., and a number of other of contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ pipeline { agent { node { label 'linux' } } environment { WORKSPACE=pwd() + HOME="/var/jenkins_home" PATH="/opt/usr/bin:$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH" JOB_NAME="kde-libs-depend-kf5-artifact" RBENV_VERSION="2.5.0" } options { disableConcurrentBuilds() timestamps() buildDiscarder(logRotator(numToKeepStr: '3', artifactNumToKeepStr: '3')) } triggers { upstream(upstreamProjects: 'kde-kf5-artifact', threshold: hudson.model.Result.SUCCESS) } stages { stage( 'Checkout' ) { steps { checkout changelog: true, poll: false, scm: [$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, \ extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: '.']], submoduleCfg: [], userRemoteConfigs: [[url: 'https://anongit.kde.org/appimage-packaging']]] checkout changelog: true, poll: false, scm: [$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, \ extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: "$JOB_NAME/appimage-template"]], submoduleCfg: [], userRemoteConfigs: [[url: 'https://gitlab.com/sgclarkkde/appimage-tooling.git']]] copyArtifacts projectName: "kde-kf5-artifact", selector: lastCompleted(), target: "${env.WORKSPACE}/${env.JOB_NAME}", flatten: true } } stage( 'Setup' ) { steps { - sh 'echo "gem: --no-rdoc --no-ri" >> /var/lib/jenkins/.gemrc' + sh 'echo "gem: --no-rdoc --no-ri" >> $HOME/.gemrc' sh ''' - echo "BUNDLE_PATH: ~/vendor/bundle" >> /var/lib/jenkins/.bundle/config - echo 'BUNDLE_DISABLE_SHARED_GEMS: "1"' >> /var/lib/jenkins/.bundle/config + echo "BUNDLE_PATH: ~/vendor/bundle" >> $HOME/.bundle/config + echo 'BUNDLE_DISABLE_SHARED_GEMS: "1"' >> $HOME/.bundle/config ''' sh '''#!/usr/bin/env bash set -e echo $PATH if [[ ! -d ~/.rbenv ]] ; then git clone https://github.com/sstephenson/rbenv.git ~/.rbenv git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build git clone git://github.com/carsomyr/rbenv-bundler.git ~/.rbenv/plugins/bundler rbenv init - rbenv install 2.5.0 rbenv rehash else echo "Rbenv exists, moving on" - if [[ ! -d /var/lib/jenkins/.rbenv/versions/2.5.0 ]] ; then + if [[ ! -d $HOME/.rbenv/versions/2.5.0 ]] ; then rbenv install 2.5.0 rbenv rehash fi fi - echo 'eval "$(rbenv init -)"' >> /var/lib/jenkins/.bashrc && rbenv init - + echo 'eval "$(rbenv init -)"' >> $HOME/.bashrc && rbenv init - ''' sh '''#!/usr/bin/env bash set -e - if [[ ! -d /var/lib/jenkins/.gem ]] ; then - rm -rfv /var/lib/jenkins/.gem + if [[ ! -d $HOME/.gem ]] ; then + rm -rfv $HOME/.gem fi which ruby ruby -v gem install --no-ri --no-rdoc bundler && rbenv rehash ''' } } stage( 'Build' ) { steps { sh 'rbenv init -' sh 'which ruby && ruby -v' sh '''#!/usr/bin/env bash set -e echo $PATH cd $JOB_NAME && chmod +x setup.sh bundle lock --update bundle install bundle show rspec rbenv rehash bundle list --paths bundle env bundle exec ruby deploy.rb ''' } } stage('Tests') { steps { step([$class: 'LogParserPublisher', failBuildOnError: true, projectRulePath: "$JOB_NAME/appimage-template/parser.rules", showGraphs: true, unstableOnWarning: true, useProjectRule: true]) } } } post { always { archiveArtifacts artifacts: "$JOB_NAME/artifacts/*.gz", fingerprint: true } } } diff --git a/kontact-appimage/Jenkinsfile b/kontact-appimage/Jenkinsfile index 8b90d87..8540646 100644 --- a/kontact-appimage/Jenkinsfile +++ b/kontact-appimage/Jenkinsfile @@ -1,94 +1,95 @@ #!groovy /* The MIT License Copyright (c) 2015-, CloudBees, Inc., and a number of other of contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ pipeline { agent { node { label 'linux' } } environment { WORKSPACE=pwd() + HOME="/var/jenkins_home" PATH="/opt/usr/bin:$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH" JOB_NAME="kontact-appimage" } options { disableConcurrentBuilds() timestamps() } triggers { pollSCM('H */4 * * 1-5') upstream(upstreamProjects: 'qt5-artifact,kde-common-deps-artifact,kde-kf5-artifact', threshold: hudson.model.Result.SUCCESS) } stages { stage( 'Checkout' ) { steps { checkout changelog: true, poll: false, scm: [$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, \ extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: '.']], submoduleCfg: [], userRemoteConfigs: [[url: 'https://anongit.kde.org/appimage-packaging']]] checkout changelog: true, poll: false, scm: [$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, \ extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: "$JOB_NAME/appimage-template"]], submoduleCfg: [], userRemoteConfigs: [[url: 'https://anongit.kde.org/sysadmin/appimage-tooling']]] copyArtifacts projectName: "kde-kf5-artifact", selector: lastCompleted(), target: "${env.WORKSPACE}/${env.JOB_NAME}", flatten: true sh "pwd && ls -l" } } stage( 'Setup' ) { steps { - sh 'echo "gem: --no-rdoc --no-ri" >> /var/lib/jenkins/.gemrc' + sh 'echo "gem: --no-rdoc --no-ri" >> $HOME/.gemrc' sh '''#!/usr/bin/env bash set -e - export PATH=$PATH:/var/lib/jenkins/.rbenv/bin + export PATH=$PATH:$HOME/.rbenv/bin if [[ ! -d ~/.rbenv ]] ; then git clone https://github.com/sstephenson/rbenv.git ~/.rbenv git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build - if [[ ! -d /var/lib/jenkins/.rbenv/versions/2.4.1 ]] ; then + if [[ ! -d $HOME/.rbenv/versions/2.4.1 ]] ; then rbenv install 2.4.1 fi eval "$(rbenv init -)" rbenv local 2.4.1 && gem install bundler && ls -l && bundle install --binstubs && bundle show rspec else echo "Rbenv exists, moving on" - if [[ ! -d /var/lib/jenkins/.rbenv/versions/2.4.1 ]] ; then + if [[ ! -d $HOME/.rbenv/versions/2.4.1 ]] ; then rbenv install 2.4.1 fi eval "$(rbenv init -)" rbenv local 2.4.1 && gem install bundler && ls -l && bundle install --binstubs && bundle show rspec cd $JOB_NAME && bundle install fi ''' } } stage( 'Build' ) { steps { sh "cd $JOB_NAME" sh '''#!/usr/bin/env bash set -e cd $JOB_NAME - export PATH=$PATH:/var/lib/jenkins/.rbenv/bin + export PATH=$PATH:$HOME/.rbenv/bin eval "$(rbenv init -)" rbenv local 2.4.1 bundle exec deploy.rb ''' } } stage('Tests') { steps { step([$class: 'LogParserPublisher', failBuildOnError: true, projectRulePath: "$JOB_NAME/appimage-template/parser.rules", showGraphs: true, unstableOnWarning: true, useProjectRule: true]) } } } } diff --git a/qt5webkit-artifact/Jenkinsfile b/qt5webkit-artifact/Jenkinsfile index fac722f..47760eb 100644 --- a/qt5webkit-artifact/Jenkinsfile +++ b/qt5webkit-artifact/Jenkinsfile @@ -1,113 +1,114 @@ #!groovy /* The MIT License Copyright (c) 2015-, CloudBees, Inc., and a number of other of contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ pipeline { agent { node { label 'linux' } } environment { WORKSPACE=pwd() + HOME="/var/jenkins_home" PATH="/opt/usr/bin:$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH" JOB_NAME="qt5webkit-artifact" RBENV_VERSION="2.5.0" } options { disableConcurrentBuilds() timestamps() buildDiscarder(logRotator(numToKeepStr: '3', artifactNumToKeepStr: '3')) } triggers { upstream(upstreamProjects: 'qt5-artifact', threshold: hudson.model.Result.SUCCESS) } stages { stage( 'Checkout' ) { steps { checkout changelog: true, poll: false, scm: [$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, \ extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: '.']], submoduleCfg: [], userRemoteConfigs: [[url: 'https://anongit.kde.org/appimage-packaging']]] checkout changelog: true, poll: false, scm: [$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, \ extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: "$JOB_NAME/appimage-template"]], submoduleCfg: [], userRemoteConfigs: [[url: 'https://gitlab.com/sgclarkkde/appimage-tooling.git']]] copyArtifacts projectName: "qt5-artifact", selector: lastCompleted(), target: "${env.WORKSPACE}/${env.JOB_NAME}", flatten: true } } stage( 'Setup' ) { steps { - sh 'echo "gem: --no-rdoc --no-ri" >> /var/lib/jenkins/.gemrc' + sh 'echo "gem: --no-rdoc --no-ri" >> $HOME/.gemrc' sh ''' - echo "BUNDLE_PATH: ~/vendor/bundle" >> /var/lib/jenkins/.bundle/config - echo 'BUNDLE_DISABLE_SHARED_GEMS: "1"' >> /var/lib/jenkins/.bundle/config + echo "BUNDLE_PATH: ~/vendor/bundle" >> $HOME/.bundle/config + echo 'BUNDLE_DISABLE_SHARED_GEMS: "1"' >> $HOME/.bundle/config ''' sh '''#!/usr/bin/env bash set -e echo $PATH if [[ ! -d ~/.rbenv ]] ; then git clone https://github.com/sstephenson/rbenv.git ~/.rbenv git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build git clone git://github.com/carsomyr/rbenv-bundler.git ~/.rbenv/plugins/bundler rbenv init - rbenv install 2.5.0 rbenv rehash else echo "Rbenv exists, moving on" - if [[ ! -d /var/lib/jenkins/.rbenv/versions/2.5.0 ]] ; then + if [[ ! -d $HOME/.rbenv/versions/2.5.0 ]] ; then rbenv install 2.5.0 rbenv rehash fi fi - echo 'eval "$(rbenv init -)"' >> /var/lib/jenkins/.bashrc && rbenv init - + echo 'eval "$(rbenv init -)"' >> $HOME/.bashrc && rbenv init - ''' sh '''#!/usr/bin/env bash set -e - if [[ ! -d /var/lib/jenkins/.gem ]] ; then - rm -rfv /var/lib/jenkins/.gem + if [[ ! -d $HOME/.gem ]] ; then + rm -rfv $HOME/.gem fi which ruby ruby -v gem install --no-ri --no-rdoc bundler && rbenv rehash ''' } } stage( 'Build' ) { steps { sh 'rbenv init -' sh 'which ruby && ruby -v' sh '''#!/usr/bin/env bash set -e echo $PATH cd $JOB_NAME && chmod +x setup.sh bundle lock --update bundle install bundle show rspec rbenv rehash bundle list --paths bundle env bundle exec ruby deploy.rb ''' } } stage('Tests') { steps { step([$class: 'LogParserPublisher', failBuildOnError: true, projectRulePath: "$JOB_NAME/appimage-template/parser.rules", showGraphs: true, unstableOnWarning: true, useProjectRule: true]) } } } post { always { archiveArtifacts artifacts: "$JOB_NAME/artifacts/*.gz", fingerprint: true } } }