Skip to content

Commit

Permalink
WiP
Browse files Browse the repository at this point in the history
  • Loading branch information
mayank1211 committed Jun 14, 2024
1 parent 4c85fa7 commit 851d0ca
Showing 1 changed file with 13 additions and 22 deletions.
35 changes: 13 additions & 22 deletions build/jenkins/deployments.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,8 @@ pipeline {
}

environment {
def options = [
'NonProd': 'dev',
'Demo': 'dmo',
'Production': 'pd'
]
PROFILE = options[params.PROFILE]
echo "Selected environment profile: - ${PROFILE} - ${options[params.PROFILE]}"
PROFILE = ""
}

// environment {
// PROFILE = "${params.PROFILE}"
// }
stages {
stage('Prepare for jenkins-slave run') {
steps {
Expand All @@ -48,16 +38,17 @@ pipeline {
stage('Select Environment') {
steps {
script {
// def options = [
// 'NonProd': 'dev',
// 'Demo': 'dmo',
// 'Production': 'pd'
// ]
// def selectedProfile = options[params.PROFILE]
// echo "${selectedProfile}"
// env.PROFILE = selectedProfile
// echo "${env.PROFILE}"
echo "Selected environment profile: - ${env.PROFILE}"
def options = [
'NonProd': 'dev',
'Demo': 'dmo',
'Production': 'pd'
]

def selectedProfile = options[params.PROFILE]
echo "${selectedProfile}"
env.PROFILE = selectedProfile
echo "${env.PROFILE}"
echo "Selected environment profile: - ${env.PROFILE} - ${selectedProfile}"
}
}
}
Expand Down Expand Up @@ -106,7 +97,7 @@ pipeline {
stage('Deploy API') {
steps {
script {
sh "make deploy PROFILE=${env.PROFILE} IMAGE_TAG=${params.IMAGE_TAG ? params.IMAGE_TAG : env.IMAGE_TAG}"
sh "make deploy PROFILE=${env.PROFILE} IMAGE_TAG=${params.IMAGE_TAG}"
}
}
}
Expand Down

0 comments on commit 851d0ca

Please sign in to comment.