diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 35af1386a..7f695604f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,7 +21,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: 1.16.x + go-version: 1.17.x - name: Run unit tests run: make test - name: Check if working tree is dirty diff --git a/Dockerfile b/Dockerfile index 51e6c6a6c..feca5ef35 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.16-alpine as builder +FROM golang:1.17-alpine as builder ARG REVISION @@ -18,7 +18,7 @@ RUN CGO_ENABLED=0 go build -ldflags "-s -w \ -X github.com/stefanprodan/podinfo/pkg/version.REVISION=${REVISION}" \ -a -o bin/podcli cmd/podcli/* -FROM alpine:3.14 +FROM alpine:3.15 ARG BUILD_DATE ARG VERSION diff --git a/Dockerfile.base b/Dockerfile.base index 56a7212a4..bb83fecc5 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -1,4 +1,4 @@ -FROM golang:1.16 +FROM golang:1.17 WORKDIR /workspace diff --git a/Dockerfile.xx b/Dockerfile.xx index 1f7af6c7e..aa8d9d0b4 100644 --- a/Dockerfile.xx +++ b/Dockerfile.xx @@ -1,8 +1,9 @@ -ARG XX_VERSION=1.0.0-rc.2 +ARG GO_VERSION=1.17 +ARG XX_VERSION=1.1.0 FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx -FROM --platform=$BUILDPLATFORM golang:1.16-alpine as builder +FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine as builder # Copy the build utilities. COPY --from=xx / / @@ -27,7 +28,7 @@ RUN xx-go build -ldflags "-s -w \ -X github.com/stefanprodan/podinfo/pkg/version.REVISION=${REVISION}" \ -a -o bin/podcli cmd/podcli/* -FROM alpine:3.14 +FROM alpine:3.15 ARG BUILD_DATE ARG VERSION diff --git a/Makefile b/Makefile index 9e9d77c09..8fa2bf848 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,9 @@ build: GIT_COMMIT=$$(git rev-list -1 HEAD) && CGO_ENABLED=0 go build -ldflags "-s -w -X github.com/stefanprodan/podinfo/pkg/version.REVISION=$(GIT_COMMIT)" -a -o ./bin/podinfo ./cmd/podinfo/* GIT_COMMIT=$$(git rev-list -1 HEAD) && CGO_ENABLED=0 go build -ldflags "-s -w -X github.com/stefanprodan/podinfo/pkg/version.REVISION=$(GIT_COMMIT)" -a -o ./bin/podcli ./cmd/podcli/* +tidy: + rm -f go.sum; go mod tidy -compat=1.17 + fmt: gofmt -l -s -w ./ goimports -l -w ./ @@ -66,16 +69,16 @@ push-container: version-set: @next="$(TAG)" && \ current="$(VERSION)" && \ - sed -i '' "s/$$current/$$next/g" pkg/version/version.go && \ - sed -i '' "s/tag: $$current/tag: $$next/g" charts/podinfo/values.yaml && \ - sed -i '' "s/tag: $$current/tag: $$next/g" charts/podinfo/values-prod.yaml && \ - sed -i '' "s/appVersion: $$current/appVersion: $$next/g" charts/podinfo/Chart.yaml && \ - sed -i '' "s/version: $$current/version: $$next/g" charts/podinfo/Chart.yaml && \ - sed -i '' "s/podinfo:$$current/podinfo:$$next/g" kustomize/deployment.yaml && \ - sed -i '' "s/podinfo:$$current/podinfo:$$next/g" deploy/webapp/frontend/deployment.yaml && \ - sed -i '' "s/podinfo:$$current/podinfo:$$next/g" deploy/webapp/backend/deployment.yaml && \ - sed -i '' "s/podinfo:$$current/podinfo:$$next/g" deploy/bases/frontend/deployment.yaml && \ - sed -i '' "s/podinfo:$$current/podinfo:$$next/g" deploy/bases/backend/deployment.yaml && \ + /usr/bin/sed -i '' "s/$$current/$$next/g" pkg/version/version.go && \ + /usr/bin/sed -i '' "s/tag: $$current/tag: $$next/g" charts/podinfo/values.yaml && \ + /usr/bin/sed -i '' "s/tag: $$current/tag: $$next/g" charts/podinfo/values-prod.yaml && \ + /usr/bin/sed -i '' "s/appVersion: $$current/appVersion: $$next/g" charts/podinfo/Chart.yaml && \ + /usr/bin/sed -i '' "s/version: $$current/version: $$next/g" charts/podinfo/Chart.yaml && \ + /usr/bin/sed -i '' "s/podinfo:$$current/podinfo:$$next/g" kustomize/deployment.yaml && \ + /usr/bin/sed -i '' "s/podinfo:$$current/podinfo:$$next/g" deploy/webapp/frontend/deployment.yaml && \ + /usr/bin/sed -i '' "s/podinfo:$$current/podinfo:$$next/g" deploy/webapp/backend/deployment.yaml && \ + /usr/bin/sed -i '' "s/podinfo:$$current/podinfo:$$next/g" deploy/bases/frontend/deployment.yaml && \ + /usr/bin/sed -i '' "s/podinfo:$$current/podinfo:$$next/g" deploy/bases/backend/deployment.yaml && \ echo "Version $$next set in code, deployment, chart and kustomize" release: diff --git a/charts/podinfo/Chart.yaml b/charts/podinfo/Chart.yaml index 230885c1a..c1689da8f 100644 --- a/charts/podinfo/Chart.yaml +++ b/charts/podinfo/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 -version: 6.0.3 -appVersion: 6.0.3 +version: 6.0.4 +appVersion: 6.0.4 name: podinfo engine: gotpl description: Podinfo Helm chart for Kubernetes diff --git a/charts/podinfo/values-prod.yaml b/charts/podinfo/values-prod.yaml index 120796d9d..e9ec8e4bf 100644 --- a/charts/podinfo/values-prod.yaml +++ b/charts/podinfo/values-prod.yaml @@ -8,7 +8,7 @@ backends: [] image: repository: ghcr.io/stefanprodan/podinfo - tag: 6.0.3 + tag: 6.0.4 pullPolicy: IfNotPresent ui: diff --git a/charts/podinfo/values.yaml b/charts/podinfo/values.yaml index 1d1f926da..ddabad008 100644 --- a/charts/podinfo/values.yaml +++ b/charts/podinfo/values.yaml @@ -8,7 +8,7 @@ backends: [] image: repository: ghcr.io/stefanprodan/podinfo - tag: 6.0.3 + tag: 6.0.4 pullPolicy: IfNotPresent ui: diff --git a/deploy/bases/backend/deployment.yaml b/deploy/bases/backend/deployment.yaml index ce88b7a62..0158e32fd 100644 --- a/deploy/bases/backend/deployment.yaml +++ b/deploy/bases/backend/deployment.yaml @@ -23,7 +23,7 @@ spec: spec: containers: - name: backend - image: ghcr.io/stefanprodan/podinfo:6.0.3 + image: ghcr.io/stefanprodan/podinfo:6.0.4 imagePullPolicy: IfNotPresent ports: - name: http diff --git a/deploy/bases/frontend/deployment.yaml b/deploy/bases/frontend/deployment.yaml index 51e7241e5..c34eb262b 100644 --- a/deploy/bases/frontend/deployment.yaml +++ b/deploy/bases/frontend/deployment.yaml @@ -23,7 +23,7 @@ spec: spec: containers: - name: frontend - image: ghcr.io/stefanprodan/podinfo:6.0.3 + image: ghcr.io/stefanprodan/podinfo:6.0.4 imagePullPolicy: IfNotPresent ports: - name: http diff --git a/deploy/webapp/backend/deployment.yaml b/deploy/webapp/backend/deployment.yaml index e0284ec57..4175b5745 100644 --- a/deploy/webapp/backend/deployment.yaml +++ b/deploy/webapp/backend/deployment.yaml @@ -25,7 +25,7 @@ spec: serviceAccountName: webapp containers: - name: backend - image: ghcr.io/stefanprodan/podinfo:6.0.3 + image: ghcr.io/stefanprodan/podinfo:6.0.4 imagePullPolicy: IfNotPresent ports: - name: http diff --git a/deploy/webapp/frontend/deployment.yaml b/deploy/webapp/frontend/deployment.yaml index 7642e39b4..159dc43e0 100644 --- a/deploy/webapp/frontend/deployment.yaml +++ b/deploy/webapp/frontend/deployment.yaml @@ -25,7 +25,7 @@ spec: serviceAccountName: webapp containers: - name: frontend - image: ghcr.io/stefanprodan/podinfo:6.0.3 + image: ghcr.io/stefanprodan/podinfo:6.0.4 imagePullPolicy: IfNotPresent ports: - name: http diff --git a/go.mod b/go.mod index 1f2695e08..91b7db461 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/stefanprodan/podinfo -go 1.16 +go 1.17 require ( github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 @@ -11,7 +11,6 @@ require ( github.com/gomodule/redigo v1.8.4 github.com/gorilla/mux v1.8.0 github.com/gorilla/websocket v1.4.2 - github.com/mattn/go-isatty v0.0.12 // indirect github.com/prometheus/client_golang v1.11.0 github.com/spf13/cobra v1.2.1 github.com/spf13/pflag v1.0.5 @@ -22,3 +21,43 @@ require ( golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 google.golang.org/grpc v1.38.0 ) + +require ( + github.com/KyleBanks/depth v1.2.1 // indirect + github.com/PuerkitoBio/purell v1.1.1 // indirect + github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/jsonreference v0.19.5 // indirect + github.com/go-openapi/spec v0.20.0 // indirect + github.com/go-openapi/swag v0.19.12 // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/magiconair/properties v1.8.5 // indirect + github.com/mailru/easyjson v0.7.6 // indirect + github.com/mattn/go-colorable v0.1.4 // indirect + github.com/mattn/go-isatty v0.0.12 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/mitchellh/mapstructure v1.4.1 // indirect + github.com/pelletier/go-toml v1.9.3 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.26.0 // indirect + github.com/prometheus/procfs v0.6.0 // indirect + github.com/spf13/afero v1.6.0 // indirect + github.com/spf13/cast v1.3.1 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/subosito/gotenv v1.2.0 // indirect + github.com/swaggo/files v0.0.0-20190704085106-630677cd5c14 // indirect + go.uber.org/atomic v1.7.0 // indirect + go.uber.org/multierr v1.6.0 // indirect + golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40 // indirect + golang.org/x/text v0.3.5 // indirect + golang.org/x/tools v0.1.5 // indirect + google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c // indirect + google.golang.org/protobuf v1.26.0 // indirect + gopkg.in/ini.v1 v1.62.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect +) diff --git a/kustomize/deployment.yaml b/kustomize/deployment.yaml index 25896dd87..7b2fb6e13 100644 --- a/kustomize/deployment.yaml +++ b/kustomize/deployment.yaml @@ -23,7 +23,7 @@ spec: spec: containers: - name: podinfod - image: ghcr.io/stefanprodan/podinfo:6.0.3 + image: ghcr.io/stefanprodan/podinfo:6.0.4 imagePullPolicy: IfNotPresent ports: - name: http diff --git a/pkg/version/version.go b/pkg/version/version.go index 765e2b78a..9d3c1d256 100644 --- a/pkg/version/version.go +++ b/pkg/version/version.go @@ -1,4 +1,4 @@ package version -var VERSION = "6.0.3" +var VERSION = "6.0.4" var REVISION = "unknown"