diff --git a/Jenkinsfile b/Jenkinsfile index fe973d3225..610865dcbb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -31,21 +31,11 @@ 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 - // 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 -m=6.5G' - label useDebugLabelParameter('LimitedEmulator') + 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 } } diff --git a/Jenkinsfile.releaseAPK b/Jenkinsfile.releaseAPK index 625153ed9d..80b417312b 100644 --- a/Jenkinsfile.releaseAPK +++ b/Jenkinsfile.releaseAPK @@ -2,20 +2,11 @@ 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 - // 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' + 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 } }