[DO-0] fix bug Cannot invoke method contains() on null object (!91)
Co-authored-by: Rustam Tagaev <rustam.tagaev@avroid.tech> Reviewed-on: https://git.avroid.tech/DevOps/jenkins-pipelines/pulls/91 Reviewed-by: Vasiliy Chipizhin <vasiliy.chipizhin@avroid.team>
This commit is contained in:
@@ -78,14 +78,14 @@ slaveTemplates.jnlp {
|
||||
"--build-arg PIP_INDEX_URL=${env.JENKINS_PIP_INDEX_URL} -f Dockerfile ."
|
||||
)
|
||||
|
||||
if (publishBranch.contains(branch)) {
|
||||
if (publishBranch != null && publishBranch.contains(branch)) {
|
||||
buildImage.push()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('deploy application'){
|
||||
if (publishBranch.contains(branch)){
|
||||
if (publishBranch != null && publishBranch.contains(branch)){
|
||||
build job: 'Cloud/Deploy/Backend/msg-files-deploy',
|
||||
parameters: [
|
||||
string(name: 'ENV', value: envBranch.find { it.value == branch }?.key ),
|
||||
|
||||
@@ -79,14 +79,14 @@ slaveTemplates.jnlp {
|
||||
"--build-arg PIP_INDEX_URL=${env.JENKINS_PIP_INDEX_URL} -f Dockerfile ."
|
||||
)
|
||||
|
||||
if (publishBranch) {
|
||||
if (publishBranch != null && publishBranch.contains(branch)) {
|
||||
buildImage.push()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('deploy application'){
|
||||
if (publishBranch){
|
||||
if (publishBranch != null && publishBranch.contains(branch)){
|
||||
build job: 'Cloud/Deploy/Backend/msg-messenger-core-api-deploy',
|
||||
parameters: [
|
||||
string(name: 'ENV', value: envBranch.find { it.value == branch }?.key ),
|
||||
|
||||
@@ -78,14 +78,14 @@ slaveTemplates.jnlp {
|
||||
"--build-arg PIP_INDEX_URL=${env.JENKINS_PIP_INDEX_URL} -f Dockerfile ."
|
||||
)
|
||||
|
||||
if (publishBranch.contains(branch)) {
|
||||
if (publishBranch != null && publishBranch.contains(branch)) {
|
||||
buildImage.push()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('deploy application'){
|
||||
if (publishBranch.contains(branch)){
|
||||
if (publishBranch != null && publishBranch.contains(branch)){
|
||||
build job: 'Cloud/Deploy/Backend/msg-messenger-deploy',
|
||||
parameters: [
|
||||
string(name: 'ENV', value: envBranch.find { it.value == branch }?.key ),
|
||||
|
||||
Reference in New Issue
Block a user