This repository has been archived by the owner on Oct 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
/
buildJenkinsfile
76 lines (74 loc) · 2.02 KB
/
buildJenkinsfile
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
@Library(value='[email protected]', changelog=false) _
def p
def deployConfigs
pipeline {
agent {
node {
label 'team:iow'
}
}
parameters {
choice(choices: ['snapshots'], description: 'type of build', name: 'BUILD_TYPE')
}
triggers {
pollSCM('H/5 * * * *')
}
stages {
stage('clean workspace') {
steps {
script {
pipelineUtils.cleanWorkspace()
}
}
}
stage('checkout source') {
steps {
script {
// clone the repo
pipelineUtils.cloneGitRepo()
}
script {
p = pipelineCfg('pipeline.yml')
}
}
}
stage('create virtualenv') {
steps {
script {
pipelineUtils.setUpPythonVirtualEnv()
pipelineUtils.pipInstall('--only-binary=bumpversion bumpversion==0.5.3 requests boto3 pyyaml chevron')
}
}
}
stage('pull scripts') {
steps {
script {
pipelineUtils.pullEcsScripts()
}
}
}
stage('build assets docker image') {
steps {
script {
pipelineUtils.buildDockerImage('assets', './assets')
}
}
}
stage('build server docker image') {
steps {
script {
version = pipelineUtils.bumpVersion(params.BUILD_TYPE)
buildConfigs = p['docker_build'] ?: [p]
deployConfigs = dockerPipeline.buildPublishAndCleanUpDockerImages(buildConfigs, version)
}
}
}
stage('deploy image') {
steps {
script {
dockerPipeline.deployImages(deployConfigs)
}
}
}
}
}