diff --git a/Jenkinsfile b/Jenkinsfile index 160f9fe..4d6a4f0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,20 +1,16 @@ #!/usr/bin/env groovy import groovy.json.JsonOutput -def gitRepo = "" +def gitRepo = params.GIT_REPO def gitBranch = params.GIT_BRANCH != null && params.GIT_BRANCH != "" ? params.GIT_BRANCH : "master" node('nodejs') { // Get Source Code from SCM (Git) as configured in the Jenkins Project stage('Checkout Source') { // For Jenkinsfile from GIT - if (gitRepo == null || gitRepo == "") { - checkout scm - gitRepo = scm.getUserRemoteConfigs()[0].getUrl() - } else { - // for inline scripts - git url: gitRepo, branch: gitBranch - } + checkout scm + // for inline scripts + //git url: gitRepo, branch: gitBranch } def towerExtraVars = [