Update Jenkinsfile
All checks were successful
InnoHub Processor/tatort/pipeline/head This commit looks good
All checks were successful
InnoHub Processor/tatort/pipeline/head This commit looks good
This commit is contained in:
16
Jenkinsfile
vendored
16
Jenkinsfile
vendored
@@ -1,3 +1,5 @@
|
||||
@Library('InnoHub-Library') _
|
||||
|
||||
def didRun = false
|
||||
|
||||
pipeline {
|
||||
@@ -28,20 +30,10 @@ pipeline {
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Validate Run Parameters') {
|
||||
stage('Validate Repository') {
|
||||
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.")
|
||||
}
|
||||
checkRepoName(params.REPO_NAME)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user