diff --git a/custom-jobs/krita/Krita_Nightly_MacOS_Build.pipeline b/custom-jobs/krita/Krita_Nightly_MacOS_Build.pipeline index 50d8dc0..f72bbfd 100644 --- a/custom-jobs/krita/Krita_Nightly_MacOS_Build.pipeline +++ b/custom-jobs/krita/Krita_Nightly_MacOS_Build.pipeline @@ -1,70 +1,72 @@ // Request a node to be allocated to us node( "macOS" ) { // We want Timestamps on everything timestamps { // We want to catch any errors that occur to allow us to send out notifications (ie. emails) if needed catchError { // First Thing: Checkout Sources stage('Checkout Sources') { // Make sure we have a clean slate to begin with deleteDir() // Krita Code checkout changelog: true, poll: true, scm: [ $class: 'GitSCM', branches: [[name: 'master']], extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'krita/']], userRemoteConfigs: [[url: 'https://anongit.kde.org/krita']] ] } // Now retrieve the artifacts stage('Retrieving Dependencies') { // First we grab the artifacted dependencies built last time round copyArtifacts filter: 'krita-macos-deps.tar', projectName: 'Krita_Nightly_MacOS_Dependency_Build' // Now we unpack them // We also make sure our build workspace is ready at the same time sh """ export BUILDROOT=\$HOME/KritaBuild/ [[ -d \$BUILDROOT ]] || mkdir \$BUILDROOT [[ -s \$BUILDROOT/krita ]] || ln -s \$WORKSPACE/krita \$BUILDROOT/krita cd \$BUILDROOT tar -xf $WORKSPACE/krita-macos-deps.tar """ } // Let's build Krita now that we have everything we need stage('Building Krita') { // The first parameter to the script is what it should be doing - which is building and installing Krita // The workspace it uses was setup in the previous step sh """ + export PATH=\$HOME/Craft/Krita/macos-64-clang/bin/:\$HOME/Craft/Krita/macos-64-clang/dev-utils/bin/:\$PATH export BUILDROOT=\$HOME/KritaBuild/ bash krita/packaging/macos/osxbuild.sh buildinstall """ } // Now we can generate the actual DMG! stage('Generating Krita DMG') { // The scripts handle everything here, so just run them sh """ + export PATH=\$HOME/Craft/Krita/macos-64-clang/bin/:\$HOME/Craft/Krita/macos-64-clang/dev-utils/bin/:\$PATH export BUILDROOT=\$HOME/KritaBuild/ bash krita/packaging/macos/osxdeploy.sh mv \$BUILDROOT/*.dmg \$WORKSPACE/ """ } // Finally we capture the DMG for distribution to users stage('Capturing DMGs') { // We use Jenkins artifacts for this to save having to setup additional infrastructure archiveArtifacts artifacts: '*.dmg', onlyIfSuccessful: true } } } } diff --git a/custom-jobs/krita/Krita_Nightly_MacOS_Dependency_Build.pipeline b/custom-jobs/krita/Krita_Nightly_MacOS_Dependency_Build.pipeline index 572bbce..810801a 100644 --- a/custom-jobs/krita/Krita_Nightly_MacOS_Dependency_Build.pipeline +++ b/custom-jobs/krita/Krita_Nightly_MacOS_Dependency_Build.pipeline @@ -1,58 +1,59 @@ // Request a node to be allocated to us node( "macOS" ) { // We want Timestamps on everything timestamps { // We want to catch any errors that occur to allow us to send out notifications (ie. emails) if needed catchError { // First Thing: Checkout Sources stage('Checkout Sources') { // Make sure we have a clean slate to begin with deleteDir() // Krita Code checkout changelog: true, poll: true, scm: [ $class: 'GitSCM', branches: [[name: 'master']], extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'krita/']], userRemoteConfigs: [[url: 'https://anongit.kde.org/krita']] ] } // Now we can build the Dependencies for Krita's build stage('Building Dependencies') { // This is relatively straight forward // We use some environment variables to tell the Krita scripts where we want them to put things // Then we invoke them! sh """ + export PATH=\$HOME/Craft/Krita/macos-64-clang/bin/:\$HOME/Craft/Krita/macos-64-clang/dev-utils/bin/:\$PATH export BUILDROOT=\$HOME/KritaBuild/ [[ -d \$BUILDROOT ]] || mkdir \$BUILDROOT [[ -s \$BUILDROOT/krita ]] || ln -s \$WORKSPACE/krita \$BUILDROOT/krita bash krita/packaging/macos/osxbuild.sh builddeps cd \$BUILDROOT/depbuild/ext_qt/ext_qt-prefix/src/ext_qt/qttools/src make sub-macdeployqt-all make sub-macdeployqt-install_subtargets make install """ } // Now we capture them for use stage('Capturing Dependencies') { // First we tar all of the dependencies up... sh """ cd \$HOME/KritaBuild/ tar -cf \$WORKSPACE/krita-macos-deps.tar i/ rm -rf \$HOME/KritaBuild/ """ // Then we ask Jenkins to capture the tar file as an artifact archiveArtifacts artifacts: 'krita-macos-deps.tar', onlyIfSuccessful: true } } } }