forked from daticahealth/java-war-deploy-example
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVariabletest
More file actions
42 lines (39 loc) · 1.1 KB
/
Variabletest
File metadata and controls
42 lines (39 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
pipeline{
agent {
label 'node11'
}
environment {
Name = "test"
}
parameters {
booleanParam defaultValue: true, name: 'value'
choice choices: ['DEV', 'VAL', 'PROD', 'TRAIN'], name: 'Env'
string defaultValue: 'abc', name: 'Tester'
}
stages {
stage('Variable-demo') {
environment {
Name1 = "testing stage"
}
steps {
// One or more stages need to be included within the stages block.
echo "job is ${env.JOB_NAME} and build id is ${env.BUILD_ID}"
echo "name is $Name"
echo "name in stage is $Name1"
echo "user name from parameter is ${params.Tester}"
echo "env name from parameter is ${params.Env}"
echo "bool name from parameter is ${params.value}"
}
}
stage('Variable-demo2') {
steps {
// One or more stages need to be included within the stages block.
echo "job is ${env.JOB_NAME} and build id is ${env.BUILD_ID}"
echo "name is $Name"
echo "user name from parameter is ${Tester}"
echo "env name from parameter is ${Env}"
echo "bool name from parameter is ${value}"
}
}
}
}