-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
81 lines (71 loc) · 1.48 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
pipeline {
agent any
options {
timestamps()
timeout(time: 15, unit: 'MINUTES')
}
// libraries {
// lib('jenkins-library')
// }
parameters {
string(name: 'VERSION', description: 'Specify artefact version')
booleanParam(
name: 'RELEASE',
defaultValue: false,
description: 'This version will be served as \'release\' target',
)
}
environment {
chatChannel = 'jenkins_deploy'
ARTEFACT_FILE = "schedulebeta-${params.VERSION}.tgz"
VERSION_URL = "https://d14zqdqr03kypy.cloudfront.net/${params.VERSION}"
RELEASE_URL = "https://d14zqdqr03kypy.cloudfront.net/release"
}
stages {
stage('Approve') {
input {
message "Deploying schedulebeta version ${params.VERSION}. Would you like to proceed ?"
submitterParameter "APPROVER"
}
steps {
script {
env.APPROVER = env.APPROVER
}
}
}
stage('Start') {
steps {
echo 'Starting deploy ...'
}
}
stage('Artefact Download') {
steps {
echo 'Getting artefact ...'
}
}
stage(Deploy) {
failFast true
parallel {
stage('Version Upload') {
steps {
echo 'Uploading version ...'
}
}
stage('Release Upload') {
when { expression { return params.RELEASE }}
steps {
echo 'Uploading release ...'
}
}
}
}
}
post {
always {
echo 'Notify build status ...'
}
cleanup {
cleanWs()
}
}
}