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 ba416c6 commit 4c85fa7
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions build/jenkins/deployments.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,18 @@ pipeline {
}

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

// environment {
// PROFILE = "${params.PROFILE}"
// }
stages {
stage('Prepare for jenkins-slave run') {
steps {
Expand All @@ -38,15 +48,16 @@ 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 "Selected environment profile: - ${env.PROFILE} - ${options[params.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}"
}
}
}
Expand Down

0 comments on commit 4c85fa7

Please sign in to comment.