-
Notifications
You must be signed in to change notification settings - Fork 833
/
config.yml
36 lines (36 loc) · 1.18 KB
/
config.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
version: 2
jobs:
build:
working_directory: /go/src/go.mozilla.org/sops
docker:
- image: circleci/golang:1.13
steps:
- checkout
- setup_remote_docker
- run:
name: Build containers
command: |
docker build -t mozilla/sops .
docker tag mozilla/sops "mozilla/sops:$CIRCLE_SHA1"
docker build -f Dockerfile.alpine -t mozilla/sops:alpine .
- run:
name: Push containers
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
${GOPATH}/src/go.mozilla.org/sops/bin/ci/deploy_dockerhub.sh "latest"
${GOPATH}/src/go.mozilla.org/sops/bin/ci/deploy_dockerhub.sh "$CIRCLE_SHA1"
fi
if [ -n "${CIRCLE_TAG}" ]; then
TAG="${CIRCLE_TAG#v}-alpine"
docker tag mozilla/sops:alpine mozilla/sops:${TAG}
${GOPATH}/src/go.mozilla.org/sops/bin/ci/deploy_dockerhub.sh "${TAG}"
${GOPATH}/src/go.mozilla.org/sops/bin/ci/deploy_dockerhub.sh "alpine"
fi
workflows:
version: 2
build:
jobs:
- build:
filters:
tags:
only: /.*/