Skip to content

Commit bc8c5e2

Browse files
authored
CircleCi project setup (#32)
Add .circleci/config.yml
1 parent 016eea2 commit bc8c5e2

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.circleci/config.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
version: 2.1
2+
orbs:
3+
docker: circleci/[email protected]
4+
jobs:
5+
test:
6+
docker:
7+
- image: circleci/golang:1.16
8+
working_directory: /go/src/github.com/pboehm/ddns
9+
steps:
10+
- checkout
11+
- run: go get -v -t -d ./...
12+
- run: go test -v ./...
13+
14+
docker-build:
15+
executor: docker/docker
16+
steps:
17+
- setup_remote_docker
18+
- checkout
19+
- docker/build:
20+
image: pboehm/ddns
21+
dockerfile: docker/ddns/Dockerfile
22+
23+
docker-build-and-push:
24+
executor: docker/docker
25+
steps:
26+
- setup_remote_docker
27+
- checkout
28+
- docker/check
29+
- docker/build:
30+
image: pboehm/ddns
31+
dockerfile: docker/ddns/Dockerfile
32+
- docker/push:
33+
image: pboehm/ddns
34+
tag: $CIRCLE_SHA1,latest
35+
36+
workflows:
37+
commit:
38+
jobs:
39+
- test:
40+
filters: # required since `docker-XXXX` have tag filters AND require `test`
41+
tags:
42+
only: /.*/
43+
44+
- docker-build:
45+
requires:
46+
- test
47+
filters:
48+
branches:
49+
ignore: master
50+
51+
- docker-build-and-push:
52+
requires:
53+
- test
54+
filters:
55+
branches:
56+
only: master

0 commit comments

Comments
 (0)