Skip to content

Commit

Permalink
updated to debian:bullsyeve, latest ruby version and fastlane
Browse files Browse the repository at this point in the history
  • Loading branch information
goschale committed Jul 4, 2022
1 parent 0f83cef commit 84be6c2
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 17 deletions.
28 changes: 18 additions & 10 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,20 @@ pipeline {
}

agent {
docker {
image 'catrobat/catrobat-android:stable'
args '--device /dev/kvm:/dev/kvm -v /var/local/container_shared/gradle_cache/$EXECUTOR_NUMBER:/home/user/.gradle -m=6.5G'
label 'LimitedEmulator'
alwaysPull true
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
// Also hand in the group id of kvm to allow using /dev/kvm.
additionalBuildArgs '--build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) --build-arg KVM_GROUP_ID=$(getent group kvm | cut -d: -f3)'
// Ensure that each executor has its own gradle cache to not affect other builds
// that run concurrently.
args '--device /dev/kvm:/dev/kvm'
}
}

Expand Down Expand Up @@ -118,14 +127,13 @@ pipeline {
steps {
sh "echo no | avdmanager create avd --force --name android28 --package 'system-images;android-28;default;x86_64'"
sh "/home/user/android/sdk/emulator/emulator -no-window -no-boot-anim -noaudio -avd android28 > /dev/null 2>&1 &"
sh '/home/user/android/sdk/platform-tools/adb logcat -d > Paintroid/logcat.txt'
sh 'cat /Paintroid/logcat.txt'
archiveArtifacts 'Paintroid/logcat.txt'
sh './gradlew -PenableCoverage -Pjenkins -Pemulator=android28 -Pci createDebugCoverageReport -i'
//sh './gradlew -PenableCoverage -Pjenkins -Pemulator=android28 -Pci createDebugCoverageReport -i'
}
post {
always {
sh '/home/user/android/sdk/platform-tools/adb logcat -d > Paintroid/logcat.txt'
sh 'pwd'
sh 'ls -la'
sh '/home/user/android/sdk/platform-tools/adb logcat -d > logcat.txt'
sh './gradlew stopEmulator'
junitAndCoverage "$reports/coverage/debug/report.xml", 'device', javaSrc
archiveArtifacts 'Paintroid/logcat.txt'
Expand Down
18 changes: 14 additions & 4 deletions Jenkinsfile.releaseAPK
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,20 @@
pipeline {
agent {
docker {
image 'catrobat/catrobat-android:stable'
args '--device /dev/kvm:/dev/kvm -v /var/local/container_shared/gradle_cache/$EXECUTOR_NUMBER:/home/user/.gradle -m=6.5G'
label 'LimitedEmulator'
alwaysPull true
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
// Also hand in the group id of kvm to allow using /dev/kvm.
additionalBuildArgs '--build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) --build-arg KVM_GROUP_ID=$(getent group kvm | cut -d: -f3)'
// Ensure that each executor has its own gradle cache to not affect other builds
// that run concurrently.
args '--device /dev/kvm:/dev/kvm'
}
}

Expand Down
7 changes: 4 additions & 3 deletions docker/Dockerfile.jenkins
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:buster
FROM debian:bullseye
# Android Dependencies
# --------------------
# Adapt the paramters below to change the dependencies.
Expand Down Expand Up @@ -50,8 +50,9 @@ RUN apt-get update
RUN apt-get install -y python2
RUN apt-get install -y --no-install-recommends \
openjdk-11-jdk-headless \
rubygems \
ruby-dev \
ruby-full \
#rubygems \
#ruby-dev \
g++ \
make \
less \
Expand Down

0 comments on commit 84be6c2

Please sign in to comment.