-
Notifications
You must be signed in to change notification settings - Fork 681
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3002 from Catrobat/release-0.9.42
Release-0.9.42
- Loading branch information
Showing
868 changed files
with
20,952 additions
and
24,268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!groovy | ||
pipeline { | ||
agent { | ||
node { | ||
label 'HardwareSensorBox' | ||
} | ||
} | ||
|
||
environment { | ||
//////////// Most likely not edited by the developer | ||
ANDROID_SDK_ROOT = "${ANDROID_SDK_LOCATION}" | ||
// Deprecated: Still used by the used gradle version, once gradle respects ANDROID_SDK_ROOT, this can be removed | ||
ANDROID_HOME = "${ANDROID_SDK_LOCATION}" | ||
ANDROID_SDK_LOCATION = "${ANDROID_SDK_LOCATION}" | ||
// get stdout of called subprocesses immediately | ||
PYTHONUNBUFFERED = "true" | ||
} | ||
|
||
options { | ||
timeout(time: 2, unit: 'HOURS') | ||
timestamps() | ||
} | ||
|
||
stages { | ||
stage('Setup Android SDK') { | ||
steps { | ||
// Install Android SDK | ||
lock("update-android-sdk-on-${env.NODE_NAME}") { | ||
sh "./buildScripts/build_step_install_android_sdk" | ||
} | ||
} | ||
} | ||
|
||
stage('Unit and Device tests') { | ||
steps { | ||
lock("run-sensorbox-tests-on-${env.NODE_NAME}") { | ||
sh './gradlew -Pandroid.testInstrumentationRunnerArguments.class=org.catrobat.catroid.uiespresso.testsuites.SensorboxTestSuite connectedCatroidDebugAndroidTest' | ||
} | ||
} | ||
|
||
post { | ||
always { | ||
junit '**/*TEST*.xml' | ||
} | ||
} | ||
} | ||
} | ||
|
||
post { | ||
always { | ||
step([$class: 'LogParserPublisher', failBuildOnError: true, projectRulePath: 'buildScripts/log_parser_rules', unstableOnWarning: true, useProjectRule: true]) | ||
|
||
script { | ||
sendNotifications false | ||
} | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
#!groovy | ||
|
||
pipeline { | ||
agent { | ||
dockerfile { | ||
filename 'Dockerfile.jenkins' | ||
// 'docker build' would normally copy the whole build-dir to the container, changing the | ||
// docker build directory avoids that overhead | ||
dir 'docker' | ||
// Pass the uid and the gid of the current user (jenkins-user) to the Dockerfile, so a | ||
// corresponding user can be added. This is needed to provide the jenkins user inside | ||
// the container for the ssh-agent to work. | ||
// Another way would be to simply map the passwd file, but would spoil additional information | ||
additionalBuildArgs '--build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g)' | ||
args "--device /dev/kvm:/dev/kvm -v /var/local/container_shared/gradle/:/.gradle -v /var/local/container_shared/android-sdk:/usr/local/android-sdk -v /var/local/container_shared/android-home:/.android -v /var/local/container_shared/emulator_console_auth_token:/.emulator_console_auth_token -v /var/local/container_shared/analytics.settings:/analytics.settings" | ||
} | ||
} | ||
|
||
environment { | ||
//////// Define environment variables to point to the correct locations inside the container //////// | ||
//////////// Most likely not edited by the developer | ||
ANDROID_SDK_ROOT = "/usr/local/android-sdk" | ||
// Deprecated: Still used by the used gradle version, once gradle respects ANDROID_SDK_ROOT, this can be removed | ||
ANDROID_HOME = "/usr/local/android-sdk" | ||
ANDROID_SDK_HOME = "/" | ||
// Needed for compatibiliby to current Jenkins-wide Envs. Can be removed, once all builds are migrated to Pipeline | ||
ANDROID_SDK_LOCATION = "/usr/local/android-sdk" | ||
ANDROID_NDK = "" | ||
// This is important, as we want the keep our gradle cache, but we can't share it between containers | ||
// the cache could only be shared if the gradle instances could comunicate with each other | ||
// imho keeping the cache per executor will have the least space impact | ||
GRADLE_USER_HOME = "/.gradle/${env.EXECUTOR_NUMBER}" | ||
// Otherwise user.home returns ? for java applications | ||
JAVA_TOOL_OPTIONS = "-Duser.home=/tmp/" | ||
|
||
//// jenkins-android-helper related variables | ||
// set to any value to debug jenkins_android* scripts | ||
ANDROID_EMULATOR_HELPER_DEBUG = "" | ||
// get stdout of called subprocesses immediately | ||
PYTHONUNBUFFERED = "true" | ||
|
||
//////// Build specific variables //////// | ||
//////////// May be edited by the developer on changing the build steps | ||
} | ||
|
||
options { | ||
timeout(time: 6, unit: 'HOURS') | ||
timestamps() | ||
} | ||
|
||
stages { | ||
stage('Prepare build') { | ||
steps { | ||
script { | ||
currentBuild.displayName = "#${env.BUILD_NUMBER}" | ||
} | ||
} | ||
} | ||
|
||
stage('Setup Android SDK') { | ||
steps { | ||
// Install Android SDK | ||
lock("update-android-sdk-on-${env.NODE_NAME}") { | ||
sh "./buildScripts/build_step_install_android_sdk" | ||
} | ||
} | ||
} | ||
|
||
stage('Setup Translations') { | ||
steps { | ||
sh ''' | ||
set +x | ||
./gradlew generateCrowdinMetadataCatroid -PcrowdinKey=$crowdinKey | ||
''' | ||
} | ||
} | ||
|
||
stage('Start emulator') { | ||
steps { | ||
sh "./buildScripts/build_helper_start_emulator" | ||
} | ||
} | ||
|
||
stage('Create Screenshots') { | ||
steps { | ||
sh "./gradlew generateScreenshotsCatroid" | ||
} | ||
post { | ||
always { | ||
// stop/kill emulator | ||
sh "./buildScripts/build_helper_stop_emulator" | ||
} | ||
|
||
success { | ||
publishHTML target: [ | ||
allowMissing: false, | ||
alwaysLinkToLastBuild: false, | ||
keepAll: true, | ||
reportDir: 'fastlane/metadata/android', | ||
reportFiles: 'screenshots.html', | ||
reportName: 'Screenshots' | ||
] | ||
} | ||
} | ||
} | ||
|
||
stage('Review') { | ||
//agent none | ||
options { | ||
timeout(time: 6, unit: 'HOURS') | ||
} | ||
steps { | ||
script { | ||
env.APPROVE_DEPLOY = input message: 'User input required', | ||
parameters: [choice(name: 'Deploy', choices: 'no\nyes', | ||
description: 'Please review the Screenshots! Do you want to deploy this to Google Play?')] | ||
} | ||
} | ||
} | ||
|
||
stage('Upload Metadata') { | ||
when { | ||
environment name: 'APPROVE_DEPLOY', value: 'yes' | ||
} | ||
steps { | ||
sh "fastlane android upload_Metadata_Catroid" | ||
} | ||
} | ||
|
||
stage('Promote APK to production') { | ||
when { | ||
environment name: 'APPROVE_DEPLOY', value: 'yes' | ||
} | ||
steps { | ||
sh "fastlane android promote_Catroid" | ||
} | ||
} | ||
} | ||
|
||
post { | ||
always { | ||
// Send notifications with standalone=false | ||
script { | ||
sendNotifications false | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.