-
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.
- Loading branch information
Showing
1 changed file
with
83 additions
and
0 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,83 @@ | ||
# Golang CircleCI 2.0 configuration file | ||
# | ||
# Check https://circleci.com/docs/2.0/language-go/ for more details | ||
version: 2 | ||
jobs: | ||
test: | ||
docker: | ||
- image: circleci/golang:1.12 | ||
environment: | ||
- GO111MODULE: "on" | ||
- KIBANA_URL: "http://kb:5601" | ||
- KIBANA_USERNAME: "elastic" | ||
- KIBANA_PASSWORD: "changeme" | ||
- image: docker.elastic.co/elasticsearch/elasticsearch:7.4.0 | ||
name: es | ||
environment: | ||
- cluster.name: "test" | ||
- discovery.type: "single-node" | ||
- ELASTIC_PASSWORD: "changeme" | ||
- xpack.security.enabled: "true" | ||
- ES_JAVA_OPTS: "-Xms512m -Xmx512m" | ||
- path.repo: "/tmp" | ||
- image: docker.elastic.co/kibana/kibana:7.4.0 | ||
name: kb | ||
environment: | ||
ELASTICSEARCH_HOSTS: http://es:9200 | ||
ELASTICSEARCH_USERNAME: elastic | ||
ELASTICSEARCH_PASSWORD: changeme | ||
working_directory: /go/src/github.com/disaster37/terraform-provider-kibana | ||
steps: | ||
- checkout | ||
- run: until $(curl --output /dev/null --silent --head --fail -u elastic:changeme http://kb:5601); do sleep 5; done | ||
- run: curl -XPOST -u elastic:changeme http://es:9200/_license/start_trial?acknowledge=true | ||
- run: make testacc | ||
build: | ||
docker: | ||
- image: circleci/golang:1.12 | ||
environment: | ||
- GO111MODULE: "on" | ||
working_directory: /go/src/github.com/disaster37/terraform-provider-kibana | ||
steps: | ||
- checkout | ||
- run: make build | ||
release: | ||
docker: | ||
- image: circleci/golang:1.12 | ||
environment: | ||
- GO111MODULE: "on" | ||
- GITHUB_TOKEN: $GITHUB_TOKEN | ||
- CIRCLE_PROJECT_USERNAME: $CIRCLE_PROJECT_USERNAME | ||
- CIRCLE_PROJECT_REPONAME: $CIRCLE_PROJECT_REPONAME | ||
- CIRCLE_TAG: $CIRCLE_TAG | ||
working_directory: /go/src/github.com/disaster37/terraform-provider-kibana | ||
steps: | ||
- checkout | ||
- run: go get github.com/mitchellh/gox | ||
- run: go get github.com/tcnksm/ghr | ||
- run: gox -os="freebsd darwin linux windows" -arch "386 amd64" -parallel=1 -output "dist/terraform-provider-kibana_${CIRCLE_TAG}_{{.OS}}_{{.Arch}}" | ||
- run: CGO_ENABLED=0 gox -os="freebsd darwin linux windows" -arch "386 amd64" -parallel=1 -output "dist/terraform-provider-kibana_${CIRCLE_TAG}_{{.OS}}_{{.Arch}}_static" | ||
- run: ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME $CIRCLE_TAG dist/ | ||
workflows: | ||
version: 2 | ||
build-workflow: | ||
jobs: | ||
- test: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- build: | ||
requires: | ||
- test | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- release: | ||
context: Github | ||
requires: | ||
- build | ||
filters: | ||
tags: | ||
only: /.*/ | ||
branches: | ||
ignore: /.*/ |