-
Notifications
You must be signed in to change notification settings - Fork 1
/
.shippable.yml
49 lines (40 loc) · 1.63 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
47
48
49
language: php
php:
- 5.6
branches:
only:
- staging
- master
env:
global:
# Shippable API token used to trigger deploy
- secure: kKPo9i11eUP09DVVzEmT5SsAkd9SMXexAxLiTwBrLpFyLF6K4z4goZEHiIbCAFIiqKkJKXtDDneiCyprXCbxDbwnamxfMwOQsGliKiqDQ51m67ps+BtZa9WP6uPG/XfjC4pvTZS09f6w1+ufOgY/+CCKOb90Klp0HfAFar+c4d+RhJbQ3NfI/NBpXT1cLOhzrHyp0DKJpnOHPR102zeTmIdGuypj+SyodIX3qz6+C04iFRAtQCHkKPv3tbrHLIG/26VoNMqYk/s4BXiqJGYXmH4YMPW8GYLGrsQenxfKuGr8CrgsPP3VtaKctK7nz5S+xfQ1VxUP7c8d6E3xcT/Nvw==
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 the --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-subsite:$BRANCH || echo 'Cache not available'
- docker build --cache-from nrgi/rc-subsite:$BRANCH -t nrgi/rc-subsite:$BRANCH.$COMMIT .
# Create the `latest` tag and force it in case the tag is already there from a previous build
- docker tag nrgi/rc-subsite:$BRANCH.$COMMIT nrgi/rc-subsite:$BRANCH
- docker push nrgi/rc-subsite:$BRANCH
- docker push nrgi/rc-subsite:$BRANCH.$COMMIT
- ./shippable-deploy.sh
integrations:
hub:
- integrationName: nrgiDockerHub
type: dockerRegistryLogin
notifications:
- integrationName: email
type: email
recipients:
branches:
only:
- master
- staging
on_success: change
on_failure: always