diff --git a/.circleci/config.yml b/.circleci/config.yml index 3f56e4e68..1a3393c27 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,6 +2,7 @@ version: 2 jobs: test: docker: + # TODO: fix tests to use ghcr.io/runatlantis/testing-env:2022.11.13 - image: ghcr.io/runatlantis/testing-env:2021.08.31 steps: - checkout @@ -10,8 +11,7 @@ jobs: - run: make check-lint e2e: docker: - # TODO: use image: cimg/go:1.19 - - image: circleci/golang:1.19 # If you update this, update it in the Makefile too + - image: cimg/go:1.19 # If you update this, update it in the Makefile too environment: # This version of TF will be downloaded before Atlantis is started. # We do this instead of setting --default-tf-version because setting diff --git a/Dockerfile b/Dockerfile index dc11f8dca..e1478f190 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ RUN CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -v -o atlantis . # Stage 2 # The runatlantis/atlantis-base is created by docker-base/Dockerfile. -FROM ghcr.io/runatlantis/atlantis-base:2022.10.14 AS base +FROM ghcr.io/runatlantis/atlantis-base:2022.11.13 AS base # Get the architecture the image is being built for ARG TARGETPLATFORM diff --git a/Makefile b/Makefile index 0a1b983e7..12b292b70 100644 --- a/Makefile +++ b/Makefile @@ -55,7 +55,7 @@ dist: ## Package up everything in static/ using go-bindata-assetfs so it can be rm -f server/static/bindata_assetfs.go && go-bindata-assetfs -o bindata_assetfs.go -pkg static -prefix server server/static/... && mv bindata_assetfs.go server/static release: ## Create packages for a release - docker run -v $$(pwd):/go/src/github.com/runatlantis/atlantis circleci/golang:1.19 sh -c 'cd /go/src/github.com/runatlantis/atlantis && scripts/binary-release.sh' + docker run -v $$(pwd):/go/src/github.com/runatlantis/atlantis cimg/go:1.19 sh -c 'cd /go/src/github.com/runatlantis/atlantis && scripts/binary-release.sh' fmt: ## Run goimports (which also formats) goimports -w $$(find . -type f -name '*.go' ! -path "./vendor/*" ! -path "./server/static/bindata_assetfs.go" ! -path "**/mocks/*") diff --git a/scripts/e2e-deps.sh b/scripts/e2e-deps.sh index 6791d918f..e1759b903 100755 --- a/scripts/e2e-deps.sh +++ b/scripts/e2e-deps.sh @@ -1,5 +1,8 @@ #!/usr/bin/env bash +# Exit immediately if a command returns a non-zero code +set -e + echo "Preparing to run e2e tests" if [ ! -f atlantis ]; then echo "atlantis binary not found. exiting...." @@ -13,7 +16,7 @@ cd e2e/ curl -LOk https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip unzip terraform_${TERRAFORM_VERSION}_linux_amd64.zip chmod +x terraform -cp terraform /go/bin/ +cp terraform /home/circleci/go/bin # Download ngrok to create a tunnel to expose atlantis server wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip unzip ngrok-stable-linux-amd64.zip @@ -21,4 +24,4 @@ chmod +x ngrok wget https://stedolan.github.io/jq/download/linux64/jq chmod +x jq # Copy github config file - replace with circleci user later -cp .gitconfig ~/.gitconfig \ No newline at end of file +cp .gitconfig ~/.gitconfig