Jiri Broulik | 4e3b664 | 2018-02-13 16:10:32 +0100 | [diff] [blame] | 1 | # |
| 2 | # Job to manage libvirt live snapshots |
| 3 | # |
| 4 | parameters: |
| 5 | _param: |
| 6 | jenkins_salt_api_url: "http://${_param:salt_master_host}:6969" |
| 7 | jenkins: |
| 8 | client: |
| 9 | job: |
| 10 | manage-virt-snapshot: |
| 11 | type: workflow-scm |
| 12 | concurrent: true |
Alexander Evseev | 4589d71 | 2018-08-03 12:36:15 +0200 | [diff] [blame] | 13 | discard: |
| 14 | build: |
| 15 | keep_num: 10 |
| 16 | artifact: |
| 17 | keep_num: 10 |
Jiri Broulik | 4e3b664 | 2018-02-13 16:10:32 +0100 | [diff] [blame] | 18 | display_name: "Deploy - virt snapshot VM" |
| 19 | scm: |
| 20 | type: git |
| 21 | url: "${_param:jenkins_gerrit_url}/mk/mk-pipelines" |
| 22 | branch: "${_param:jenkins_pipelines_branch}" |
| 23 | credentials: "gerrit" |
| 24 | script: libvirt-live-snapshots.groovy |
| 25 | param: |
| 26 | SALT_MASTER_URL: |
| 27 | type: string |
| 28 | default: "${_param:jenkins_salt_api_url}" |
| 29 | SALT_MASTER_CREDENTIALS: |
| 30 | type: string |
| 31 | default: "salt" |
| 32 | CREATE_LIVE_SNAPSHOT: |
| 33 | type: boolean |
| 34 | default: 'true' |
| 35 | description: "Ensures that the live snapshot exists" |
| 36 | ROLLBACK_LIVE_SNAPSHOT: |
| 37 | type: boolean |
| 38 | default: 'false' |
| 39 | description: "Rollback the VM to a state before live snapshot was taken" |
| 40 | REMOVE_LIVE_SNAPSHOT: |
| 41 | type: boolean |
| 42 | default: 'false' |
| 43 | description: "Ensures that the live snapshot does not exist" |
| 44 | MERGE_LIVE_SNAPSHOT: |
| 45 | type: boolean |
| 46 | default: 'false' |
| 47 | description: "Ensures that the live snapshot is merged into it's base image" |
| 48 | NODE_PROVIDER: |
| 49 | type: string |
| 50 | default: "kvm01" |
| 51 | description: "KVM node that hosts the VM (for ex. kvm02)" |
| 52 | TARGET: |
| 53 | type: string |
| 54 | default: "ctl01" |
| 55 | description: "Unique identification of the VM being snapshoted without domain name (for ex. ctl01)" |
| 56 | SNAPSHOT_NAME: |
| 57 | type: string |
| 58 | default: "snapshot1" |
| 59 | description: "Snapshot name" |
| 60 | PATH: |
| 61 | type: string |
| 62 | default: "/var/lib/libvirt/images" |
| 63 | description: "Path where snapshot image and dumpxml are being put" |
| 64 | DISK_NAME: |
| 65 | type: string |
| 66 | default: "vda" |
| 67 | description: "Disk name of the snapshot" |