Skip to content

Commit 540ab91

Browse files
committed
Merge branch 'main' into add-ci-deployment-cleanup
2 parents 16b6d23 + 7b74cec commit 540ab91

26 files changed

+9387
-108
lines changed

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Reference:
2+
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference
3+
4+
version: 2
5+
updates:
6+
- package-ecosystem: "gomod"
7+
directory: "/"
8+
schedule:
9+
interval: "weekly"
10+
- package-ecosystem: "github-actions"
11+
directory: "/"
12+
schedule:
13+
interval: "weekly"

.github/workflows/test.yaml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
runs-on: ubuntu-24.04
1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@v6
2020

2121
- name: Install Go
22-
uses: actions/setup-go@v5
22+
uses: actions/setup-go@v6
2323
with:
2424
go-version: '1.24.2'
2525
check-latest: true
@@ -42,3 +42,24 @@ jobs:
4242

4343
- name: Build renku-dev-utils
4444
run: make rdu
45+
46+
lint:
47+
runs-on: ubuntu-24.04
48+
steps:
49+
- name: Checkout
50+
uses: actions/checkout@v6
51+
52+
- name: Install Go
53+
uses: actions/setup-go@v6
54+
with:
55+
go-version: '1.24.2'
56+
check-latest: true
57+
58+
- name: Install libraries for ubuntu
59+
run: |
60+
sudo apt install libx11-dev
61+
62+
- name: golangci-lint
63+
uses: golangci/golangci-lint-action@v9
64+
with:
65+
version: v2.1

Makefile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,17 @@ SHELL = bash
33
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
44
# Current git commit hash
55
GIT_COMMIT_HASH := $(shell git show --no-patch --no-notes --pretty='%h' HEAD)
6+
# Current git tag
7+
GIT_TAG := $(shell git describe --tags --exact-match 2>/dev/null || echo "")
8+
ifeq ($(GIT_TAG),)
69
VERSION := $(BRANCH).$(GIT_COMMIT_HASH)
10+
else
11+
VERSION := $(GIT_TAG)
12+
endif
713
ifeq ($(shell git status --porcelain),)
814
DIRTY :=
915
else
16+
VERSION := $(BRANCH).$(GIT_COMMIT_HASH)
1017
DIRTY := "dev"
1118
endif
1219
LDFLAGS=--ldflags "-s -X github.com/SwissDataScienceCenter/renku-dev-utils/pkg/version.Version=$(VERSION) -X github.com/SwissDataScienceCenter/renku-dev-utils/pkg/version.VersionSuffix=$(DIRTY)"
@@ -19,6 +26,7 @@ vars: ## Show the Makefile vars
1926
@echo SHELL="'$(SHELL)'"
2027
@echo BRANCH="'$(BRANCH)'"
2128
@echo GIT_COMMIT_HASH="'$(GIT_COMMIT_HASH)'"
29+
@echo GIT_TAG="'$(GIT_TAG)'"
2230
@echo VERSION="'$(VERSION)'"
2331
@echo DIRTY="'$(DIRTY)'"
2432

@@ -60,3 +68,26 @@ check-format: ## Check that sources are correctly formatted
6068
.PHONY: check-vet
6169
check-vet: ## Check source files with `go vet`
6270
go vet ./...
71+
72+
##@ Code generation
73+
74+
.PHONY: renku-users-apispec
75+
renku-users-apispec: ## Download the "users" API spec
76+
curl -L -o pkg/renkuapi/users/api.spec.yaml https://raw.githubusercontent.com/SwissDataScienceCenter/renku-data-services/refs/heads/main/components/renku_data_services/users/api.spec.yaml
77+
sed -e 's/- default: "general"//g' pkg/renkuapi/users/api.spec.yaml > pkg/renkuapi/users/api.spec.new.yaml
78+
mv pkg/renkuapi/users/api.spec.new.yaml pkg/renkuapi/users/api.spec.yaml
79+
80+
.PHONY: renku-session-apispec
81+
renku-session-apispec: ## Download the "session" API spec
82+
curl -L -o pkg/renkuapi/session/api.spec.yaml https://raw.githubusercontent.com/SwissDataScienceCenter/renku-data-services/refs/heads/main/components/renku_data_services/session/api.spec.yaml
83+
# sed -e 's/- default: "general"//g' pkg/renkuapi/users/api.spec.yaml > pkg/renkuapi/users/api.spec.new.yaml
84+
# mv pkg/renkuapi/users/api.spec.new.yaml pkg/renkuapi/users/api.spec.yaml
85+
86+
.PHONY: generate
87+
generate: pkg/renkuapi/users/users_gen.go pkg/renkuapi/session/session_gen.go ## Run go generate
88+
89+
pkg/renkuapi/users/users_gen.go: pkg/renkuapi/users/api.spec.yaml
90+
go generate pkg/renkuapi/users/users.go
91+
92+
pkg/renkuapi/session/session_gen.go: pkg/renkuapi/session/api.spec.yaml
93+
go generate pkg/renkuapi/session/session.go

go.mod

Lines changed: 48 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,57 +2,79 @@ module github.com/SwissDataScienceCenter/renku-dev-utils
22

33
go 1.24.2
44

5+
tool github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen
6+
57
require (
6-
github.com/spf13/cobra v1.9.1
7-
k8s.io/api v0.33.1
8-
k8s.io/apimachinery v0.33.1
8+
github.com/getkin/kin-openapi v0.133.0
9+
github.com/golang-jwt/jwt/v5 v5.3.0
10+
github.com/oapi-codegen/runtime v1.1.2
11+
github.com/spf13/cobra v1.10.1
12+
github.com/zalando/go-keyring v0.2.6
13+
golang.design/x/clipboard v0.7.1
14+
k8s.io/api v0.34.2
15+
k8s.io/apimachinery v0.34.2
16+
k8s.io/client-go v0.34.2
17+
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397
918
)
1019

1120
require (
21+
al.essio.dev/pkg/shellescape v1.5.1 // indirect
22+
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
23+
github.com/danieljoos/wincred v1.2.2 // indirect
1224
github.com/davecgh/go-spew v1.1.1 // indirect
13-
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
14-
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
25+
github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 // indirect
26+
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
27+
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
1528
github.com/go-logr/logr v1.4.2 // indirect
1629
github.com/go-openapi/jsonpointer v0.21.0 // indirect
1730
github.com/go-openapi/jsonreference v0.20.2 // indirect
1831
github.com/go-openapi/swag v0.23.0 // indirect
32+
github.com/godbus/dbus/v5 v5.1.0 // indirect
1933
github.com/gogo/protobuf v1.3.2 // indirect
20-
github.com/google/gnostic-models v0.6.9 // indirect
21-
github.com/google/go-cmp v0.7.0 // indirect
34+
github.com/google/gnostic-models v0.7.0 // indirect
2235
github.com/google/uuid v1.6.0 // indirect
36+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
2337
github.com/josharian/intern v1.0.0 // indirect
2438
github.com/json-iterator/go v1.1.12 // indirect
2539
github.com/mailru/easyjson v0.7.7 // indirect
2640
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
27-
github.com/modern-go/reflect2 v1.0.2 // indirect
41+
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
42+
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
2843
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
44+
github.com/oapi-codegen/oapi-codegen/v2 v2.5.0 // indirect
45+
github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect
46+
github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect
47+
github.com/perimeterx/marshmallow v1.1.5 // indirect
2948
github.com/pkg/errors v0.9.1 // indirect
49+
github.com/speakeasy-api/jsonpath v0.6.0 // indirect
50+
github.com/speakeasy-api/openapi-overlay v0.10.2 // indirect
51+
github.com/spf13/pflag v1.0.9 // indirect
52+
github.com/vmware-labs/yaml-jsonpath v0.3.2 // indirect
53+
github.com/woodsbury/decimal128 v1.3.0 // indirect
3054
github.com/x448/float16 v0.8.4 // indirect
55+
go.yaml.in/yaml/v2 v2.4.2 // indirect
56+
go.yaml.in/yaml/v3 v3.0.4 // indirect
3157
golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56 // indirect
32-
golang.org/x/image v0.6.0 // indirect
33-
golang.org/x/mobile v0.0.0-20230301163155-e0f57694e12c // indirect
34-
golang.org/x/net v0.38.0 // indirect
58+
golang.org/x/image v0.28.0 // indirect
59+
golang.org/x/mobile v0.0.0-20250606033058-a2a15c67f36f // indirect
60+
golang.org/x/mod v0.25.0 // indirect
61+
golang.org/x/net v0.41.0 // indirect
3562
golang.org/x/oauth2 v0.27.0 // indirect
36-
golang.org/x/sys v0.31.0 // indirect
37-
golang.org/x/term v0.30.0 // indirect
38-
golang.org/x/text v0.23.0 // indirect
63+
golang.org/x/sync v0.15.0 // indirect
64+
golang.org/x/sys v0.33.0 // indirect
65+
golang.org/x/term v0.32.0 // indirect
66+
golang.org/x/text v0.26.0 // indirect
3967
golang.org/x/time v0.9.0 // indirect
68+
golang.org/x/tools v0.34.0 // indirect
4069
google.golang.org/protobuf v1.36.5 // indirect
4170
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
4271
gopkg.in/inf.v0 v0.9.1 // indirect
72+
gopkg.in/yaml.v2 v2.4.0 // indirect
4373
gopkg.in/yaml.v3 v3.0.1 // indirect
4474
k8s.io/klog/v2 v2.130.1 // indirect
45-
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect
46-
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect
47-
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
75+
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect
76+
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
4877
sigs.k8s.io/randfill v1.0.0 // indirect
49-
sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect
50-
sigs.k8s.io/yaml v1.4.0 // indirect
51-
)
52-
53-
require (
54-
github.com/inconshreveable/mousetrap v1.1.0 // indirect
55-
github.com/spf13/pflag v1.0.6 // indirect
56-
golang.design/x/clipboard v0.7.0
57-
k8s.io/client-go v0.33.1
78+
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
79+
sigs.k8s.io/yaml v1.6.0 // indirect
5880
)

0 commit comments

Comments
 (0)