Skip to content
This repository was archived by the owner on Mar 15, 2024. It is now read-only.

Commit bd3b6f6

Browse files
author
Michael Weber
committed
massively simplify CI build config
impact is 30sec build time increase
1 parent 0b33a24 commit bd3b6f6

File tree

1 file changed

+1
-54
lines changed

1 file changed

+1
-54
lines changed

.circleci/config.yml

Lines changed: 1 addition & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,6 @@ jobs:
1919
- GOCACHE: /tmp/go/cache
2020
steps:
2121
- checkout
22-
23-
- restore_cache:
24-
name: Restoring Cache for vendor
25-
key: gopkg-{{ arch }}-{{ .Branch }}-{{ checksum "Gopkg.lock" }}
26-
paths:
27-
- /go/src/github.com/splunk/vault-plugin-splunk/vendor
28-
- restore_cache:
29-
name: Restoring Cache for build
30-
keys:
31-
- build-cache-{{ arch }}-{{ .Branch }}-{{ .Environment.CIRCLE_PREVIOUS_BUILD_NUM }}
32-
paths:
33-
- /tmp/go/cache
34-
35-
- run:
36-
name: Build
37-
command: make build DEPFLAGS=-v
3822
- run:
3923
name: Wait for Splunk Container
4024
command: curl -4sSk --retry 40 --retry-connrefused --retry-delay 3 -o /dev/null ${SPLUNK_ADDR}
@@ -49,43 +33,14 @@ jobs:
4933
command: |
5034
export GOVERSION=$(go version | awk '{sub("^go","",$3);print $3;}')
5135
[ -n "$CIRCLE_TAG" ] || tagargs="--snapshot"
52-
scripts/goreleaser --rm-dist --skip-publish $tagargs
53-
rm -rf $(find ./dist/* -type d) dist/config.yaml || true
36+
scripts/goreleaser --rm-dist $tagargs
5437
- store_test_results:
5538
path: test-results/
5639
- store_artifacts:
5740
path: test-results/
5841
- store_artifacts:
5942
path: dist/
6043

61-
- save_cache:
62-
name: Saving Cache for vendor
63-
key: gopkg-{{ arch }}-{{ .Branch }}-{{ checksum "Gopkg.lock" }}
64-
paths:
65-
- /go/src/github.com/splunk/vault-plugin-splunk/vendor
66-
- save_cache:
67-
name: Saving Cache for build
68-
key: build-cache-{{ arch }}-{{ .Branch }}-{{ .Environment.CIRCLE_BUILD_NUM }}
69-
paths:
70-
- /tmp/go/cache
71-
72-
- persist_to_workspace:
73-
root: dist/
74-
paths: .
75-
76-
publish-github-release:
77-
docker:
78-
- image: circleci/golang:1.12
79-
steps:
80-
- attach_workspace:
81-
at: ./artifacts
82-
- run:
83-
name: "Publish Release on GitHub"
84-
command: |
85-
go get github.com/tcnksm/ghr
86-
TAG=v$(echo artifacts/vault-plugin-splunk_*_*.zip | awk -F_ '{print $2;exit;}')
87-
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -recreate ${TAG} ./artifacts/
88-
8944
workflows:
9045
version: 2
9146
workflow:
@@ -94,11 +49,3 @@ workflows:
9449
filters:
9550
tags:
9651
only: /^v\d+\.\d+\.\d+$/
97-
- publish-github-release:
98-
requires:
99-
- build
100-
filters:
101-
branches:
102-
ignore: /.*/
103-
tags:
104-
only: /^v\d+\.\d+\.\d+$/

0 commit comments

Comments
 (0)