-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitbucket-pipelines.yml
97 lines (96 loc) · 2.63 KB
/
bitbucket-pipelines.yml
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# This project uses the GitFlow Workflow as defined here:
# https://www.atlassian.com/git/tutorials/comparing-workflows#GitFlow-workflow
image: hspconsortium/hspc-ubuntu-base
clone: # the 'clone' section
depth: 1 # the depth, in this case the clone will contain last one commits
pipelines:
default:
- step:
script:
- echo "Please use a GitFlow branch"
- exit 1;
branches:
develop:
- step:
name: build docker and upload to docker hub
caches:
- node
script:
- export TARGET_ENV=test
- cd ci
- . ci-0-set-properties.sh
- . ci-1-prepare-sources.sh
- . ci-2-build-project.sh
- . ci-3-docker-image.sh
artifacts:
- aws/task-definition.json
- step:
name: update the aws task definition
caches:
- node
script:
- export TARGET_ENV=test
- cd ci
- . ci-0-set-properties.sh
- . ci-4-aws-task-update.sh
- step:
name: update the aws service
deployment: test
caches:
- node
script:
- export TARGET_ENV=test
- cd ci
- . ci-0-set-properties.sh
- . ci-5-aws-service-update.sh
master:
- step:
name: build docker and upload to docker hub
caches:
- node
script:
- export TARGET_ENV=prod
- cd ci
- . ci-0-set-properties.sh
- . ci-1-prepare-sources.sh
- . ci-2-build-project.sh
- . ci-3-docker-image.sh
artifacts:
- aws/task-definition.json
- step:
name: update the aws task definition
caches:
- node
script:
- export TARGET_ENV=prod
- cd ci
- . ci-0-set-properties.sh
- . ci-4-aws-task-update.sh
- step:
name: update the aws service
deployment: production
trigger: manual
caches:
- node
script:
- export TARGET_ENV=prod
- cd ci
- . ci-0-set-properties.sh
- . ci-5-aws-service-update.sh
feature/*:
- step:
name: build the source code
script:
- echo "success"
release/*:
- step:
name: build the source code
script:
- echo "success"
hotfix/*:
- step:
name: build the source code
script:
- echo "success"
options:
docker: true