Skip to content

Commit 84be6c2

Browse files
committed
updated to debian:bullsyeve, latest ruby version and fastlane
1 parent 0f83cef commit 84be6c2

File tree

3 files changed

+36
-17
lines changed

3 files changed

+36
-17
lines changed

Jenkinsfile

+18-10
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,20 @@ pipeline {
3131
}
3232

3333
agent {
34-
docker {
35-
image 'catrobat/catrobat-android:stable'
36-
args '--device /dev/kvm:/dev/kvm -v /var/local/container_shared/gradle_cache/$EXECUTOR_NUMBER:/home/user/.gradle -m=6.5G'
37-
label 'LimitedEmulator'
38-
alwaysPull true
34+
dockerfile {
35+
filename 'Dockerfile.jenkins'
36+
// 'docker build' would normally copy the whole build-dir to the container, changing the
37+
// docker build directory avoids that overhead
38+
dir 'docker'
39+
// Pass the uid and the gid of the current user (jenkins-user) to the Dockerfile, so a
40+
// corresponding user can be added. This is needed to provide the jenkins user inside
41+
// the container for the ssh-agent to work.
42+
// Another way would be to simply map the passwd file, but would spoil additional information
43+
// Also hand in the group id of kvm to allow using /dev/kvm.
44+
additionalBuildArgs '--build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) --build-arg KVM_GROUP_ID=$(getent group kvm | cut -d: -f3)'
45+
// Ensure that each executor has its own gradle cache to not affect other builds
46+
// that run concurrently.
47+
args '--device /dev/kvm:/dev/kvm'
3948
}
4049
}
4150

@@ -118,14 +127,13 @@ pipeline {
118127
steps {
119128
sh "echo no | avdmanager create avd --force --name android28 --package 'system-images;android-28;default;x86_64'"
120129
sh "/home/user/android/sdk/emulator/emulator -no-window -no-boot-anim -noaudio -avd android28 > /dev/null 2>&1 &"
121-
sh '/home/user/android/sdk/platform-tools/adb logcat -d > Paintroid/logcat.txt'
122-
sh 'cat /Paintroid/logcat.txt'
123-
archiveArtifacts 'Paintroid/logcat.txt'
124-
sh './gradlew -PenableCoverage -Pjenkins -Pemulator=android28 -Pci createDebugCoverageReport -i'
130+
//sh './gradlew -PenableCoverage -Pjenkins -Pemulator=android28 -Pci createDebugCoverageReport -i'
125131
}
126132
post {
127133
always {
128-
sh '/home/user/android/sdk/platform-tools/adb logcat -d > Paintroid/logcat.txt'
134+
sh 'pwd'
135+
sh 'ls -la'
136+
sh '/home/user/android/sdk/platform-tools/adb logcat -d > logcat.txt'
129137
sh './gradlew stopEmulator'
130138
junitAndCoverage "$reports/coverage/debug/report.xml", 'device', javaSrc
131139
archiveArtifacts 'Paintroid/logcat.txt'

Jenkinsfile.releaseAPK

+14-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,20 @@
33
pipeline {
44
agent {
55
docker {
6-
image 'catrobat/catrobat-android:stable'
7-
args '--device /dev/kvm:/dev/kvm -v /var/local/container_shared/gradle_cache/$EXECUTOR_NUMBER:/home/user/.gradle -m=6.5G'
8-
label 'LimitedEmulator'
9-
alwaysPull true
6+
dockerfile {
7+
filename 'Dockerfile.jenkins'
8+
// 'docker build' would normally copy the whole build-dir to the container, changing the
9+
// docker build directory avoids that overhead
10+
dir 'docker'
11+
// Pass the uid and the gid of the current user (jenkins-user) to the Dockerfile, so a
12+
// corresponding user can be added. This is needed to provide the jenkins user inside
13+
// the container for the ssh-agent to work.
14+
// Another way would be to simply map the passwd file, but would spoil additional information
15+
// Also hand in the group id of kvm to allow using /dev/kvm.
16+
additionalBuildArgs '--build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) --build-arg KVM_GROUP_ID=$(getent group kvm | cut -d: -f3)'
17+
// Ensure that each executor has its own gradle cache to not affect other builds
18+
// that run concurrently.
19+
args '--device /dev/kvm:/dev/kvm'
1020
}
1121
}
1222

docker/Dockerfile.jenkins

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:buster
1+
FROM debian:bullseye
22
# Android Dependencies
33
# --------------------
44
# Adapt the paramters below to change the dependencies.
@@ -50,8 +50,9 @@ RUN apt-get update
5050
RUN apt-get install -y python2
5151
RUN apt-get install -y --no-install-recommends \
5252
openjdk-11-jdk-headless \
53-
rubygems \
54-
ruby-dev \
53+
ruby-full \
54+
#rubygems \
55+
#ruby-dev \
5556
g++ \
5657
make \
5758
less \

0 commit comments

Comments
 (0)