Merge pull request #5471 from adamreese/v3/ci-refactor

ref(circleci): refactor ci setup
pull/5469/head
Adam Reese 6 years ago committed by GitHub
commit 927ab601cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,19 +0,0 @@
#!/usr/bin/env bash
# Copyright The Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -euo pipefail
apt-get update -y && apt-get install -yq zip
make bootstrap

@ -1,41 +1,42 @@
---
version: 2
jobs:
build:
working_directory: /go/src/helm.sh/helm
parallelism: 3
docker:
- image: circleci/golang:1.12
environment:
- PROJECT_NAME: "kubernetes-helm"
- GOCACHE: "/tmp/go/cache"
steps:
- checkout
- restore_cache:
key: gopkg-{{ .Branch }}-{{ checksum "Gopkg.lock" }}
paths:
- /go/src/helm.sh/helm/vendor
- run:
name: install dependencies
command: .circleci/bootstrap.sh
- save_cache:
key: gopkg-{{ .Branch }}-{{ checksum "Gopkg.lock" }}
paths:
- /go/src/helm.sh/helm/vendor
key: gopkg-{{ checksum "Gopkg.lock" }}
- restore_cache:
keys:
- build-cache-{{ .Branch }}-{{ .Environment.CIRCLE_PREVIOUS_BUILD_NUM }}
paths:
- /tmp/go/cache
- build-cache-{{ .Environment.CIRCLE_PREVIOUS_BUILD_NUM }}
- run:
name: test
command: .circleci/test.sh
command: make test-coverage
- save_cache:
key: gopkg-{{ checksum "Gopkg.lock" }}
paths:
- /go/src/helm.sh/helm/vendor
- /go/pkg/dep
- save_cache:
key: build-cache-{{ .Branch }}-{{ .Environment.CIRCLE_BUILD_NUM }}
key: build-cache-{{ .Environment.CIRCLE_BUILD_NUM }}
paths:
- /tmp/go/cache
- deploy:
name: deploy
command: .circleci/deploy.sh
workflows:
version: 2
build:

@ -70,6 +70,12 @@ test-unit: vendor
@echo "==> Running unit tests <=="
HELM_HOME=/no_such_dir go test $(GOFLAGS) -run $(TESTS) $(PKG) $(TESTFLAGS)
.PHONY: test-coverage
test-coverage: vendor
@echo
@echo "==> Running unit tests with coverage <=="
@ HELM_HOME=/no_such_dir ./scripts/coverage.sh
.PHONY: test-style
test-style: vendor $(GOLANGCI_LINT)
$(GOLANGCI_LINT) run

Loading…
Cancel
Save