Ensure cache invalidation when building CQ pipeline (#753)
parent
319b60af4c
commit
f5efe13c8a
|
@ -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.
|
# wstool needs the updated rosinstall file to clone the correct repos.
|
||||||
COPY cartographer_ros.rosinstall cartographer_ros/
|
COPY cartographer_ros.rosinstall cartographer_ros/
|
||||||
COPY scripts/prepare_jenkins_catkin_workspace.sh cartographer_ros/scripts/
|
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 \
|
RUN CARTOGRAPHER_VERSION=$CARTOGRAPHER_VERSION \
|
||||||
cartographer_ros/scripts/prepare_jenkins_catkin_workspace.sh
|
cartographer_ros/scripts/prepare_jenkins_catkin_workspace.sh
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ podTemplate(label: 'node-0', containers: [
|
||||||
sh 'gcloud auth activate-service-account --key-file=/opt/config/gcloud-svc-account.json'
|
sh 'gcloud auth activate-service-account --key-file=/opt/config/gcloud-svc-account.json'
|
||||||
sh 'cd /data && rm -Rf *'
|
sh 'cd /data && rm -Rf *'
|
||||||
sh 'cd /data && git clone https://github.com/googlecartographer/cartographer_ros'
|
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') {
|
stage('Push') {
|
||||||
sh 'docker tag kinetic-jenkins-slave eu.gcr.io/cartographer-141408/kinetic-jenkins-slave'
|
sh 'docker tag kinetic-jenkins-slave eu.gcr.io/cartographer-141408/kinetic-jenkins-slave'
|
||||||
|
|
Loading…
Reference in New Issue