Update Jenkinsfile
This commit is contained in:
40
Jenkinsfile
vendored
40
Jenkinsfile
vendored
@@ -1,42 +1,24 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent none
|
agent none
|
||||||
stages {
|
stages {
|
||||||
stage('Select micro services') {
|
stage('build') {
|
||||||
input {
|
|
||||||
message "Select all micro services to deploy"
|
|
||||||
ok "All selected!"
|
|
||||||
parameters {
|
|
||||||
choice(name: 'MS1', choices: ['1.1.0', '1.2.0', '1.3.0'], description: 'input ms')
|
|
||||||
choice(name: 'MS2', choices: ['1.1.0', '1.2.0', '1.3.0'], description: 'input ms')
|
|
||||||
choice(name: 'MS3', choices: ['1.1.0', '1.2.0', '1.3.0'], description: 'input ms')
|
|
||||||
choice(name: 'MS4', choices: ['1.1.0', '1.2.0', '1.3.0'], description: 'input ms')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
echo "Hello, ${MS1}. Hello, ${MS2}. Hello, ${MS3}. Hello, ${MS4}"
|
echo "Building the application..."
|
||||||
echo "nbblbaa"
|
|
||||||
MS1_TO_DEPLOY = MS1
|
|
||||||
MS2_TO_DEPLOY = MS2
|
|
||||||
env.MS3_TO_DEPLOY = MS3
|
|
||||||
env.MS4_TO_DEPLOY = MS4
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Select single service') {
|
stage('test') {
|
||||||
input {
|
|
||||||
message "Select single micro services to deploy?"
|
|
||||||
parameters {
|
|
||||||
choice(name: 'MS5', choices: ['1.1.0', '1.2.0', '1.3.0'], description: 'second param with single option')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
echo "Hello, ${MS5}."
|
echo "Testing the application..."
|
||||||
env.MS5_TO_DEPLOY = MS5
|
}
|
||||||
echo "${MS1_TO_DEPLOY}"
|
}
|
||||||
echo "${MS4_TO_DEPLOY}"
|
}
|
||||||
echo "${MS5_TO_DEPLOY}"
|
stage('deploy') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
echo "Deploying the application..."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user