-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
41 lines (41 loc) · 1.03 KB
/
Jenkinsfile
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
/* Requires the Docker Pipeline plugin */
pipeline {
agent { docker { image 'node:18.16.0-alpine' } }
environment {
HOST = "www.google.com"
}
stages {
stage('Build') {
steps {
sh 'node --version'
sh '''
echo "Multiline shell steps works too"
echo 1 > temp.txt
ls -lah
'''
retry(3) {
sh 'echo "retrying..."'
sh './retry.sh'
}
sh 'echo "HOST is ${HOST}"'
}
}
stage('Deploy - sainity check') {
steps {
//input "Does the staging environment look ok?"
sh 'echo OK'
}
}
}
post {
always { echo "One way or another, I have finished" }
success { echo "I succeeded!" }
unstable { echo "I am unstable :/" }
failure {
echo "I failed :("
echo "Filed Pipeline: ${currentBuild.fullDisplayName}"
echo "Something is wrong with ${env.BUILD_URL}"
}
changed { echo "Things were differet before..." }
}
}