Skip to content

Commit 5e1e8a0

Browse files
committed
Update go version to 1.23 and remove unused modules
Base, k8s, kaws and local modules were removed
1 parent 2c219ec commit 5e1e8a0

File tree

2,598 files changed

+99599
-563207
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,598 files changed

+99599
-563207
lines changed

.circleci/config.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ jobs:
117117
type: string
118118
default: ""
119119
docker:
120-
- image: cimg/go:1.18.0
120+
- image: cimg/go:1.23.0
121121
environment:
122122
PROVIDER: <<parameters.provider>>
123123
ARGS: <<parameters.args>>
@@ -136,14 +136,14 @@ jobs:
136136
when: always
137137
cleanup:
138138
docker:
139-
- image: cimg/go:1.18.0
139+
- image: cimg/go:1.23.0
140140
steps:
141141
- checkout
142142
- ci-dependencies
143143
- run: scripts/ci-cleanup
144144
cleanup_all:
145145
docker:
146-
- image: cimg/go:1.18.0
146+
- image: cimg/go:1.23.0
147147
steps:
148148
- checkout
149149
- ci-dependencies
@@ -157,14 +157,14 @@ jobs:
157157
repo:
158158
type: string
159159
docker:
160-
- image: cimg/go:1.18.0
160+
- image: cimg/go:1.23.0
161161
steps:
162162
- checkout
163163
- ci-dependencies
164164
- run: ci/deploy.sh <<parameters.repo>> <<parameters.app>> <<parameters.check>>
165165
test:
166166
docker:
167-
- image: cimg/go:1.18.0
167+
- image: cimg/go:1.23.0
168168
# working_directory: /go/src/github.com/convox/rack
169169
steps:
170170
- checkout
@@ -176,7 +176,7 @@ jobs:
176176
- run: curl -s https://codecov.io/bash | bash
177177
update:
178178
docker:
179-
- image: cimg/go:1.18.0
179+
- image: cimg/go:1.23.0
180180
steps:
181181
- checkout
182182
- ci-dependencies

.github/workflows/publish.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@ jobs:
1515
uses: actions/checkout@v3
1616
with:
1717
fetch-depth: 0
18-
- name: golang-1.18
18+
- name: golang-1.23
1919
uses: actions/setup-go@v3
20-
with:
21-
go-version: '1.18.10'
2220
- name: version
2321
run: echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
2422
- name: secrets

.github/workflows/release.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@ jobs:
1313
uses: actions/checkout@v3
1414
with:
1515
fetch-depth: 0
16-
- name: golang-1.18
16+
- name: golang-1.23
1717
uses: actions/setup-go@v3
18-
with:
19-
go-version: '1.18.10'
2018
- name: go path
2119
run: |
2220
mkdir -p ${HOME}/go

Dockerfile

Lines changed: 8 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,15 @@
1-
## test ########################################################################
2-
3-
FROM golang:1.18 AS test
4-
5-
ARG DOCKER_ARCH=x86_64
6-
ARG KUBECTL_ARCH=amd64
7-
8-
RUN curl -s https://download.docker.com/linux/static/stable/${DOCKER_ARCH}/docker-18.09.9.tgz | \
9-
tar -C /usr/bin --strip-components 1 -xz
10-
11-
RUN curl -Ls https://storage.googleapis.com/kubernetes-release/release/v1.13.0/bin/linux/${KUBECTL_ARCH}/kubectl -o /usr/bin/kubectl && \
12-
chmod +x /usr/bin/kubectl
13-
14-
RUN curl -Ls https://github.com/mattgreen/watchexec/releases/download/1.8.6/watchexec-1.8.6-x86_64-unknown-linux-gnu.tar.gz | \
15-
tar -C /usr/bin --strip-components 1 -xz
16-
17-
WORKDIR /go/src/github.com/convox/rack
18-
19-
COPY . .
20-
21-
RUN go build -mod=vendor --ldflags="-s -w" $(go list -mod=vendor ./vendor/...)
22-
23-
24-
## development #################################################################
25-
26-
FROM test AS development
27-
28-
# RUN curl -s https://download.docker.com/linux/static/stable/x86_64/docker-18.09.6.tgz | \
29-
# tar -C /usr/bin --strip-components 1 -xz
30-
31-
# RUN curl -Ls https://storage.googleapis.com/kubernetes-release/release/v1.13.0/bin/linux/amd64/kubectl -o /usr/bin/kubectl && \
32-
# chmod +x /usr/bin/kubectl
33-
34-
# RUN curl -Ls https://github.com/mattgreen/watchexec/releases/download/1.8.6/watchexec-1.8.6-x86_64-unknown-linux-gnu.tar.gz | \
35-
# tar -C /usr/bin --strip-components 1 -xz
36-
37-
ENV DEVELOPMENT=true
38-
39-
# WORKDIR /go/src/github.com/convox/rack
40-
41-
# COPY vendor vendor
42-
# RUN go install --ldflags="-s -w" ./vendor/...
43-
44-
# COPY . .
45-
RUN make build
46-
47-
CMD ["bin/web"]
48-
491
## package #####################################################################
502

51-
FROM golang:1.18 AS package
3+
FROM golang:1.23-bookworm AS package
524

53-
RUN apt-get update && apt-get -y install upx-ucl
5+
# Add backports to get upx-ucl in Bookworm
6+
RUN echo "deb http://deb.debian.org/debian bookworm-backports main" > /etc/apt/sources.list.d/backports.list && \
7+
apt-get update && apt-get install -y -t bookworm-backports upx-ucl
548

559
WORKDIR /go/src/github.com/convox/rack
5610

57-
COPY --from=development /go/src/github.com/convox/rack .
58-
RUN make package build compress
11+
COPY . /go/src/github.com/convox/rack
12+
RUN make build compress
5913

6014
## production ##################################################################
6115

@@ -81,15 +35,13 @@ ENV PATH=$PATH:/go/bin
8135

8236
WORKDIR /rack
8337

84-
COPY --from=package /go/bin/atom /go/bin/
8538
COPY --from=package /go/bin/build /go/bin/
8639
COPY --from=package /go/bin/convox-env /go/bin/
8740
COPY --from=package /go/bin/monitor /go/bin/
8841
COPY --from=package /go/bin/rack /go/bin/
89-
COPY --from=package /go/bin/router /go/bin/
9042

9143
# aws templates
92-
COPY --from=development /go/src/github.com/convox/rack/provider/aws/formation/ provider/aws/formation/
93-
COPY --from=development /go/src/github.com/convox/rack/provider/aws/templates/ provider/aws/templates/
44+
COPY --from=package /go/src/github.com/convox/rack/provider/aws/formation/ provider/aws/formation/
45+
COPY --from=package /go/src/github.com/convox/rack/provider/aws/templates/ provider/aws/templates/
9446

9547
CMD ["/go/bin/rack"]

Dockerfile.arm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
## package #####################################################################
22

3-
FROM golang:1.18 AS package
3+
FROM golang:1.23 AS package
44

5-
RUN apt-get update && apt-get -y install upx-ucl
5+
# Add backports to get upx-ucl in Bookworm
6+
RUN echo "deb http://deb.debian.org/debian bookworm-backports main" > /etc/apt/sources.list.d/backports.list && \
7+
apt-get update && apt-get install -y -t bookworm-backports upx-ucl
68

79
WORKDIR /go/src/github.com/convox/rack
810

@@ -30,12 +32,10 @@ ENV PATH=$PATH:/go/bin
3032

3133
WORKDIR /rack
3234

33-
COPY --from=package /go/bin/atom /go/bin/
3435
COPY --from=package /go/bin/build /go/bin/
3536
COPY --from=package /go/bin/convox-env /go/bin/
3637
COPY --from=package /go/bin/monitor /go/bin/
3738
COPY --from=package /go/bin/rack /go/bin/
38-
COPY --from=package /go/bin/router /go/bin/
3939

4040
# aws templates
4141
COPY --from=package /go/src/github.com/convox/rack/provider/aws/formation/ provider/aws/formation/

Makefile

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
.PHONY: all build builder clean clean-package compress dev generate mocks package release release-cli release-image release-provider release-version version-gen test test-docker
22

3-
commands = atom build monitor rack router
3+
commands = build monitor rack
44
injects = convox-env
55

6-
# commands = build rack router
7-
# injects =
8-
96
assets = $(wildcard assets/*)
107
binaries = $(addprefix $(GOPATH)/bin/, $(commands))
118
sources = $(shell find . -name '*.go')
@@ -55,9 +52,6 @@ generate:
5552
go run cmd/generate/main.go controllers > pkg/api/controllers.go
5653
go run cmd/generate/main.go routes > pkg/api/routes.go
5754
go run cmd/generate/main.go sdk > sdk/methods.go
58-
make -C pkg/atom generate
59-
make -C provider/k8s generate
60-
make -C provider/kaws generate
6155

6256
generate-provider:
6357
go run cmd/generate/main.go controllers > pkg/api/controllers.go

cmd/atom/main.go

Lines changed: 0 additions & 31 deletions
This file was deleted.

cmd/build/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.18
1+
FROM golang:1.23
22

33
RUN curl -s https://download.docker.com/linux/static/stable/x86_64/docker-18.03.1-ce.tgz | \
44
tar -C /usr/bin --strip-components 1 -xz

cmd/convox/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ package:
2121

2222
go install github.com/crazy-max/xgo@v0.7.5
2323
if [ -f /.dockerenv ]; then tar cz $(GOPATH) | docker run -v $(GOPATH):/gopath -i ubuntu tar xz -C /gopath --strip-components 2; fi
24-
cd ../.. && $(GOPATH)/bin/xgo -branch $(shell git rev-parse HEAD) -pkg cmd/convox -out cmd/convox/pkg/convox -go 1.18.x -targets 'darwin/amd64' -ldflags "-X main.version=$(VERSION)" .
24+
cd ../.. && $(GOPATH)/bin/xgo -branch $(shell git rev-parse HEAD) -pkg cmd/convox -out cmd/convox/pkg/convox -go 1.23.x -targets 'darwin/amd64' -ldflags "-X main.version=$(VERSION)" .
2525
if [ -f /.dockerenv ]; then mkdir -p pkg && docker run -v $(GOPATH):/gopath -i ubuntu tar czv /gopath/src/github.com/convox/rack/cmd/convox/pkg | tar xzv -C pkg --strip-components 8; fi
2626

2727
release: package

cmd/router/main.go

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)