private void createRoles()

in src/com/epam/digital/data/platform/pipelines/stages/impl/dataplatform/CreateRedashRoles.groovy [55:76]


    private void createRoles(String roles, String redashUrl, String redashApiKey) {
        context.logger.info("Creating redash ${RegulationType.ROLES.value}")
        try {
            context.script.sh(script: "set +x; java -jar " +
                    "-DREDASH_URL=${redashUrl} " +
                    "-DREDASH_API_KEY=${redashApiKey} " +
                    "-DPOSTGRES_PASSWORD=\'${context.postgres.analytical_pg_password}\' " +
                    "-DPOSTGRES_USER=${context.postgres.analytical_pg_user} " +
                    "-DDB_NAME=${context.registry.name} " +
                    "-DDB_URL=${context.postgres.ANALYTICAL_MASTER_URL} " +
                    "-DDB_PORT=${context.postgres.ANALYTICAL_MASTER_PORT} " +
                    "-DPWD_ADMIN=${context.postgres.analyticsAdminRolePass} " +
                    "-DPWD_AUDITOR=${context.postgres.auditRolePass} " +
                    "${REDASH_PUBLISHER_JAR} " +
                    "--${roles} " +
                    "${context.logLevel == "DEBUG" ? "1>&2" : ""}")
            context.logger.info("Role(s) has been successfully created")
        }
        catch (any) {
            context.script.error("Role(s) creation failed")
        }
    }