#!groovy import com.freeleaps.devops.EnvironmentVars import com.freeleaps.devops.SourceFetcher def call(Map configurations) { def environmentVars = new EnvironmentVars(this) pipeline { agent any options { buildDiscarder(logRotator(numToKeepStr: '25')) timeout(time: 30, unit: 'MINUTES') timestamps() } stages { stage("Source Codes Checkout") { steps { script { def sourceFetcher = new SourceFetcher(this) sourceFetcher.fetch(configurations) } } } stage("Prepared Environment Variables") { steps { script { environmentVars.injectVars(configurations) } } } stage("Commit Linting If Enabled") { steps { script { def enabled = "${configurations.COMMIT_MESSAGE_LINT_ENABLED}" if (enabled == "true") { print("Commit Linting is enabled") } } } } } } }