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
|
def didRun = false
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
@@ -28,20 +30,10 @@ pipeline {
|
|||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Validate Run Parameters') {
|
stage('Validate Repository') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
def jobParts = env.JOB_NAME.tokenize('/')
|
checkRepoName(params.REPO_NAME)
|
||||||
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.")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user