-
Notifications
You must be signed in to change notification settings - Fork 9
/
shippable.yml
46 lines (38 loc) · 1.47 KB
/
shippable.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
language: none
branches:
only:
- staging
- master
env:
global:
# Shippable API token used to trigger deploy
- secure: HQVobaonseebLJ9GOR5pYjnEKG8m9aWVwr5RIr9zIHwVqBbZnkUZBhXms7k7Qa9KT8jalol4rFXvwSOPse5Pl/rzCmWm4o2UJzUNRf+iTRGsj6IFkrM6uaysKH3yZOI8qZarI/qLcGtdoQA3cQ5qKWLfwCia8VwoK1Gr368DUo/hle5m5PYAmIQEFZii/iabjzzrembK0phzmHfwinR43LL4jwIOLk3AAsWhLSxLZUhtGR5hDu6pdj6YIPExPemQ+B/3tbR5NlN7Z1/2/1Jht8NN69pa5/3Dq6ryEhUI5WHtbDpqHNhQE774Xr8u6y8WjPFo7kU/63XSrweP4EDyAQ==
build:
ci:
# Create the version file
- ./create_version.sh
# Get the latest image to reuse its cache. Will not work with Docker 1.10 . Docker 1.13 adds support with --cache-from flag
# Prevent build failure in case there is no latest image for the current branch with a conditional `echo`.
- docker pull nrgi/rc-admin:$BRANCH || echo 'Cache not available'
- docker build -t nrgi/rc-admin:$BRANCH.$COMMIT .
# Create the `latest` tag
- docker tag nrgi/rc-admin:$BRANCH.$COMMIT nrgi/rc-admin:$BRANCH
- docker push nrgi/rc-admin:$BRANCH
- docker push nrgi/rc-admin:$BRANCH.$COMMIT
- ./shippable-deploy.sh
integrations:
hub:
- integrationName: nrgiDockerHub
type: docker
notifications:
- integrationName: email
type: email
recipients:
branches:
only:
- master
- staging
on_success: change
on_failure: always