def getStagesToRun()

in src/com/epam/digital/data/platform/pipelines/stages/StageFactory.groovy [40:54]


    def getStagesToRun() {
        context.logger.debug("Get stages from STAGES build parameter")
        String stagesConfig = context.getParameterValue("STAGES")
        if (!stagesConfig?.trim())
            context.logger.error("Parameter STAGES is mandatory to be specified, please check configuration of job")
        try {
            def stagesToRun = new JsonSlurperClassic().parseText(stagesConfig)
            context.logger.debug("Stages to run:\n${stagesToRun}")
            return stagesToRun
        }
        catch (any) {
            context.logger.error("Couldn't parse stages configuration from parameter " +
                    "STAGE - not valid JSON format.")
        }
    }