forked from gct-faisal/bitnami-docker-nginx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
66 lines (64 loc) · 1.96 KB
/
circle.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
version: 2
jobs:
build:
working_directory: /workdir
docker:
- image: docker:17.06.0-ce-git
environment:
RELEASE_SERIES_LIST: "1.14"
LATEST_STABLE: "1.14"
IMAGE_NAME: nginx
CHART_NAME: nginx
CHART_REPO: https://github.com/bitnami/charts
DOCKER_PROJECT: bitnami
QUAY_PROJECT: bitnami
GCLOUD_PROJECT: bitnami-containers
AZURE_PROJECT: bitnami
steps:
- checkout
- setup_remote_docker:
version: 17.06.0-ce
- run:
name: Upgrade system packages (workaround - https://github.com/docker-library/docker/issues/72)
command: |
apk upgrade --no-cache
- run:
name: Install dependencies
command: |
apk add --no-cache curl bash coreutils
- run:
name: Docker info
command: |
docker version
docker info
- restore_cache:
keys:
- cache-{{ .Branch }}
paths:
- /cache/layers.tar
- run:
name: Build docker image
command: |
curl -sL https://raw.githubusercontent.com/bitnami/test-infra/master/circle/docker-image-test.sh | bash -
- save_cache:
key: cache-{{ .Branch }}-{{ epoch }}
paths:
- /cache/layers.tar
- deploy:
name: Publish docker image
command: |
if [ -n "${CIRCLE_TAG}" ]; then
curl -sL https://raw.githubusercontent.com/bitnami/test-infra/master/circle/docker-release-image.sh | bash -
elif [ "${CIRCLE_BRANCH}" == "master" ]; then
curl -sL https://raw.githubusercontent.com/bitnami/test-infra/master/circle/docker-development-image.sh | bash -
fi
workflows:
version: 2
build-and-deploy:
jobs:
- build:
filters:
branches:
only: /.*/
tags:
only: /^[0-9].*-r[0-9]+$/