Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to atlantis-base:2022.11.13 and use cimg/go:1.19 #2673

Merged
merged 10 commits into from
Nov 13, 2022
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/*")
Expand Down
7 changes: 5 additions & 2 deletions scripts/e2e-deps.sh
Original file line number Diff line number Diff line change
@@ -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...."
Expand All @@ -13,12 +16,12 @@ 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
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
cp .gitconfig ~/.gitconfig