forked from cloudbees-days/helloworld-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
37 lines (37 loc) · 912 Bytes
/
Jenkinsfile
File metadata and controls
37 lines (37 loc) · 912 Bytes
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
pipeline {
agent any
stages {
stage('Build') {
when {
beforeAgent true
branch 'development'
}
steps {
echo 'build'
writeFile file: "application.sh", text: "echo Built ${BUILD_ID} of ${JOB_NAME}"
archiveArtifacts 'application.sh'
gateProducesArtifact file: 'application.sh', label: 'Dummy artifact to be consumed by Deploy (master branch) gate'
}
}
stage('Test') {
when {
beforeAgent true
branch 'test'
}
steps {
copyArtifacts projectName: '../helloworld-api/development'
gateConsumesArtifact file: 'application.sh'
}
}
stage('Deploy') {
when {
beforeAgent true
branch 'master'
}
steps {
copyArtifacts projectName: '../helloworld-api/development'
gateConsumesArtifact file: 'application.sh'
}
}
}
}