diff --git a/.circleci/config.yml b/.circleci/config.yml index 1f549023e..20afe6dd8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,23 +12,6 @@ references: apk --update add bash jq jobs: - # Because kind doesn't publish a proper binary, and we - # can't really install golang in alpine without pain, - # we build the kind binary from source and cache it. - build-kind: - docker: - - image: golang:1.12-stretch - steps: - - run: - name: Get and Build Kind - command: | - mkdir /binaries - go get sigs.k8s.io/kind - cp /go/bin/kind /binaries/kind - - save_cache: - key: v3-binaries - paths: - - /binaries lint-scripts: docker: - image: koalaman/shellcheck-alpine:v0.6.0 @@ -69,10 +52,14 @@ jobs: name: Setup e2e Environment command: | cp /binaries/kind /usr/local/bin/kind + curl -LO https://github.com/kubernetes-sigs/kind/releases/download/0.2.1/kind-darwin-amd64 + chmod +x kind-darwin-amd64 + mv kind-darwin-amd64 /usr/local/bin scripts/e2e-test.sh setup - run: name: Run e2e tests - command: scripts/e2e-test.sh test "$CIRCLE_BRANCH" + command: | + scripts/e2e-test.sh test "$CIRCLE_BRANCH" - run: name: Teardown e2e Environment command: scripts/e2e-test.sh teardown @@ -91,14 +78,12 @@ workflows: jobs: - lint-scripts - lint-charts - - build-kind - e2e-tests: filters: branches: ignore: - master requires: - - build-kind - lint-scripts - lint-charts - sync: diff --git a/incubator/capsize/Chart.yaml b/incubator/capsize/Chart.yaml index e0dc47e53..837d9e121 100644 --- a/incubator/capsize/Chart.yaml +++ b/incubator/capsize/Chart.yaml @@ -2,6 +2,6 @@ apiVersion: v1 appVersion: "1.0" description: A Helm chart to restart deployments at an interval name: capsize -version: 0.1.0 +version: 0.1.1 maintainers: - name: sudermanjr diff --git a/scripts/e2e-test.sh b/scripts/e2e-test.sh index 8b1b56489..07e8e7eda 100755 --- a/scripts/e2e-test.sh +++ b/scripts/e2e-test.sh @@ -24,7 +24,7 @@ CI_REF="${2:-master}" TEST_CLUSTER_NAME="${3:-helm-e2e}" TILLER_NAMESPACE="${TILLER_NAMESPACE:-helm-system}" EXEC_CONTAINER_NAME="${4:-executor}" -CHART_TEST_VERSION="v3.2.0" +CHART_TEST_VERSION="v3.3.2" setup_cluster () { printf "Creating cluster %s. This could take a minute...\n" "$TEST_CLUSTER_NAME" @@ -88,9 +88,14 @@ prep_tests () { fi docker exec "$EXEC_CONTAINER_NAME" sh -c 'helm version' + docker exec "$EXEC_CONTAINER_NAME" sh -c 'git clone https://github.com/reactiveops/charts && cd charts && git remote add ro https://github.com/reactiveops/charts &> /dev/null || true' docker exec "$EXEC_CONTAINER_NAME" sh -c 'cd charts && git fetch ro master' - docker exec "$EXEC_CONTAINER_NAME" sh -c "cd charts && git checkout $CI_REF" + if [ -z "${CIRCLE_PR_NUMBER:-}" ]; then + docker exec "$EXEC_CONTAINER_NAME" sh -c "cd charts && git checkout $CI_REF" + else + docker exec "$EXEC_CONTAINER_NAME" sh -c "cd charts && git fetch origin pull/$CIRCLE_PR_NUMBER/head:pr/$CIRCLE_PR_NUMBER && git checkout pr/$CIRCLE_PR_NUMBER" + fi } prep_tests_local () {