void run()

in src/com/epam/digital/data/platform/pipelines/stages/impl/dataplatform/CreateExcerptorJob.groovy [30:61]


    void run() {
        String DEPLOY_TEMPLATES_PATH = "deploy-templates"
        String JOB_YAML = "history-excerptor-job.yaml"
        Helm.upgrade(context, context.codebase.name, DEPLOY_TEMPLATES_PATH,
                ['namespace': context.namespace], "", context.namespace, true)

        context.historyExcerptor = new KeycloakClient(context)

        context.historyExcerptor.init("admin", "history-excerpt-history-user-admin",
                "keycloak-history-user-admin-client-secret")

        LinkedHashMap<String, String> parametersMap = [
                'namespace'              : context.namespace,
                'deploy'                 : "true",
                'buildId'                : context.script.env.BUILD_NUMBER,
                'dockerRegistry'         : context.dockerRegistry.proxyHost,
                'tableName'              : context.getParameterValue("NAME_OF_TABLE"),
                'DB_SCHEMA'              : context.postgres.getCurrentSchema(context.postgres.masterRepPod,
                        "registry", context.postgres.analytical_pg_user).trim(),
                'id'                     : context.getParameterValue("ID"),
                'token'                  : context.keycloak.getAccessToken(context.historyExcerptor),
                'data.historicBucketName': context.platform.getJsonPathValue(Ceph.OBJECT_BUCKET_CLAIM_API,
                        "datafactory-ceph-bucket", ".spec.bucketName"),
                'edpProject'             : context.platform.getJsonPathValue("configmap", "registry-pipeline-stage-name",
                        ".data.edpProject")
        ]

        context.script.writeFile file: JOB_YAML, text: Helm.template(context, "job", DEPLOY_TEMPLATES_PATH,
                parametersMap, context.namespace, "templates/receive-data-job.yaml")

        context.platform.apply(JOB_YAML)
    }