Support for diagnostic snapshot in simple-deployment jobs

Failed job create diagnostic snapshot, in this patch we download this
snapshot from vm to workspace and then in publisher we send it to logs
server.

Change-Id: I5a087b7f9950fb4832dcc8f1d72eb716431e4405
Depends-On: I84f480dc3f2ff33e1fc600c9a146cd8063b5a5a0
This commit is contained in:
Artur Zarzycki 2017-01-25 10:28:40 +01:00
parent 5862046cf1
commit d9df6e7aa9
2 changed files with 11 additions and 0 deletions

View File

@ -137,6 +137,10 @@ docker exec "${REGISTRY_HASH}" chgrp -R "${JENKINS_GID}" /var/lib/registry
docker exec "${REGISTRY_HASH}" chmod -R g+w /var/lib/registry
set +e
# download snapshot if exists
${SCP_COMMAND} vagrant@"${ADMIN_IP}":/tmp/ccp-diag/*.tar.gz .
# remove images from local registry
for i in `curl http://${REGISTRY_IP}:${REGISTRY_PORT}/v2/_catalog | jq -r '.repositories[]'`; do
REGISTRY_DATA_DIR=/home/jenkins/registry/data/docker/registry/v2/ /home/jenkins/registry/delete_docker_registry_image.py --image "${i}":"${ZUUL_CHANGE}"
done

View File

@ -12,6 +12,13 @@
- shell:
!include-raw-escape 'builders/fuel-ccp-simple-deployment.sh'
publishers:
- ssh:
site: logs.mcp.fuel-infra.org
target: /srv/static/logs/snapshots/
source: $WORKSPACE/*.tar.gz
fail-on-error: false
always-publish-from-master: true
flatten: true
- post-tasks:
- matches:
- log-text: ''