Jiri Broulik | 4e3b664 | 2018-02-13 16:10:32 +0100 | [diff] [blame] | 1 | # |
| 2 | # Job to manage libvirt live snapshots |
| 3 | # |
| 4 | parameters: |
Jiri Broulik | 4e3b664 | 2018-02-13 16:10:32 +0100 | [diff] [blame] | 5 | jenkins: |
| 6 | client: |
| 7 | job: |
| 8 | manage-virt-snapshot: |
| 9 | type: workflow-scm |
| 10 | concurrent: true |
Alexander Evseev | 4589d71 | 2018-08-03 12:36:15 +0200 | [diff] [blame] | 11 | discard: |
| 12 | build: |
| 13 | keep_num: 10 |
| 14 | artifact: |
| 15 | keep_num: 10 |
Jiri Broulik | 4e3b664 | 2018-02-13 16:10:32 +0100 | [diff] [blame] | 16 | 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 Galkin | 4cf87b9 | 2019-06-19 17:53:07 +0400 | [diff] [blame] | 21 | credentials: ${_param:jenkins_gerrit_credentials} |
Jiri Broulik | 4e3b664 | 2018-02-13 16:10:32 +0100 | [diff] [blame] | 22 | 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 Polreich | 4c3c57d | 2019-05-02 16:14:47 +0200 | [diff] [blame] | 58 | LIBVIRT_IMAGES_PATH: |
Jiri Broulik | 4e3b664 | 2018-02-13 16:10:32 +0100 | [diff] [blame] | 59 | 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" |