jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/362106 )
Change subject: operations-puppet-docker: use castor cache ...................................................................... operations-puppet-docker: use castor cache Change-Id: Idd7d6d1fd76020e83841d772a773cb39627c8792 --- M dockerfiles/contint-operations-puppet/run.sh M jjb/operations-puppet.yaml 2 files changed, 28 insertions(+), 2 deletions(-) Approvals: Thcipriani: Looks good to me, approved jenkins-bot: Verified diff --git a/dockerfiles/contint-operations-puppet/run.sh b/dockerfiles/contint-operations-puppet/run.sh index 251dca9..a1f16d8 100644 --- a/dockerfiles/contint-operations-puppet/run.sh +++ b/dockerfiles/contint-operations-puppet/run.sh @@ -4,6 +4,7 @@ TEMP_DIR=$(mktemp -d) LOG_DIR="$HOME/log" +CACHE_DIR="$HOME/.cache" capture_logs() { # Save logs @@ -25,6 +26,11 @@ git checkout --quiet FETCH_HEAD git submodule --quiet update --init --recursive +[ -d /cache/.cache ] && { + mkdir -p "$CACHE_DIR" + cp -R /cache/.cache/* "${CACHE_DIR}/" +} + # Run tox tests { set -o pipefail @@ -35,7 +41,7 @@ # Run rake tests { - bundle install --path "${HOME}/.gems" --clean + bundle install --clean bundle exec rake test | tee "${LOG_DIR}/rake.log" } & PID_TWO=$! diff --git a/jjb/operations-puppet.yaml b/jjb/operations-puppet.yaml index 67a987a..47f2348 100644 --- a/jjb/operations-puppet.yaml +++ b/jjb/operations-puppet.yaml @@ -122,11 +122,29 @@ set -x rm -rf log + rm -rf cache rm -rf .env + + # XXX: modify castor job before moving to this fully + CASTOR_URL=castor.integration.eqiad.wmflabs + NAMESPACE=operations-puppet/production/operations-puppet-tests-jessie + CACHE="$(pwd)/cache" + BUNDLE_PATH=/cache/workspace/vendor/bundle + + rsync \ + --archive \ + --compress \ + --contimeout 3 \ + rsync://${CASTOR_URL}:/caches/$NAMESPACE/ $CACHE \ + || : + + # In case rsync fails + mkdir -p "$(pwd)${BUNDLE_PATH}" git -C /srv/git/operations/puppet.git remote update -p cat <<ZUUL > .env + BUNDLE_PATH=$BUNDLE_PATH ZUUL_URL=$ZUUL_URL ZUUL_PROJECT=$ZUUL_PROJECT ZUUL_COMMIT=$ZUUL_COMMIT @@ -141,7 +159,8 @@ --env-file .env \ --volume /srv/git:/srv/git:ro \ --volume "$(pwd)"/log:/var/lib/jenkins/log \ - ci-staging-docker-registry01.wmflabs.org/contint/operations-puppet:v0.0.3 + --volume "$CACHE":/cache \ + ci-staging-docker-registry01.wmflabs.org/contint/operations-puppet:v0.0.4 wrappers: - timeout: timeout: 1 # minute @@ -156,6 +175,7 @@ skip-if-no-test-files: true stoponerror: false - archive-log-dir + # No castor-save. Done postmerge by operations-puppet-cache-update-jessie - project: name: 'operations-puppet' -- To view, visit https://gerrit.wikimedia.org/r/362106 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idd7d6d1fd76020e83841d772a773cb39627c8792 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Thcipriani <tcipri...@wikimedia.org> Gerrit-Reviewer: Hashar <has...@free.fr> Gerrit-Reviewer: Thcipriani <tcipri...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits