Skip to content
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 .github/env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
golang-version=1.21
golang-version=1.24
image-repository=quay.io/observatorium/up
18 changes: 8 additions & 10 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,24 @@ jobs:
- ubuntu-latest
name: Lint
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- name: Import environment variables from file
run: cat ".github/env" >> $GITHUB_ENV
- uses: actions/setup-go@v3
- uses: actions/setup-go@v6
with:
go-version: '${{ env.golang-version }}'
cache: true
- run: make --always-make lint && git diff --exit-code
- run: make tidy && git diff --exit-code
- run: make --always-make tidy && git diff --exit-code
generate:
runs-on: ubuntu-latest
name: Generate
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- name: Import environment variables from file
run: cat ".github/env" >> $GITHUB_ENV
- uses: actions/setup-go@v3
- uses: actions/setup-go@v6
with:
go-version: '${{ env.golang-version }}'
cache: true
- run: make --always-make generate && git diff --exit-code
build:
runs-on: ${{ matrix.os }}
Expand All @@ -44,11 +43,10 @@ jobs:
- ubuntu-latest
name: Build the binary
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- name: Import environment variables from file
run: cat ".github/env" >> $GITHUB_ENV
- uses: actions/setup-go@v3
- uses: actions/setup-go@v6
with:
go-version: '${{ env.golang-version }}'
cache: true
- run: make up
10 changes: 5 additions & 5 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@ jobs:
name: Build and push the container image for a commit or tag.
steps:
- name: Checkout code into the Go module directory.
uses: actions/checkout@v3
uses: actions/checkout@v6

- name: Login to image registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Cache for Docker's buildx
uses: actions/cache@v3
uses: actions/cache@v5
with:
path: .buildxcache/
key: ${{ runner.os }}-buildx-${{ hashFiles('**/*.go', 'Dockerfile', 'go.sum') }}
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@ jobs:
- ubuntu-latest
name: Unit tests
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- name: Import environment variables from file
run: cat ".github/env" >> $GITHUB_ENV
- uses: actions/setup-go@v3
- uses: actions/setup-go@v6
with:
go-version: '${{ env.golang-version }}'
cache: true
- run: make test
integration-tests:
runs-on: ${{ matrix.os }}
Expand All @@ -32,10 +31,10 @@ jobs:
- ubuntu-latest
name: Integration tests
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- name: Import environment variables from file
run: cat ".github/env" >> $GITHUB_ENV
- uses: actions/setup-go@v3
- uses: actions/setup-go@v6
with:
go-version: '${{ env.golang-version }}'
cache: true
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21-alpine3.18 as builder
FROM golang:1.24-alpine as builder

RUN apk add ca-certificates --no-cache make && update-ca-certificates

Expand Down
10 changes: 4 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ all: build generate validate
build: up

.PHONY: up
up: vendor
up:
CGO_ENABLED=0 go build -v -ldflags '-w -extldflags '-static'' ./cmd/up

.PHONY: generate
Expand All @@ -33,14 +33,12 @@ generate: jsonnet-fmt ${MANIFESTS} README.md
validate: $(KUBEVAL) $(MANIFESTS)
$(KUBEVAL) --ignore-missing-schemas $(MANIFESTS)/*.yaml

.PHONY: vendor
vendor: go.mod go.sum
Comment thread
simonpasquier marked this conversation as resolved.
go mod tidy
go mod vendor
.PHONY: tidy
go mod tidy -v

.PHONY: go-fmt
go-fmt:
@fmt_res=$$(gofmt -d -s $$(find . -type f -name '*.go' -not -path './vendor/*' -not -path './jsonnet/vendor/*')); if [ -n "$$fmt_res" ]; then printf '\nGofmt found style issues. Please check the reported issues\nand fix them if necessary before submitting the code for review:\n\n%s' "$$fmt_res"; exit 1; fi
@fmt_res=$$(gofmt -d -s $$(find . -type f -name '*.go' -not -path './jsonnet/vendor/*')); if [ -n "$$fmt_res" ]; then printf '\nGofmt found style issues. Please check the reported issues\nand fix them if necessary before submitting the code for review:\n\n%s' "$$fmt_res"; exit 1; fi

.PHONY: lint
lint: $(GOLANGCI_LINT)
Expand Down
37 changes: 20 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,37 +1,40 @@
module github.com/observatorium/up

go 1.21
go 1.24.0

toolchain go1.24.10

require (
github.com/efficientgo/tools/core v0.0.0-20220225185207-fe763185946b
github.com/efficientgo/tools/core v0.0.0-20230505153745-6b7392939a60
github.com/go-kit/log v0.2.1
github.com/gogo/protobuf v1.3.2
github.com/golang/snappy v0.0.4
github.com/oklog/run v1.1.0
github.com/golang/snappy v1.0.0
github.com/oklog/run v1.2.0
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.17.0
github.com/prometheus/client_model v0.5.0
github.com/prometheus/common v0.45.0
github.com/prometheus/prometheus v0.48.1
github.com/prometheus/client_golang v1.23.2
github.com/prometheus/client_model v0.6.2
github.com/prometheus/common v0.67.4
github.com/prometheus/prometheus v0.308.0
gopkg.in/yaml.v2 v2.4.0
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dennwc/varint v1.0.0 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect
github.com/grafana/regexp v0.0.0-20250905093917-f7b3be9d1853 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/procfs v0.11.1 // indirect
github.com/prometheus/procfs v0.16.1 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/goleak v1.2.1 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/sys v0.13.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
go.uber.org/goleak v1.3.0 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
golang.org/x/sys v0.37.0 // indirect
golang.org/x/text v0.30.0 // indirect
google.golang.org/protobuf v1.36.10 // indirect
)
Loading