Commit f41f445d authored by Ben Cooksley's avatar Ben Cooksley

Change Krita Android jobs as needed.

Ref T13229
parent 0d79cd9e
[
{"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_Android_Build", "pipeline": "krita/Krita_Nightly_Android_Build.pipeline", "cron": "@daily"},
{"name": "Krita_Nightly_Android_arm64-v8a_Build", "pipeline": "krita/Krita_Nightly_Android_arm64-v8a_Build.pipeline", "cron": "@daily"},
{"name": "Krita_Nightly_Windows_Build", "pipeline": "krita/Krita_Nightly_Windows_Build.pipeline", "cron": "@daily"},
{"name": "Krita_Nightly_MacOS_Build", "pipeline": "krita/Krita_Nightly_MacOS_Build.pipeline", "cron": "@daily"},
......@@ -12,13 +12,21 @@
{"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_Nightly_MacOS_Dependency_Build", "pipeline": "krita/Krita_Nightly_MacOS_Dependency_Build.pipeline", "cron": ""},
{"name": "Krita_Nightly_Android_Dependency_Build", "pipeline": "krita/Krita_Nightly_Android_Dependency_Build.pipeline", "cron": ""},
{"name": "Krita_Android_arm64-v8a_Dependency_Build", "pipeline": "krita/Krita_Android_arm64-v8a_Dependency_Build.pipeline", "cron": ""},
{"name": "Krita_Android_armeabi-v7a_Dependency_Build", "pipeline": "krita/Krita_Android_armeabi-v7a_Dependency_Build.pipeline", "cron": ""},
{"name": "Krita_Android_x86_Dependency_Build", "pipeline": "krita/Krita_Android_x86_64_Dependency_Build.pipeline", "cron": ""},
{"name": "Krita_Android_x86_64_Dependency_Build", "pipeline": "krita/Krita_Android_x86_64_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": "Krita_Release_MacOS_Build", "pipeline": "krita/Krita_Release_MacOS_Build.pipeline", "cron": ""},
{"name": "Krita_Release_Android_arm64-v8a_Build", "pipeline": "krita/Krita_Release_Android_arm64-v8a_Build.pipeline", "cron": ""},
{"name": "Krita_Release_Android_armeabi-v7a_Build", "pipeline": "krita/Krita_Release_Android_armeabi-v7a_Build.pipeline", "cron": ""},
{"name": "Krita_Release_Android_x86_Build", "pipeline": "krita/Krita_Release_Android_x86_64_Build.pipeline", "cron": ""},
{"name": "Krita_Release_Android_x86_64_Build", "pipeline": "krita/Krita_Release_Android_x86_64_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": ""},
......
// Request a node to be allocated to us
node( "AndroidSDK" ) {
// 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://invent.kde.org/graphics/krita.git']]
]
}
// Make sure the Android SDK is setup properly
stage('Setting up SDK') {
// For this we need to ensure that the Android 24 or later SDK is installed, otherwise the APK generation will fail
sh """
sdkmanager "platforms;android-28"
sdkmanager "ndk;18.1.5063045"
"""
}
// Now we can build the Dependencies for Krita's build
stage('Building Dependencies') {
// This is relatively straight forward
// For this we do need to unset QT_ANDROID though, to ensure it builds it's own patched version rather than using the normal one we rely on elsewhere
// Then we invoke them!
sh """
unset QT_ANDROID
unset QMAKESPEC
export ANDROID_ABI=armeabi-v7a
export ANDROID_API_LEVEL=28
export CMAKE_ANDROID_NDK=$ANDROID_SDK_ROOT/ndk/18.1.5063045/
krita/packaging/android/androidbuild.sh --src=$WORKSPACE/krita/ --build-type=Release --build-root=$WORKSPACE/build/ -p=boost
krita/packaging/android/androidbuild.sh --src=$WORKSPACE/krita/ --build-type=Release --build-root=$WORKSPACE/build/ -p=qt
krita/packaging/android/androidbuild.sh --src=$WORKSPACE/krita/ --build-type=Release --build-root=$WORKSPACE/build/ -p=3rdparty
krita/packaging/android/androidbuild.sh --src=$WORKSPACE/krita/ --build-type=Release --build-root=$WORKSPACE/build/ -p=kf5
"""
}
// Now we capture them for use
stage('Capturing Dependencies') {
// First we tar all of the dependencies up...
sh """
tar -cf $WORKSPACE/krita-android-deps.tar build/i/ build/kf5/kde/install/
"""
// Then we ask Jenkins to capture the tar file as an artifact
archiveArtifacts artifacts: 'krita-android-deps.tar', onlyIfSuccessful: true
}
}
}
}
// Request a node to be allocated to us
node( "AndroidSDK" ) {
// 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://invent.kde.org/graphics/krita.git']]
]
}
// Make sure the Android SDK is setup properly
stage('Setting up SDK') {
// For this we need to ensure that the Android 24 or later SDK is installed, otherwise the APK generation will fail
sh """
sdkmanager "platforms;android-28"
sdkmanager "ndk;18.1.5063045"
"""
}
// Now we can build the Dependencies for Krita's build
stage('Building Dependencies') {
// This is relatively straight forward
// For this we do need to unset QT_ANDROID though, to ensure it builds it's own patched version rather than using the normal one we rely on elsewhere
// Then we invoke them!
sh """
unset QT_ANDROID
unset QMAKESPEC
export ANDROID_ABI=x86_64
export ANDROID_API_LEVEL=28
export CMAKE_ANDROID_NDK=$ANDROID_SDK_ROOT/ndk/18.1.5063045/
krita/packaging/android/androidbuild.sh --src=$WORKSPACE/krita/ --build-type=Release --build-root=$WORKSPACE/build/ -p=boost
krita/packaging/android/androidbuild.sh --src=$WORKSPACE/krita/ --build-type=Release --build-root=$WORKSPACE/build/ -p=qt
krita/packaging/android/androidbuild.sh --src=$WORKSPACE/krita/ --build-type=Release --build-root=$WORKSPACE/build/ -p=3rdparty
krita/packaging/android/androidbuild.sh --src=$WORKSPACE/krita/ --build-type=Release --build-root=$WORKSPACE/build/ -p=kf5
"""
}
// Now we capture them for use
stage('Capturing Dependencies') {
// First we tar all of the dependencies up...
sh """
tar -cf $WORKSPACE/krita-android-deps.tar build/i/ build/kf5/kde/install/
"""
// Then we ask Jenkins to capture the tar file as an artifact
archiveArtifacts artifacts: 'krita-android-deps.tar', onlyIfSuccessful: true
}
}
}
}
// Request a node to be allocated to us
node( "AndroidSDK" ) {
// 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://invent.kde.org/graphics/krita.git']]
]
}
// Make sure the Android SDK is setup properly
stage('Setting up SDK') {
// For this we need to ensure that the Android 24 or later SDK is installed, otherwise the APK generation will fail
sh """
sdkmanager "platforms;android-28"
sdkmanager "ndk;18.1.5063045"
"""
}
// Now we can build the Dependencies for Krita's build
stage('Building Dependencies') {
// This is relatively straight forward
// For this we do need to unset QT_ANDROID though, to ensure it builds it's own patched version rather than using the normal one we rely on elsewhere
// Then we invoke them!
sh """
unset QT_ANDROID
unset QMAKESPEC
export ANDROID_ABI=x86
export ANDROID_API_LEVEL=28
export CMAKE_ANDROID_NDK=$ANDROID_SDK_ROOT/ndk/18.1.5063045/
krita/packaging/android/androidbuild.sh --src=$WORKSPACE/krita/ --build-type=Release --build-root=$WORKSPACE/build/ -p=boost
krita/packaging/android/androidbuild.sh --src=$WORKSPACE/krita/ --build-type=Release --build-root=$WORKSPACE/build/ -p=qt
krita/packaging/android/androidbuild.sh --src=$WORKSPACE/krita/ --build-type=Release --build-root=$WORKSPACE/build/ -p=3rdparty
krita/packaging/android/androidbuild.sh --src=$WORKSPACE/krita/ --build-type=Release --build-root=$WORKSPACE/build/ -p=kf5
"""
}
// Now we capture them for use
stage('Capturing Dependencies') {
// First we tar all of the dependencies up...
sh """
tar -cf $WORKSPACE/krita-android-deps.tar build/i/ build/kf5/kde/install/
"""
// Then we ask Jenkins to capture the tar file as an artifact
archiveArtifacts artifacts: 'krita-android-deps.tar', onlyIfSuccessful: true
}
}
}
}
// Ask for parameters we will need later on
def buildParameters = input(
message: 'Which version of Krita is being built?',
ok: 'Begin Build',
parameters: [
string(defaultValue: '', description: '', name: 'Version', trim: true)
]
)
// Pull the version we've been given out to a separate variable
// We need to do this otherwise Jenkins will throw it's toys and claim we are violating a security sandbox which will expose our instance to vulnerabilites
// The Jenkins Security Sandbox is IMO broken and faulty in this regard
def buildVersion = buildParameters ?: ''
// Request a node to be allocated to us
node( "AndroidSDK" ) {
// 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()
// Now we download the release tarball, unpack it and rename the directory to something more convenient to use everywhere else
sh """
wget "https://origin.files.kde.org/krita/.release/${buildVersion}/krita-${buildVersion}.tar.gz"
tar -xf "$WORKSPACE/krita-${buildVersion}.tar.gz"
mv krita-${buildVersion} krita
"""
}
// Now retrieve the artifacts
stage('Retrieving Dependencies') {
// First we grab the artifacted dependencies built last time round
copyArtifacts filter: 'krita-android-deps.tar', projectName: 'Krita_Android_arm64-v8a_Dependency_Build'
// Now we unpack them
sh """
tar -xf $WORKSPACE/krita-android-deps.tar
"""
}
// Make sure the Android SDK is setup properly
stage('Setting up SDK') {
// For this we need to ensure that the Android 24 or later SDK is installed, otherwise the APK generation will fail
sh """
sdkmanager "platforms;android-28"
sdkmanager "ndk;18.1.5063045"
"""
}
// Let's build Krita that we have everything we need
stage('Building Krita') {
// 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 """
unset QT_ANDROID
unset QMAKESPEC
export ANDROID_ABI=arm64-v8a
export ANDROID_API_LEVEL=28
export CMAKE_ANDROID_NDK=$ANDROID_SDK_ROOT/ndk/18.1.5063045/
krita/packaging/android/androidbuild.sh --src=$WORKSPACE/krita/ --build-type=Release --build-root=$WORKSPACE/build/ -p=krita-bin
"""
}
// Now we can generate the actual APKs!
stage('Generating Krita APK') {
// The scripts handle everything here, so just run them
sh """
unset QT_ANDROID
unset QMAKESPEC
export ANDROID_ABI=arm64-v8a
export ANDROID_API_LEVEL=28
export CMAKE_ANDROID_NDK=$ANDROID_NDK_ROOT
krita/packaging/android/androidbuild.sh --src=$WORKSPACE/krita/ --build-type=Release --build-root=$WORKSPACE/build/ -p=apk
mv $WORKSPACE/build/krita_build_apk/build/outputs/apk/*/*.apk ./
"""
}
// Finally we capture the APKs for distribution to users
stage('Capturing APKs') {
// We use Jenkins artifacts for this to save having to setup additional infrastructure
archiveArtifacts artifacts: '*.apk', onlyIfSuccessful: true
}
}
}
}
// Ask for parameters we will need later on
def buildParameters = input(
message: 'Which version of Krita is being built?',
ok: 'Begin Build',
parameters: [
string(defaultValue: '', description: '', name: 'Version', trim: true)
]
)
// Pull the version we've been given out to a separate variable
// We need to do this otherwise Jenkins will throw it's toys and claim we are violating a security sandbox which will expose our instance to vulnerabilites
// The Jenkins Security Sandbox is IMO broken and faulty in this regard
def buildVersion = buildParameters ?: ''
// Request a node to be allocated to us
node( "AndroidSDK" ) {
// 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()
// Now we download the release tarball, unpack it and rename the directory to something more convenient to use everywhere else
sh """
wget "https://origin.files.kde.org/krita/.release/${buildVersion}/krita-${buildVersion}.tar.gz"
tar -xf "$WORKSPACE/krita-${buildVersion}.tar.gz"
mv krita-${buildVersion} krita
"""
}
// Now retrieve the artifacts
stage('Retrieving Dependencies') {
// First we grab the artifacted dependencies built last time round
copyArtifacts filter: 'krita-android-deps.tar', projectName: 'Krita_Android_armeabi-v7a_Dependency_Build'
// Now we unpack them
sh """
tar -xf $WORKSPACE/krita-android-deps.tar
"""
}
// Make sure the Android SDK is setup properly
stage('Setting up SDK') {
// For this we need to ensure that the Android 24 or later SDK is installed, otherwise the APK generation will fail
sh """
sdkmanager "platforms;android-28"
sdkmanager "ndk;18.1.5063045"
"""
}
// Let's build Krita that we have everything we need
stage('Building Krita') {
// 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 """
unset QT_ANDROID
unset QMAKESPEC
export ANDROID_ABI=armeabi-v7a
export ANDROID_API_LEVEL=28
export CMAKE_ANDROID_NDK=$ANDROID_SDK_ROOT/ndk/18.1.5063045/
krita/packaging/android/androidbuild.sh --src=$WORKSPACE/krita/ --build-type=Release --build-root=$WORKSPACE/build/ -p=krita-bin
"""
}
// Now we can generate the actual APKs!
stage('Generating Krita APK') {
// The scripts handle everything here, so just run them
sh """
unset QT_ANDROID
unset QMAKESPEC
export ANDROID_ABI=arm64-v8a
export ANDROID_API_LEVEL=28
export CMAKE_ANDROID_NDK=$ANDROID_NDK_ROOT
krita/packaging/android/androidbuild.sh --src=$WORKSPACE/krita/ --build-type=Release --build-root=$WORKSPACE/build/ -p=apk
mv $WORKSPACE/build/krita_build_apk/build/outputs/apk/*/*.apk ./
"""
}
// Finally we capture the APKs for distribution to users
stage('Capturing APKs') {
// We use Jenkins artifacts for this to save having to setup additional infrastructure
archiveArtifacts artifacts: '*.apk', onlyIfSuccessful: true
}
}
}
}
// Ask for parameters we will need later on
def buildParameters = input(
message: 'Which version of Krita is being built?',
ok: 'Begin Build',
parameters: [
string(defaultValue: '', description: '', name: 'Version', trim: true)
]
)
// Pull the version we've been given out to a separate variable
// We need to do this otherwise Jenkins will throw it's toys and claim we are violating a security sandbox which will expose our instance to vulnerabilites
// The Jenkins Security Sandbox is IMO broken and faulty in this regard
def buildVersion = buildParameters ?: ''
// Request a node to be allocated to us
node( "AndroidSDK" ) {
// 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()
// Now we download the release tarball, unpack it and rename the directory to something more convenient to use everywhere else
sh """
wget "https://origin.files.kde.org/krita/.release/${buildVersion}/krita-${buildVersion}.tar.gz"
tar -xf "$WORKSPACE/krita-${buildVersion}.tar.gz"
mv krita-${buildVersion} krita
"""
}
// Now retrieve the artifacts
stage('Retrieving Dependencies') {
// First we grab the artifacted dependencies built last time round
copyArtifacts filter: 'krita-android-deps.tar', projectName: 'Krita_Android_x86_64_Dependency_Build'
// Now we unpack them
sh """
tar -xf $WORKSPACE/krita-android-deps.tar
"""
}
// Make sure the Android SDK is setup properly
stage('Setting up SDK') {
// For this we need to ensure that the Android 24 or later SDK is installed, otherwise the APK generation will fail
sh """
sdkmanager "platforms;android-28"
sdkmanager "ndk;18.1.5063045"
"""
}
// Let's build Krita that we have everything we need
stage('Building Krita') {
// 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 """
unset QT_ANDROID
unset QMAKESPEC
export ANDROID_ABI=x86_64
export ANDROID_API_LEVEL=28
export CMAKE_ANDROID_NDK=$ANDROID_SDK_ROOT/ndk/18.1.5063045/
krita/packaging/android/androidbuild.sh --src=$WORKSPACE/krita/ --build-type=Release --build-root=$WORKSPACE/build/ -p=krita-bin
"""
}
// Now we can generate the actual APKs!
stage('Generating Krita APK') {
// The scripts handle everything here, so just run them
sh """
unset QT_ANDROID
unset QMAKESPEC
export ANDROID_ABI=arm64-v8a
export ANDROID_API_LEVEL=28
export CMAKE_ANDROID_NDK=$ANDROID_NDK_ROOT
krita/packaging/android/androidbuild.sh --src=$WORKSPACE/krita/ --build-type=Release --build-root=$WORKSPACE/build/ -p=apk
mv $WORKSPACE/build/krita_build_apk/build/outputs/apk/*/*.apk ./
"""
}
// Finally we capture the APKs for distribution to users
stage('Capturing APKs') {
// We use Jenkins artifacts for this to save having to setup additional infrastructure
archiveArtifacts artifacts: '*.apk', onlyIfSuccessful: true
}
}
}
}
// Ask for parameters we will need later on
def buildParameters = input(
message: 'Which version of Krita is being built?',
ok: 'Begin Build',
parameters: [
string(defaultValue: '', description: '', name: 'Version', trim: true)
]
)
// Pull the version we've been given out to a separate variable
// We need to do this otherwise Jenkins will throw it's toys and claim we are violating a security sandbox which will expose our instance to vulnerabilites
// The Jenkins Security Sandbox is IMO broken and faulty in this regard
def buildVersion = buildParameters ?: ''
// Request a node to be allocated to us
node( "AndroidSDK" ) {
// 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()
// Now we download the release tarball, unpack it and rename the directory to something more convenient to use everywhere else
sh """
wget "https://origin.files.kde.org/krita/.release/${buildVersion}/krita-${buildVersion}.tar.gz"
tar -xf "$WORKSPACE/krita-${buildVersion}.tar.gz"
mv krita-${buildVersion} krita
"""
}
// Now retrieve the artifacts
stage('Retrieving Dependencies') {
// First we grab the artifacted dependencies built last time round
copyArtifacts filter: 'krita-android-deps.tar', projectName: 'Krita_Android_x86_Dependency_Build'
// Now we unpack them
sh """
tar -xf $WORKSPACE/krita-android-deps.tar
"""
}
// Make sure the Android SDK is setup properly
stage('Setting up SDK') {
// For this we need to ensure that the Android 24 or later SDK is installed, otherwise the APK generation will fail
sh """
sdkmanager "platforms;android-28"
sdkmanager "ndk;18.1.5063045"
"""
}
// Let's build Krita that we have everything we need
stage('Building Krita') {
// 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 """
unset QT_ANDROID
unset QMAKESPEC
export ANDROID_ABI=x86
export ANDROID_API_LEVEL=28
export CMAKE_ANDROID_NDK=$ANDROID_SDK_ROOT/ndk/18.1.5063045/
krita/packaging/android/androidbuild.sh --src=$WORKSPACE/krita/ --build-type=Release --build-root=$WORKSPACE/build/ -p=krita-bin
"""
}
// Now we can generate the actual APKs!
stage('Generating Krita APK') {
// The scripts handle everything here, so just run them
sh """
unset QT_ANDROID
unset QMAKESPEC
export ANDROID_ABI=arm64-v8a
export ANDROID_API_LEVEL=28
export CMAKE_ANDROID_NDK=$ANDROID_NDK_ROOT
krita/packaging/android/androidbuild.sh --src=$WORKSPACE/krita/ --build-type=Release --build-root=$WORKSPACE/build/ -p=apk
mv $WORKSPACE/build/krita_build_apk/build/outputs/apk/*/*.apk ./
"""
}
// Finally we capture the APKs for distribution to users
stage('Capturing APKs') {
// We use Jenkins artifacts for this to save having to setup additional infrastructure
archiveArtifacts artifacts: '*.apk', onlyIfSuccessful: true
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment