Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Commit

Permalink
add helm binary to integration test circleci and docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
laverya committed Jun 20, 2018
1 parent f0c39ce commit 0665cf0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
13 changes: 13 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,22 @@ jobs:
docker:
- image: circleci/golang:1.10
working_directory: /go/src/github.com/replicatedhq/ship
environment:
HELM_VERSION: "v2.9.1"
HELM_URL: "https://storage.googleapis.com/kubernetes-helm/helm-v2.9.1-linux-amd64.tar.gz"
HELM_TGZ: "helm-v2.9.1-linux-amd64.tar.gz"
HELM: "linux-amd64/helm"
HELM_SHA256SUM: "56ae2d5d08c68d6e7400d462d6ed10c929effac929fedce18d2636a9b4e166ba"
steps:
- checkout
- setup_remote_docker
- run: |
curl -fsSLO "${HELM_URL}" \
&& echo "${HELM_SHA256SUM} ${HELM_TGZ}" | sha256sum -c - \
&& tar xvf "$HELM_TGZ" \
&& sudo mv "$HELM" "/usr/local/bin/helm-${HELM_VERSION}" \
&& sudo ln -s "/usr/local/bin/helm-${HELM_VERSION}" /usr/local/bin/helm
- run: make integration-test

deploy_unstable:
Expand Down
12 changes: 8 additions & 4 deletions integration/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ ENV GOPATH=/go/
ADD . /go/src/github.com/replicatedhq/ship
RUN cd /go/src/github.com/replicatedhq/ship && go test -c ./integration

# package things up
FROM alpine
WORKDIR /test
RUN apk update && apk add ca-certificates && apk add curl

ENV HELM_VERSION=v2.9.1
ENV HELM_URL=https://storage.googleapis.com/kubernetes-helm/helm-v2.9.1-linux-amd64.tar.gz
Expand All @@ -18,9 +16,15 @@ RUN curl -fsSLO "${HELM_URL}" \
&& echo "${HELM_SHA256SUM} ${HELM_TGZ}" | sha256sum -c - \
&& tar xvf "$HELM_TGZ" \
&& mv "$HELM" "/usr/local/bin/helm-${HELM_VERSION}" \
&& ln -s "/usr/local/bin/helm-${HELM_VERSION}" /usr/local/bin/helm
&& cp "/usr/local/bin/helm-${HELM_VERSION}" /usr/local/bin/helm

# package things up
FROM alpine
WORKDIR /test

COPY --from=build-step /usr/local/bin/helm /usr/local/bin/helm
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*

ADD ./integration /test
RUN cd /test && rm *.go
COPY --from=build-step /go/src/github.com/replicatedhq/ship/integration.test /test/
Expand Down

0 comments on commit 0665cf0

Please sign in to comment.