diff --git a/jenkins/Dockerfile.kinetic b/jenkins/Dockerfile.kinetic index d2cc9ba..227aa79 100644 --- a/jenkins/Dockerfile.kinetic +++ b/jenkins/Dockerfile.kinetic @@ -27,6 +27,9 @@ ADD https://api.github.com/repos/googlecartographer/cartographer/git/refs/heads/ # wstool needs the updated rosinstall file to clone the correct repos. COPY cartographer_ros.rosinstall cartographer_ros/ COPY scripts/prepare_jenkins_catkin_workspace.sh cartographer_ros/scripts/ + +# Invalidates the Docker cache to ensure this command is always executed. +ARG CACHEBUST=1 RUN CARTOGRAPHER_VERSION=$CARTOGRAPHER_VERSION \ cartographer_ros/scripts/prepare_jenkins_catkin_workspace.sh diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile index 9f835ae..06bb2fc 100644 --- a/jenkins/Jenkinsfile +++ b/jenkins/Jenkinsfile @@ -21,7 +21,7 @@ podTemplate(label: 'node-0', containers: [ sh 'gcloud auth activate-service-account --key-file=/opt/config/gcloud-svc-account.json' sh 'cd /data && rm -Rf *' sh 'cd /data && git clone https://github.com/googlecartographer/cartographer_ros' - sh 'cd /data/cartographer_ros && docker build -f jenkins/Dockerfile.kinetic -t kinetic-jenkins-slave .' + sh 'cd /data/cartographer_ros && docker build -f jenkins/Dockerfile.kinetic -t kinetic-jenkins-slave --build-arg CACHEBUST=$(date +%s) .' } stage('Push') { sh 'docker tag kinetic-jenkins-slave eu.gcr.io/cartographer-141408/kinetic-jenkins-slave'