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

Use go 1.19 #2670

Merged
merged 2 commits into from
Nov 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- run: make check-lint
e2e:
docker:
- image: circleci/golang:1.17 # 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 .github/workflows/atlantis-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.19

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.19

- name: Run GoReleaser for stable release
uses: goreleaser/goreleaser-action@v3
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ golangci-lint
atlantis
.devcontainer
atlantis.env
*.act

# gitreleaser
dist/
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.17 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
15 changes: 4 additions & 11 deletions docker-base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This Dockerfile builds our base image with gosu, dumb-init and the atlantis
# user. We split this from the main Dockerfile because this base doesn't change
# and also because it kept breaking the build due to flakiness.
FROM alpine:3.16.2
FROM alpine:3.16.3
LABEL authors="Anubhav Mishra, Luke Kysow"

# We use gosu to step down from root and run as the atlantis user so we need
Expand All @@ -27,8 +27,8 @@ ARG TARGETPLATFORM
# Install packages needed for running Atlantis.
RUN apk add --no-cache \
ca-certificates=20220614-r0 \
curl=7.83.1-r3 \
git=2.36.2-r0 \
curl=7.83.1-r4 \
git=2.36.3-r0 \
unzip=6.0-r9 \
bash=5.1.16-r2 \
openssh=9.0_p1-r2 \
Expand All @@ -38,10 +38,9 @@ RUN apk add --no-cache \
# Install packages needed for building dependencies.
apk add --no-cache --virtual .build-deps \
gnupg=2.2.35-r4 \
openssl=1.1.1q-r0 && \
openssl=1.1.1s-r0 && \
mkdir -p /tmp/build && \
cd /tmp/build && \

# git-lfs
case ${TARGETPLATFORM} in \
"linux/amd64") GIT_LFS_ARCH=amd64 ;; \
Expand All @@ -53,7 +52,6 @@ RUN apk add --no-cache \
chmod +x git-lfs && \
mv git-lfs /usr/bin/git-lfs && \
git-lfs --version && \

# gosu
case ${TARGETPLATFORM} in \
"linux/amd64") GOSU_ARCH=amd64 ;; \
Expand All @@ -73,15 +71,10 @@ RUN apk add --no-cache \
chmod +x gosu && \
cp gosu /bin && \
gosu --version && \

# Cleanup
cd /tmp && \
rm -rf /tmp/build && \
gpgconf --kill dirmngr && \
gpgconf --kill gpg-agent && \
apk del .build-deps && \
rm -rf /root/.gnupg

# Set up nsswitch.conf for Go's "netgo" implementation
# - https://github.com/golang/go/blob/go1.9.1/src/net/conf.go#L194-L275
RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf
7 changes: 5 additions & 2 deletions e2e/go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
module github.com/runatlantis/atlantis/e2e

go 1.17
go 1.19

require (
github.com/google/go-github/v28 v28.0.0
github.com/hashicorp/go-multierror v1.0.0
)

require (
github.com/google/go-querystring v1.0.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.0.0
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 // indirect
)
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/runatlantis/atlantis

go 1.17
go 1.19

replace google.golang.org/grpc => google.golang.org/grpc v1.29.1

Expand Down
222 changes: 0 additions & 222 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion testing/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.17
FROM golang:1.19

RUN apt-get update && apt-get install unzip

Expand Down