diff --git a/.circleci/config.yml b/.circleci/config.yml index e8753fd8..e5aa5a13 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,6 +7,7 @@ jobs: - image: circleci/golang:1.12.4 environment: GOPATH: /go + working_directory: /home/circleci/workspace/helmfile steps: - checkout - restore_cache: @@ -29,6 +30,7 @@ jobs: GOPATH: /go docker: - image: circleci/golang:1.12.4 + working_directory: /home/circleci/workspace/helmfile steps: - checkout - restore_cache: @@ -89,16 +91,21 @@ jobs: release: docker: - - image: circleci/golang:1.12.1 - working_directory: /go/src/github.com/roboll/helmfile + - image: circleci/golang:1.12.4 + working_directory: /home/circleci/workspace/helmfile steps: - checkout + - restore_cache: + keys: + - go-mod-cache-v1-{{ checksum "./go.sum" }} + - go-mod-cache-v1- - setup_remote_docker - run: command: | docker login -u="$DOCKER_USER" -p="$DOCKER_PASS" quay.io make tools - BUILD_URL="$CIRCLE_BUILD_URL" make push release + go mod vendor + ORG=roboll BUILD_URL="$CIRCLE_BUILD_URL" make push release workflows: version: 2 diff --git a/Dockerfile b/Dockerfile index 11685223..b4febe44 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ FROM golang:1.12.4-alpine3.9 as builder RUN apk add --no-cache make git -WORKDIR /go/src/github.com/roboll/helmfile/ -COPY . /go/src/github.com/roboll/helmfile/ +WORKDIR /workspace/helmfile +COPY . /workspace/helmfile RUN make static-linux # ----------------------------------------------------------------------------- @@ -24,6 +24,6 @@ RUN mkdir -p "$(helm home)/plugins" RUN helm plugin install https://github.com/databus23/helm-diff && \ helm plugin install https://github.com/futuresimple/helm-secrets -COPY --from=builder /go/src/github.com/roboll/helmfile/dist/helmfile_linux_amd64 /usr/local/bin/helmfile +COPY --from=builder /workspace/helmfile/dist/helmfile_linux_amd64 /usr/local/bin/helmfile CMD ["/usr/local/bin/helmfile"]