|
|
@ -2,33 +2,33 @@ |
|
|
import groovy.json.JsonOutput |
|
|
import groovy.json.JsonOutput |
|
|
|
|
|
|
|
|
// for inline scripts |
|
|
// for inline scripts |
|
|
//def gitRepo = "https://github.com/nmasse-itix/summit-api.git" |
|
|
def gitRepo |
|
|
//def gitBranch = "master" |
|
|
def gitBranch |
|
|
|
|
|
|
|
|
// For Jenkinsfile from GIT |
|
|
|
|
|
def gitRepo = scm.getUserRemoteConfigs()[0].getUrl() |
|
|
|
|
|
def gitBranch = scm.getUserRemoteConfigs()[0].getRefspec() |
|
|
|
|
|
|
|
|
|
|
|
node('nodejs') { |
|
|
node('nodejs') { |
|
|
def towerExtraVars = [ |
|
|
|
|
|
git_repo: gitRepo, |
|
|
|
|
|
git_branch: gitBranch, |
|
|
|
|
|
threescale_cicd_api_backend_hostname: params.OPENSHIFT_SERVICE_NAME, |
|
|
|
|
|
threescale_cicd_api_backend_scheme: "http" |
|
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
// Get Source Code from SCM (Git) as configured in the Jenkins Project |
|
|
// Get Source Code from SCM (Git) as configured in the Jenkins Project |
|
|
stage('Checkout Source') { |
|
|
stage('Checkout Source') { |
|
|
// For Jenkinsfile from GIT |
|
|
// For Jenkinsfile from GIT |
|
|
checkout scm |
|
|
checkout scm |
|
|
|
|
|
gitRepo = scm.getUserRemoteConfigs()[0].getUrl() |
|
|
|
|
|
gitBranch = scm.getUserRemoteConfigs()[0].getRefspec() |
|
|
|
|
|
|
|
|
echo "${gitBranch}" |
|
|
echo "${gitRepo} ${gitBranch}" |
|
|
sh 'false' |
|
|
sh 'false' |
|
|
|
|
|
|
|
|
// for inline scripts |
|
|
// for inline scripts |
|
|
//git url: gitRepo |
|
|
//git url: gitRepo |
|
|
|
|
|
//gitRepo = "https://github.com/nmasse-itix/summit-api.git" |
|
|
|
|
|
//gitBranch = "master" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
def towerExtraVars = [ |
|
|
|
|
|
git_repo: gitRepo, |
|
|
|
|
|
git_branch: gitBranch, |
|
|
|
|
|
threescale_cicd_api_backend_hostname: params.OPENSHIFT_SERVICE_NAME, |
|
|
|
|
|
threescale_cicd_api_backend_scheme: "http" |
|
|
|
|
|
] |
|
|
|
|
|
|
|
|
def thisPackage = readJSON file: 'package.json' |
|
|
def thisPackage = readJSON file: 'package.json' |
|
|
def currentVersion = thisPackage.version |
|
|
def currentVersion = thisPackage.version |
|
|
def newVersion = "$currentVersion-$BUILD_NUMBER" |
|
|
def newVersion = "$currentVersion-$BUILD_NUMBER" |
|
|
|