50 lines
1.0 KiB
Groovy
50 lines
1.0 KiB
Groovy
#!groovy
|
|
|
|
import com.freeleaps.devops.EnvironmentVars
|
|
import com.freeleaps.devops.SourceFetcher
|
|
|
|
def call(Map configurations) {
|
|
def environmentVars = new EnvironmentVars(this)
|
|
environmentVars.injectVars(configurations)
|
|
|
|
pipeline {
|
|
agent any
|
|
options {
|
|
buildDiscarder(logRotator(numToKeepStr: '25'))
|
|
timeout(time: 30, unit: 'MINUTES')
|
|
}
|
|
|
|
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")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
} |