Skip to content

Commit 3852b83

Browse files
author
Jakob Fahrner
committed
JENKINS-372 use docker catrobat image in all Jenkinsfiles
1 parent 560e139 commit 3852b83

6 files changed

+22
-70
lines changed

Jenkinsfile.BuildStandalone

+7-14
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,13 @@ def standaloneApk = 'catroid/build/outputs/apk/standalone/debug/catroid-standalo
44

55
pipeline {
66
agent {
7-
dockerfile {
8-
filename 'Dockerfile.jenkins'
9-
// 'docker build' would normally copy the whole build-dir to the container, changing the
10-
// docker build directory avoids that overhead
11-
dir 'docker'
12-
// Pass the uid and the gid of the current user (jenkins-user) to the Dockerfile, so a
13-
// corresponding user can be added. This is needed to provide the jenkins user inside
14-
// the container for the ssh-agent to work.
15-
// Another way would be to simply map the passwd file, but would spoil additional information
16-
// Also hand in the group id of kvm to allow using /dev/kvm.
17-
additionalBuildArgs '--build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) --build-arg KVM_GROUP_ID=$(getent group kvm | cut -d: -f3)'
18-
args '--device /dev/kvm:/dev/kvm -v /var/local/container_shared/gradle_cache/$EXECUTOR_NUMBER:/home/user/.gradle'
19-
// Add specific 'Standalone'-label, so it can be made sure, that there is a dedicated host for standalone builds
20-
label 'Standalone'
7+
agent {
8+
docker {
9+
image 'catrobat/catrobat-android:stable'
10+
args '--device /dev/kvm:/dev/kvm -v /var/local/container_shared/gradle_cache/$EXECUTOR_NUMBER:/home/user/.gradle'
11+
label 'Standalone'
12+
alwaysPull true
13+
}
2114
}
2215
}
2316

Jenkinsfile.ManualTests

+3-11
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,11 @@
22

33
pipeline {
44
agent {
5-
dockerfile {
6-
filename 'Dockerfile.jenkins'
7-
// 'docker build' would normally copy the whole build-dir to the container, changing the
8-
// docker build directory avoids that overhead
9-
dir 'docker'
10-
// Pass the uid and the gid of the current user (jenkins-user) to the Dockerfile, so a
11-
// corresponding user can be added. This is needed to provide the jenkins user inside
12-
// the container for the ssh-agent to work.
13-
// Another way would be to simply map the passwd file, but would spoil additional information
14-
// Also hand in the group id of kvm to allow using /dev/kvm.
15-
additionalBuildArgs '--build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) --build-arg KVM_GROUP_ID=$(getent group kvm | cut -d: -f3)'
5+
docker {
6+
image 'catrobat/catrobat-android:stable'
167
args '--device /dev/kvm:/dev/kvm -v /var/local/container_shared/gradle_cache/$EXECUTOR_NUMBER:/home/user/.gradle -m=6.5G'
178
label 'LimitedEmulator'
9+
alwaysPull true
1810
}
1911
}
2012

Jenkinsfile.OutgoingNetworkCallsTests

+3-11
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,11 @@
22

33
pipeline {
44
agent {
5-
dockerfile {
6-
filename 'Dockerfile.jenkins'
7-
// 'docker build' would normally copy the whole build-dir to the container, changing the
8-
// docker build directory avoids that overhead
9-
dir 'docker'
10-
// Pass the uid and the gid of the current user (jenkins-user) to the Dockerfile, so a
11-
// corresponding user can be added. This is needed to provide the jenkins user inside
12-
// the container for the ssh-agent to work.
13-
// Another way would be to simply map the passwd file, but would spoil additional information
14-
// Also hand in the group id of kvm to allow using /dev/kvm.
15-
additionalBuildArgs '--build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) --build-arg KVM_GROUP_ID=$(getent group kvm | cut -d: -f3)'
5+
docker {
6+
image 'catrobat/catrobat-android:stable'
167
args '--device /dev/kvm:/dev/kvm -v /var/local/container_shared/gradle_cache/$EXECUTOR_NUMBER:/home/user/.gradle -m=6.5G'
178
label 'LimitedEmulator'
9+
alwaysPull true
1810
}
1911
}
2012

Jenkinsfile.SensorboxTests

+3-12
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
11
#!groovy
22
pipeline {
33
agent {
4-
dockerfile {
5-
filename 'Dockerfile.jenkins'
6-
// 'docker build' would normally copy the whole build-dir to the container, changing the
7-
// docker build directory avoids that overhead
8-
dir 'docker'
9-
// Pass the uid and the gid of the current user (jenkins-user) to the Dockerfile, so a
10-
// corresponding user can be added. This is needed to provide the jenkins user inside
11-
// the container for the ssh-agent to work.
12-
// Another way would be to simply map the passwd file, but would spoil additional information
13-
// Also hand in the group id of kvm to allow using /dev/kvm.
14-
additionalBuildArgs '--build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) --build-arg KVM_GROUP_ID=$(getent group kvm | cut -d: -f3)'
4+
docker {
5+
image 'catrobat/catrobat-android:stable'
156
args '--net host -v /dev/bus/usb/:/dev/bus/usb -v /var/local/container_shared/gradle_cache/$EXECUTOR_NUMBER:/home/user/.gradle'
16-
// run on slave1 where nexus is connected to
177
label 'HardwareSensorBox'
8+
alwaysPull true
189
}
1910
}
2011

Jenkinsfile.buildMetadata

+3-11
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,11 @@
22

33
pipeline {
44
agent {
5-
dockerfile {
6-
filename 'Dockerfile.jenkins'
7-
// 'docker build' would normally copy the whole build-dir to the container, changing the
8-
// docker build directory avoids that overhead
9-
dir 'docker'
10-
// Pass the uid and the gid of the current user (jenkins-user) to the Dockerfile, so a
11-
// corresponding user can be added. This is needed to provide the jenkins user inside
12-
// the container for the ssh-agent to work.
13-
// Another way would be to simply map the passwd file, but would spoil additional information
14-
// Also hand in the group id of kvm to allow using /dev/kvm.
15-
additionalBuildArgs '--build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) --build-arg KVM_GROUP_ID=$(getent group kvm | cut -d: -f3)'
5+
docker {
6+
image 'catrobat/catrobat-android:stable'
167
args '--device /dev/kvm:/dev/kvm -v /var/local/container_shared/gradle_cache/$EXECUTOR_NUMBER:/home/user/.gradle -m=6.5G'
178
label 'LimitedEmulator'
9+
alwaysPull true
1810
}
1911
}
2012

Jenkinsfile.releaseAPK

+3-11
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,11 @@
22

33
pipeline {
44
agent {
5-
dockerfile {
6-
filename 'Dockerfile.jenkins'
7-
// 'docker build' would normally copy the whole build-dir to the container, changing the
8-
// docker build directory avoids that overhead
9-
dir 'docker'
10-
// Pass the uid and the gid of the current user (jenkins-user) to the Dockerfile, so a
11-
// corresponding user can be added. This is needed to provide the jenkins user inside
12-
// the container for the ssh-agent to work.
13-
// Another way would be to simply map the passwd file, but would spoil additional information
14-
// Also hand in the group id of kvm to allow using /dev/kvm.
15-
additionalBuildArgs '--build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) --build-arg KVM_GROUP_ID=$(getent group kvm | cut -d: -f3)'
5+
docker {
6+
image 'catrobat/catrobat-android:stable'
167
args '--device /dev/kvm:/dev/kvm -v /var/local/container_shared/gradle_cache/$EXECUTOR_NUMBER:/home/user/.gradle -m=6.5G'
178
label 'LimitedEmulator'
9+
alwaysPull true
1810
}
1911
}
2012

0 commit comments

Comments
 (0)