Trigger Dogtag backup when Galera backup is done
Depends-On: https://gerrit.mcp.mirantis.com/#/c/48325/
Related: PROD-32815
Change-Id: I442447e016c2dbd72a252573d706956c9b1f320e
diff --git a/galera-database-backup-pipeline.groovy b/galera-database-backup-pipeline.groovy
index a6d0af5..7d8c154 100644
--- a/galera-database-backup-pipeline.groovy
+++ b/galera-database-backup-pipeline.groovy
@@ -57,5 +57,19 @@
stage('Clean-up') {
salt.cmdRun(pepperEnv, backupNode, "su root -c '/usr/local/bin/innobackupex-runner.sh -c'")
}
+ stage('Backup Dogtag') {
+ if (!salt.getPillar(pepperEnv, "I@salt:master", "I@dogtag:server:enabled")['return'].isEmpty()) {
+ dogtagBackupBuild = build(job: 'backupninja-backup-pipeline', parameters: [
+ [$class: 'StringParameterValue', name: 'SALT_MASTER_URL', value: SALT_MASTER_URL],
+ [$class: 'StringParameterValue', name: 'SALT_MASTER_CREDENTIALS', value: SALT_MASTER_CREDENTIALS],
+ [$class: 'BooleanParameterValue', name: 'ASK_CONFIRMATION', value: "false"],
+ [$class: 'BooleanParameterValue', name: 'BACKUP_SALTMASTER_AND_MAAS', value: "false"],
+ [$class: 'BooleanParameterValue', name: 'BACKUP_DOGTAG', value: "true"],
+ ]
+ )
+ } else {
+ common.warningMsg("Dogtag pillar not found. This is fine if you are using different Barbican backend.")
+ }
+ }
}
}
\ No newline at end of file