Skip to content

Commit

Permalink
Merge branch 'release/0.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
disaster37 committed Oct 16, 2019
2 parents 4e37bd8 + a679e23 commit 739e99d
Showing 1 changed file with 83 additions and 0 deletions.
83 changes: 83 additions & 0 deletions .circleci/config.yml
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: /.*/

0 comments on commit 739e99d

Please sign in to comment.