Add new job for removing fuel-devops K8s snapshots
Removing snaphosts forces next builds of fuel-ccp deployment jobs to recreate fuel-devops envs which is useful when we want to use newer images of VMs. This job is set to be automatically triggered on every node by job that updates VM image on slaves. Additionally this patch ads "remove-all-snapshots" job that can be used manually to remove snaphosts on selected nodes. Change-Id: I7f3d5e3531a9d950944c1ae202a4439ae5b67426
This commit is contained in:
parent
ddba480c38
commit
f9aca192f2
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash -ex
|
||||
|
||||
# Removes snapshots of fuel-devops envs.
|
||||
|
||||
|
||||
# CONFIGURATION:
|
||||
######################################################
|
||||
FUEL_DEVOPS_INSTALLATION_DIR="/home/jenkins/venv-fuel-devops-3.0"
|
||||
: ${FUEL_DEVOPS_ENV_NAME:="ccp-simple-deployment-env"}
|
||||
: ${FUEL_SNAPSHOT_NAME:="fresh"}
|
||||
|
||||
|
||||
source "${FUEL_DEVOPS_INSTALLATION_DIR}"/bin/activate
|
||||
dos.py snapshot-delete "${FUEL_DEVOPS_ENV_NAME}" "${FUEL_SNAPSHOT_NAME}"
|
|
@ -0,0 +1,16 @@
|
|||
- job:
|
||||
name: remove-all-snapshots
|
||||
description: |
|
||||
This job will trigger jobs for removing K8s snaphosts on all slaves.
|
||||
builders:
|
||||
- shell: |
|
||||
echo "Removing snaphosts on slaves"
|
||||
- trigger-builds:
|
||||
- project: "remove-snapshots-simple-deployment"
|
||||
parameter-factories:
|
||||
- factory: allnodesforlabel
|
||||
name: NODE
|
||||
node-label: standard
|
||||
concurrent: true
|
||||
wrappers:
|
||||
- ng-cleanup
|
|
@ -0,0 +1,24 @@
|
|||
- job:
|
||||
name: remove-snapshots-simple-deployment
|
||||
builders:
|
||||
- inject:
|
||||
properties-content: |
|
||||
FUEL_DEVOPS_ENV_NAME=ccp-simple-deployment-env
|
||||
FUEL_DEVOPS_SNAPSHOT_NAME=fresh
|
||||
- shell:
|
||||
!include-raw 'builders/remove-snapshots.sh'
|
||||
concurrent: true
|
||||
properties:
|
||||
- heavy-job:
|
||||
weight: 6
|
||||
description: |
|
||||
Removes snapshot of K8s env for fuel-ccp simple deployment test.
|
||||
logrotate:
|
||||
daysToKeep: 14
|
||||
parameters:
|
||||
- node:
|
||||
name: NODE
|
||||
allowed-multiselect: true
|
||||
wrappers:
|
||||
- timeout:
|
||||
timeout: 60
|
|
@ -8,6 +8,10 @@
|
|||
IMAGE_SLAVE_PATH=/home/jenkins/workspace/cloud-images/
|
||||
- shell:
|
||||
!include-raw 'builders/update-vm-ubuntu-image.sh'
|
||||
- trigger-builds:
|
||||
- project: "remove-snapshots-simple-deployment"
|
||||
same-node: true
|
||||
current-parameters: true
|
||||
concurrent: true
|
||||
description: |
|
||||
Job updates Ubuntu images on Jenkins slaves
|
||||
|
|
Loading…
Reference in New Issue