blob: d63c4f7475c621817e1797e4187386b7bbd22e54 [file] [log] [blame]
Jiri Broulik4e3b6642018-02-13 16:10:32 +01001#
2# Job to manage libvirt live snapshots
3#
4parameters:
Jiri Broulik4e3b6642018-02-13 16:10:32 +01005 jenkins:
6 client:
7 job:
8 manage-virt-snapshot:
9 type: workflow-scm
10 concurrent: true
Alexander Evseev4589d712018-08-03 12:36:15 +020011 discard:
12 build:
13 keep_num: 10
14 artifact:
15 keep_num: 10
Jiri Broulik4e3b6642018-02-13 16:10:32 +010016 display_name: "Deploy - virt snapshot VM"
17 scm:
18 type: git
19 url: "${_param:jenkins_gerrit_url}/mk/mk-pipelines"
20 branch: "${_param:jenkins_pipelines_branch}"
Sergey Galkin4cf87b92019-06-19 17:53:07 +040021 credentials: ${_param:jenkins_gerrit_credentials}
Jiri Broulik4e3b6642018-02-13 16:10:32 +010022 script: libvirt-live-snapshots.groovy
23 param:
24 SALT_MASTER_URL:
25 type: string
26 default: "${_param:jenkins_salt_api_url}"
27 SALT_MASTER_CREDENTIALS:
28 type: string
29 default: "salt"
30 CREATE_LIVE_SNAPSHOT:
31 type: boolean
32 default: 'true'
33 description: "Ensures that the live snapshot exists"
34 ROLLBACK_LIVE_SNAPSHOT:
35 type: boolean
36 default: 'false'
37 description: "Rollback the VM to a state before live snapshot was taken"
38 REMOVE_LIVE_SNAPSHOT:
39 type: boolean
40 default: 'false'
41 description: "Ensures that the live snapshot does not exist"
42 MERGE_LIVE_SNAPSHOT:
43 type: boolean
44 default: 'false'
45 description: "Ensures that the live snapshot is merged into it's base image"
46 NODE_PROVIDER:
47 type: string
48 default: "kvm01"
49 description: "KVM node that hosts the VM (for ex. kvm02)"
50 TARGET:
51 type: string
52 default: "ctl01"
53 description: "Unique identification of the VM being snapshoted without domain name (for ex. ctl01)"
54 SNAPSHOT_NAME:
55 type: string
56 default: "snapshot1"
57 description: "Snapshot name"
Martin Polreich4c3c57d2019-05-02 16:14:47 +020058 LIBVIRT_IMAGES_PATH:
Jiri Broulik4e3b6642018-02-13 16:10:32 +010059 type: string
60 default: "/var/lib/libvirt/images"
61 description: "Path where snapshot image and dumpxml are being put"
62 DISK_NAME:
63 type: string
64 default: "vda"
65 description: "Disk name of the snapshot"