in src/com/epam/digital/data/platform/pipelines/stages/impl/dataplatform/ImportExcerpts.groovy [47:72]
private void importExcerpts(String dirName, String cephBucketName, String cephHttpEndpoint, String cephAccessKey, String cephSecretKey) {
context.logger.info("Importing excerpts for ${dirName}")
try {
context.script.sh(script: "set +x; java -jar " +
"-DREDASH_URL=${context.redash.viewerUrl} " +
"-DREDASH_API_KEY=${context.redash.viewerApiKey} " +
"-DPOSTGRES_PASSWORD=${context.postgres.excerptExporterPass} " +
"-DPOSTGRES_USER=${context.postgres.excerptExporterUser} " +
"-DDB_NAME=${EXCERPTS_DB_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} " +
"-DCEPH_BUCKET=${cephBucketName} " +
"-DCEPH_HTTP_ENDPOINT=${cephHttpEndpoint} " +
"-DCEPH_ACCESS_KEY=${cephAccessKey} " +
"-DCEPH_SECRET_KEY=${cephSecretKey} " +
"${EXCERPTS_IMPORTER_JAR} " +
"--${dirName} " +
"${context.logLevel == "DEBUG" ? "1>&2" : ""}")
context.logger.info("Excerpts have been successfully imported for ${dirName}")
} catch (any) {
context.script.error("Excerpts import have been failed for ${dirName}")
}
}