Skip to content

Commit 56f72dc

Browse files
authored
Update pipeline-with-4-stages
1 parent e2c26db commit 56f72dc

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

pipeline-with-4-stages

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ pipeline{
2929
}
3030
steps{
3131
git branch: 'main', url: 'https://github.com/BinduPrivate/java-example.git'
32-
echo 'Hello!!this is user: $STRING'
33-
echo 'checking from the environment: $CHOICE'
34-
echo 'my boolean value is:$BOOLEAN'
32+
echo "Hello!!this is user: '$STRING'"
33+
echo "checking from the environment: '$CHOICE'"
34+
echo "my boolean value is:'$BOOLEAN'"
3535
}
3636
}
3737
stage('Test'){
3838
agent {label 'java'}
3939
steps{
40-
echo 'Running job ${env.JOB_NAME} on build_id ${env.BUILD_ID} on machine ${env.JENKINS_URL} and build triggered by ${env.USER}'
40+
echo "Running job '${env.JOB_NAME}' on build_id '${env.BUILD_ID}' on machine '${env.JENKINS_URL}' and build triggered by '${env.USER}'"
4141
}
4242
}
4343
stage('Build'){
@@ -48,7 +48,7 @@ pipeline{
4848
}
4949
steps{
5050
echo 'bulding artifacts'
51-
echo 'my aws access key is:: $AWS_ACCESS_KEY'
51+
echo "my aws access key is:: '$AWS_ACCESS_KEY'"
5252

5353
}
5454
}
@@ -59,13 +59,14 @@ pipeline{
5959
}
6060
steps{
6161
echo 'deploying artifacts to environment'
62-
echo 'my github username and password is :: $GITHUB_CRED'
62+
echo "my github username and password is :: '$GITHUB_CRED'"
6363
}
6464
}
6565
}
6666
post {
6767
always {
68-
mail body: '''Build Successful the Job: ${env.JOB_NAME} build number Build #: ${env.BUILD_NUMBER}\ncheck the details by clicking the link Job URL: ${env.BUILD_URL}''', subject: 'pipeline success',
68+
mail body: "Build Successful the Job: '${env.JOB_NAME}' build number Build #: '${env.BUILD_NUMBER}'\ncheck the details by clicking the link Job URL: '${env.BUILD_URL}'"
69+
subject: 'pipeline success'
6970
7071
}
7172
}

0 commit comments

Comments
 (0)