-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from david-vavra/master
initial CircleCI kickoff, unify CHANGELOG version headers
- Loading branch information
Showing
4 changed files
with
216 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
version: 2 | ||
jobs: | ||
lint: | ||
docker: | ||
- image: circleci/golang:1.14 | ||
steps: | ||
- checkout | ||
- run: make lint | ||
|
||
test: | ||
docker: | ||
- image: circleci/golang:1.14 | ||
steps: | ||
- checkout | ||
- run: make test-and-coverage | ||
|
||
build: | ||
docker: | ||
- image: circleci/golang:1.14 | ||
steps: | ||
- checkout | ||
- run: make build SLO_EXPORTER_VERSION=${CIRCLE_TAG:-$CIRCLE_SHA1} | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- build | ||
|
||
build_docker: | ||
docker: | ||
- image: circleci/golang:1.14 | ||
steps: | ||
- checkout | ||
- setup_remote_docker: | ||
version: 17.07.0-ce | ||
- attach_workspace: | ||
at: . | ||
- run: cp build/linux-amd64/slo_exporter ./slo_exporter | ||
- run: make docker-build | ||
|
||
build_docker_release: | ||
docker: | ||
- image: circleci/golang:1.14 | ||
environment: | ||
DOCKERHUB_USERNAME=sklikdevops | ||
steps: | ||
- checkout | ||
- setup_remote_docker: | ||
version: 17.07.0-ce | ||
- attach_workspace: | ||
at: . | ||
- run: | ||
command: | | ||
cp build/linux-amd64/slo_exporter ./slo_exporter | ||
echo "${DOCKERHUB_PASSWORD}" | docker login -u="${DOCKERHUB_USERNAME}" --password-stdin | ||
export SLO_EXPORTER_VERSION=${CIRCLE_TAG:-$CIRCLE_SHA1} | ||
make docker-build | ||
make docker-push | ||
github_release: | ||
docker: | ||
- image: circleci/golang:1.14 | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: . | ||
- run: | ||
command: | | ||
export SLO_EXPORTER_VERSION=${CIRCLE_TAG:-$CIRCLE_SHA1} | ||
make github-release | ||
workflows: | ||
version: 2 | ||
slo-exporter: | ||
jobs: | ||
- lint | ||
- test | ||
- build: | ||
filters: | ||
tags: | ||
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/ | ||
- build_docker: | ||
requires: | ||
- build | ||
filters: | ||
tags: | ||
ignore: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/ | ||
- build_docker_release: | ||
requires: | ||
- build | ||
filters: | ||
tags: | ||
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/ | ||
branches: | ||
ignore: /.*/ | ||
- github_release: | ||
requires: | ||
- build | ||
filters: | ||
tags: | ||
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/ | ||
branches: | ||
ignore: /.*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.