Job for update vm-images on slaves from share01-scc.ng.mirantis.net

This job download vm images from storage server and create symlink for
newest one. It's triggerred manually but in the future it will be triggered
from jenkins-dev after build images.

Change-Id: I4433c4c6f19cfa8bcb27a59d043cc6dec126a626
This commit is contained in:
Artur Zarzycki 2016-08-19 11:24:51 +02:00
parent 548ad8ff87
commit 3bb391f313
2 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,13 @@
#!/bin/bash
set -ex
mkdir -p $IMAGE_SLAVE_PATH
echo "** Updating Ubuntu image"
rsync --delete-before -v -r -e 'ssh -o StrictHostKeyChecking=no' $STORAGE_USER@$STORAGE_HOST:. $IMAGE_SLAVE_PATH
cd $IMAGE_SLAVE_PATH
lastfile=`ls -t1 *.qcow2 | head -n 1`
ln -sf $lastfile default-image.qcow2

View File

@ -0,0 +1,25 @@
- job:
name: update-vm-ubuntu-image
builders:
- inject:
properties-content: |
STORAGE_USER=share
STORAGE_HOST=share01-scc.ng.mirantis.net
IMAGE_SLAVE_PATH=/home/jenkins/workspace/cloud-images/
- shell:
!include-raw 'builders/update-vm-ubuntu-image.sh'
concurrent: true
description: |
Job updates Ubuntu images on Jenkins slaves
logrotate:
daysToKeep: 14
parameters:
- node:
name: NODE
allowed-multiselect: true
wrappers:
- ssh-agent-credentials:
users:
- '0859086d-e10a-4ad5-af71-8abec4b6b6ec'
- timeout:
timeout: 60