diff --git a/custom-jobs/current-jobs.json b/custom-jobs/current-jobs.json index 7512dec..f96b4de 100644 --- a/custom-jobs/current-jobs.json +++ b/custom-jobs/current-jobs.json @@ -1,17 +1,20 @@ [ {"name": "Krita_Utilities_Setup", "pipeline": "krita/Krita_Utilities_Setup.pipeline", "cron": ""}, {"name": "Krita_Nightly_Appimage_Build", "pipeline": "krita/Krita_Nightly_Appimage_Build.pipeline", "cron": "@daily"}, {"name": "Krita_Nightly_Windows_Build", "pipeline": "krita/Krita_Nightly_Windows_Build.pipeline", "cron": "@daily"}, {"name": "Krita_Stable_Appimage_Build", "pipeline": "krita/Krita_Stable_Appimage_Build.pipeline", "cron": "@daily"}, {"name": "Krita_Stable_Windows_Build", "pipeline": "krita/Krita_Stable_Windows_Build.pipeline", "cron": "@daily"}, {"name": "Krita_Nightly_Windows_Dependency_Build", "pipeline": "krita/Krita_Nightly_Windows_Dependency_Build.pipeline", "cron": ""}, {"name": "Krita_Nightly_Appimage_Dependency_Build", "pipeline": "krita/Krita_Nightly_Appimage_Dependency_Build.pipeline", "cron": ""}, {"name": "Krita_Release_Appimage_Build", "pipeline": "krita/Krita_Release_Appimage_Build.pipeline", "cron": ""}, {"name": "Krita_Release_Windows64_Build", "pipeline": "krita/Krita_Release_Windows64_Build.pipeline", "cron": ""}, {"name": "Krita_Release_Windows32_Build", "pipeline": "krita/Krita_Release_Windows32_Build.pipeline", "cron": ""}, {"name": "Krita_Release_Windows32_Dependency_Build", "pipeline": "krita/Krita_Release_Windows32_Dependency_Build.pipeline", "cron": ""}, {"name": "KMyMoney_Nightly_Appimage_Build", "pipeline": "kmymoney/KMyMoney_Nightly_Appimage_Build.pipeline", "cron": "@daily"}, {"name": "KMyMoney_Nightly_Appimage_Dependency_Build", "pipeline": "kmymoney/KMyMoney_Nightly_Appimage_Dependency_Build.pipeline", "cron": ""}, - {"name": "KMyMoney_Release_Appimage_Build", "pipeline": "kmymoney/KMyMoney_Release_Appimage_Build.pipeline", "cron": ""} + {"name": "KMyMoney_Release_Appimage_Build", "pipeline": "kmymoney/KMyMoney_Release_Appimage_Build.pipeline", "cron": ""}, + + {"name": "Kdenlive_Nightly_Appimage_Build", "pipeline": "kdenlive/Kdenlive_Nightly_Appimage_Build.pipeline", "cron": "@daily"}, + {"name": "Kdenlive_Nightly_Appimage_Dependency_Build", "pipeline": "kdenlive/Kdenlive_Nightly_Appimage_Dependency_Build.pipeline", "cron": "@daily"} ] diff --git a/custom-jobs/kdenlive/Kdenlive_Nightly_Appimage_Build.pipeline b/custom-jobs/kdenlive/Kdenlive_Nightly_Appimage_Build.pipeline new file mode 100644 index 0000000..a5e8b57 --- /dev/null +++ b/custom-jobs/kdenlive/Kdenlive_Nightly_Appimage_Build.pipeline @@ -0,0 +1,65 @@ +// Request a node to be allocated to us +node( "Appimage" ) { +// 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() + + // Kdenlive Code + checkout changelog: true, poll: true, scm: [ + $class: 'GitSCM', + branches: [[name: 'master']], + extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'kdenlive/']], + userRemoteConfigs: [[url: 'https://anongit.kde.org/kdenlive']] + ] + + } + + // Now retrieve the artifacts + stage('Retrieving Dependencies') { + // First we grab the artifacted dependencies built last time round + copyArtifacts filter: 'kdenlive-appimage-deps.tar', projectName: 'Kdenlive_Nightly_Appimage_Dependency_Build' + + // Now we unpack them + sh """ + mkdir -p $HOME/appimage-workspace/ + cd $HOME/appimage-workspace/ + tar -xf $WORKSPACE/kdenlive-appimage-deps.tar + """ + } + + // Let's build Kdenlive now that we have everything we need + stage('Building Kdenlive') { + // The first parameter to the script is where the scripts should work - which is our workspace in this case + // Otherwise we leave everything in the hands of that script + sh """ + export PATH=$HOME/tools/bin/:$PATH + + kdenlive/packaging/linux/appimage/build-kdenlive.sh $HOME/appimage-workspace/ $WORKSPACE/kdenlive/ + """ + } + + // Now we can generate the actual Appimages! + stage('Generating Kdenlive Appimage') { + // The scripts handle everything here, so just run them + sh """ + export PATH=$HOME/tools/bin/:$PATH + + kdenlive/packaging/linux/appimage/build-image.sh $HOME/appimage-workspace/ $WORKSPACE/kdenlive/ + mv $HOME/appimage-workspace/*.appimage $WORKSPACE/ + """ + } + + // Finally we capture the appimages for distribution to users + stage('Capturing Appimages') { + // We use Jenkins artifacts for this to save having to setup additional infrastructure + archiveArtifacts artifacts: '*.appimage', onlyIfSuccessful: true + } + } +} +} diff --git a/custom-jobs/kdenlive/Kdenlive_Nightly_Appimage_Dependency_Build.pipeline b/custom-jobs/kdenlive/Kdenlive_Nightly_Appimage_Dependency_Build.pipeline new file mode 100644 index 0000000..291aff6 --- /dev/null +++ b/custom-jobs/kdenlive/Kdenlive_Nightly_Appimage_Dependency_Build.pipeline @@ -0,0 +1,48 @@ +// Request a node to be allocated to us +node( "Appimage" ) { +// 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() + + // Kdenlive Code + checkout changelog: true, poll: true, scm: [ + $class: 'GitSCM', + branches: [[name: 'master']], + extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'kdenlive/']], + userRemoteConfigs: [[url: 'https://anongit.kde.org/kdenlive']] + ] + + } + + // Now we can build the Dependencies for Kdenlive's build + stage('Building Dependencies') { + // This is relatively straight forward + // We use some environment variables to tell the Kdenlive scripts where we want them to put things + // Then we invoke them! + sh """ + export PATH=$HOME/tools/bin/:$PATH + + kdenlive/packaging/linux/appimage/build-deps.sh $HOME/appimage-workspace/ $WORKSPACE/kdenlive/ + """ + } + + // Now we capture them for use + stage('Capturing Dependencies') { + // First we tar all of the dependencies up... + sh """ + cd $HOME/appimage-workspace/ + tar -cf $WORKSPACE/kdenlive-appimage-deps.tar deps/ + """ + + // Then we ask Jenkins to capture the tar file as an artifact + archiveArtifacts artifacts: 'kdenlive-appimage-deps.tar', onlyIfSuccessful: true + } + } +} +}