-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathJenkinsfile
52 lines (43 loc) · 1007 Bytes
/
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
pipeline {
agent none
options {
timestamps()
disableConcurrentBuilds()
preserveStashes(buildCount: 5)
}
environment {
AWS_DEFAULT_REGION='eu-west-1'
SERVICE="showcar-icons"
}
stages {
stage('Build') {
agent { node { label 'build-as24assets' } }
steps {
sh 'echo "Build some stuff..."'
sh './deploy/build.sh'
stash includes: 'dist/**/*', name: 'output-dist'
}
}
stage('DeployProd') {
when {
beforeAgent true
branch 'master'
}
environment {
BRANCH="master"
}
agent { node { label 'deploy-as24assets' } }
steps {
sh 'echo "DeployProd..."'
unstash 'output-dist'
sh './deploy/deploy.sh'
}
}
}
post {
failure {
echo 'Pipeline failed 💣'
slackSend channel: 'ug-activation-alerts', color: '#FF0000', message: "💣 ${env.JOB_NAME} [${env.BUILD_NUMBER}] failed. (<${env.BUILD_URL}|Open>)"
}
}
}