forked from janeczku/rancher-letsencrypt
-
Notifications
You must be signed in to change notification settings - Fork 1
/
circle.yml
46 lines (42 loc) · 1.42 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
machine:
environment:
IMPORT_PATH: "github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME"
DOCKER_HUB_URI: https://registry.hub.docker.com/u/janeczku/rancher-letsencrypt/trigger
general:
build_dir: ../.go_workspace/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}
artifacts:
- "dist/*.tar.gz"
- "dist/*.sha512"
dependencies:
pre:
- go version
- rm -rf ~/.go_workspace/src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME
- mkdir -p ~/.go_workspace/src/github.com/$CIRCLE_PROJECT_USERNAME/
- ln -s ~/$CIRCLE_PROJECT_REPONAME ~/.go_workspace/src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME
- make deps
override:
- echo "deps are vendored don't run go build"
post:
- git config user.name "Circle CI Build Bot"
- git config user.email "[email protected]"
- git remote -v
- git fetch --tags
- git describe --abbrev=0 --tags
test:
pre:
- make vet
override:
- make test
post:
- make ci-dist
deployment:
release:
tag: /v.*/
owner: janeczku
commands:
- make ci-release
- curl --data "docker_tag=latest" -X POST ${DOCKER_HUB_URI}/${DOCKER_HUB_TOKEN}/
- sleep 120
- curl --data "source_type=Tag&source_name=${CIRCLE_TAG}" -X POST ${DOCKER_HUB_URI}/${DOCKER_HUB_TOKEN}/
- echo `git name-rev --tags --name-only $(git rev-parse HEAD)`
- echo tag ${CIRCLE_TAG}