in src/com/epam/digital/data/platform/pipelines/stages/impl/dataplatform/CreateReports.groovy [30:58]
void run() {
if (context.registryRegulations.deployStatus("create-reports", "${RegulationType.REPORTS.value}")) {
try {
context.logger.info("Publishing redash ${RegulationType.REPORTS.value}")
context.script.sh(script: "set +x; java -jar " +
"-DREDASH_URL=${context.redash.viewerUrl} " +
"-DREDASH_API_KEY=${context.redash.viewerApiKey} " +
"-DPOSTGRES_PASSWORD=\'${context.postgres.operational_pg_password}\' " +
"-DPOSTGRES_USER=${context.postgres.operational_pg_user} " +
"-DDB_NAME=${context.registry.name} " +
"-DDB_URL=${context.postgres.OPERATIONAL_MASTER_URL} " +
"-DDB_PORT=${context.postgres.OPERATIONAL_MASTER_PORT} " +
"-DPWD_ADMIN=${context.postgres.analyticsAdminRolePass} " +
"-DPWD_AUDITOR=${context.postgres.auditRolePass} " +
"${REDASH_PUBLISHER_JAR} " +
"--reports " +
"${context.logLevel == "DEBUG" ? "1>&2" : ""}")
context.logger.info("Redash ${RegulationType.REPORTS.value} have been successfully published")
}
catch (any) {
context.script.error("Publishing ${RegulationType.REPORTS.value} failed")
}
context.logger.info("Redash ${RegulationType.REPORTS.value} creation have been finished")
context.registryRegulations.getChangedStatusOrFiles("save", "create-reports",
"--file ${context.getWorkDir()}/${RegulationType.REPORTS.value}")
} else {
context.logger.info("Skip redash ${RegulationType.REPORTS.value} publishing due to no changes")
}
}