Update Jenkinsfile
All checks were successful
InnoHub Processor/tatort/pipeline/head This commit was not built
All checks were successful
InnoHub Processor/tatort/pipeline/head This commit was not built
This commit is contained in:
18
Jenkinsfile
vendored
18
Jenkinsfile
vendored
@@ -28,6 +28,24 @@ pipeline {
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Validate Run Parameters') {
|
||||
steps {
|
||||
script {
|
||||
def jobParts = env.JOB_NAME.tokenize('/')
|
||||
def detectedRepo = jobParts[1]
|
||||
|
||||
echo "Detected Repo: ${detectedRepo}"
|
||||
echo "Provided REPO_NAME: ${params.REPO_NAME}"
|
||||
|
||||
if (params.REPO_NAME != detectedRepo) {
|
||||
echo "Skipping build. REPO_NAME '${params.REPO_NAME}' does not match repo '${detectedRepo}'"
|
||||
currentBuild.result = 'NOT_BUILT'
|
||||
error("Stopping pipeline as REPO_NAME does not match repository.")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Install Dependencies') {
|
||||
steps {
|
||||
script {
|
||||
|
||||
Reference in New Issue
Block a user