stage(‘Deploy To Sit’) {
when{
expression { NS ==~ ‘.sit$’ && BRANCH_NAME ==~ ‘jenkins.’ }
}
steps {
input(id: 'juslink-operator',message: 'deploy to sit?', submitter: 'juslink-operator')
container('maven'){
dir("deploy"){
sh '''
envsubst < ${APP_NAME}/application.yaml > application-new.yaml
cat application-new.yaml
kubectl apply -f application-new.yaml
'''
}
}
kubernetesDeploy(configs: "deploy/${APP_NAME}/*-sit.yaml", enableConfigSubstitution: true, kubeconfigId: "$KUBECONFIG_CREDENTIAL_ID")
}
}