diff --git a/.circleci/config.yml b/.circleci/config.yml index 10ef5de25..c94441699 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -70,7 +70,7 @@ executors: go: working_directory: /go/src/github.com/hashicorp/nomad docker: - - image: hashicorpnomad/ci-build-image:20190812 + - image: hashicorpnomad/ci-build-image:20190823 go-machine: working_directory: ~/go/src/github.com/hashicorp/nomad machine: @@ -243,7 +243,7 @@ commands: parameters: version: type: string - default: "1.12.7" + default: "1.12.9" steps: - run: name: install golang << parameters.version >> diff --git a/Dockerfile.ci b/Dockerfile.ci index 103b87af0..a7cb97714 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -1,4 +1,4 @@ -FROM circleci/golang:1.12.7 +FROM circleci/golang:1.12.9 ENV PROTOC_VERSION 3.6.1 ENV VAULT_VERSION 1.1.0 ENV CONSUL_VERSION 1.4.0 @@ -8,11 +8,6 @@ RUN sudo apt-get update \ && sudo apt-get install -y unzip \ && sudo rm -rf /var/lib/apt/lists/* -## Add the git repo and run bootstrap to install CI dependencies, then remove -## the extra checkout to save image size. -COPY . /tmp/build -RUN cd /tmp/build && sudo chown -R $(whoami) /tmp/build && make bootstrap && rm -rf /tmp/build - RUN wget -q -O /tmp/protoc.zip https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip \ && unzip /tmp/protoc.zip -d /tmp/protoc3 \ && sudo mv /tmp/protoc3/bin/* /usr/local/bin/ \ @@ -28,3 +23,9 @@ RUN wget -q -O /tmp/consul.zip https://releases.hashicorp.com/consul/${CONSUL_VE && sudo unzip -d /usr/local/bin /tmp/consul.zip \ && rm -rf /tmp/consul* +## Add the git repo and run bootstrap to install CI dependencies, then remove +## the extra checkout to save image size. +COPY GNUmakefile /tmp/build/GNUmakefile +COPY scripts /tmp/build/scripts +RUN cd /tmp/build && sudo chown -R $(whoami) /tmp/build && make deps lint-deps && rm -rf /tmp/build + diff --git a/GNUmakefile b/GNUmakefile index 2f1db2abf..f1a1a1c23 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -382,7 +382,8 @@ ui-screenshots-local: @cd scripts/screenshots/src && SCREENSHOTS_DIR="../screenshots" node index.js .PHONY: ci-image +ci-image: IMAGE_TAG=$(shell date +%Y%m%d) ci-image: - @echo "==> Building CI Image hashicorpnomad/ci-build-image:$(date %Y%m%d)" - @docker build . -f Dockerfile.ci -t hashicorpnomad/ci-build-image:$(date %Y%m%d) - @echo "To push the image, run `docker push -t hashicorpnomad/ci-build-image:$(date %Y%m%d)" + @echo "==> Building CI Image hashicorpnomad/ci-build-image:$(IMAGE_TAG)" + @docker build . -f Dockerfile.ci -t hashicorpnomad/ci-build-image:$(IMAGE_TAG) + @echo "To push the image, run 'docker push -t hashicorpnomad/ci-build-image:$(IMAGE_TAG)'"