Skip to content

Commit 5ea8c36

Browse files
committed
update deps and added renovate to track
1 parent af3ab30 commit 5ea8c36

File tree

10 files changed

+83
-13
lines changed

10 files changed

+83
-13
lines changed

.deps/gitleaks.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# renovate: datasource=github-releases depName=gitleaks/gitleaks
12
version: 8.21.2
23
url: https://github.com/gitleaks/gitleaks/releases/download/v{{.Version}}/gitleaks_{{.Version}}_{{.Os}}_{{.Architecture}}.tar.gz
34
mappings:

.deps/go-licenses.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# renovate: datasource=go depName=github.com/google/go-licenses
2+
version: v2.0.1
3+
url: "{{.Version}}"

.deps/golangci-lint.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# renovate: datasource=github-releases depName=golangci/golangci-lint
2+
version: 2.8.0
3+
url: https://github.com/golangci/golangci-lint/releases/download/v{{.Version}}/golangci-lint-{{.Version}}-{{.Os}}-{{.Architecture}}.tar.gz
4+
mappings:
5+
architecture:
6+
amd64: amd64
7+
arm64: arm64
8+
os:
9+
darwin: darwin
10+
linux: linux

.deps/gosec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# renovate: datasource=github-releases depName=securego/gosec
12
version: 2.22.0
23
url: https://github.com/securego/gosec/releases/download/v{{.Version}}/gosec_{{.Version}}_{{.Os}}_{{.Architecture}}.tar.gz
34
mappings:

.deps/govulncheck.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1+
# renovate: datasource=go depName=golang.org/x/vuln/cmd/govulncheck
12
version: v1.1.4
2-
# govulncheck is installed via go install
33
url: "{{.Version}}"

.deps/tfplugindocs.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# renovate: datasource=github-releases depName=hashicorp/terraform-plugin-docs
2+
version: 0.24.0
3+
url: https://github.com/hashicorp/terraform-plugin-docs/releases/download/v{{.Version}}/tfplugindocs_{{.Version}}_{{.Os}}_{{.Architecture}}.zip
4+
mappings:
5+
architecture:
6+
amd64: amd64
7+
arm64: arm64
8+
os:
9+
darwin: darwin
10+
linux: linux

.deps/trivy.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# renovate: datasource=github-releases depName=aquasecurity/trivy
12
version: 0.58.0
23
url: https://github.com/aquasecurity/trivy/releases/download/v{{.Version}}/trivy_{{.Version}}_{{.Os}}-{{.Architecture}}.tar.gz
34
mappings:

.github/workflows/security.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ jobs:
5656
with:
5757
fetch-depth: 0
5858

59+
- name: Setup Go
60+
uses: actions/setup-go@v5
61+
with:
62+
go-version-file: 'go.mod'
63+
cache: true
64+
5965
- name: Run Gitleaks
6066
run: make sec-gitleaks
6167

@@ -90,8 +96,5 @@ jobs:
9096
go-version-file: 'go.mod'
9197
cache: true
9298

93-
- name: Install go-licenses
94-
run: go install github.com/google/go-licenses@latest
95-
9699
- name: Check licenses
97-
run: go-licenses check ./... --disallowed_types=forbidden,restricted
100+
run: make licenses

Makefile

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# ORY_CONSOLE_API_URL - Console API URL (default: https://api.console.ory.sh)
1212
# ORY_PROJECT_API_URL - Project API URL template (default: https://%s.projects.oryapis.com)
1313

14+
SHELL := /bin/bash -o pipefail
1415
BINARY_NAME := terraform-provider-orynetwork
1516
INSTALL_DIR := ~/.terraform.d/plugins/registry.terraform.io/ory/orynetwork/0.0.1/$(shell go env GOOS)_$(shell go env GOARCH)
1617

@@ -47,7 +48,7 @@ deps-ci: ## Install dependencies for CI environment
4748
# Ory CLI for dependency management
4849
.bin/ory:
4950
@mkdir -p .bin
50-
@bash <(curl --retry 7 --retry-connrefused https://raw.githubusercontent.com/ory/meta/master/install.sh) -d -b .bin ory v0.3.4
51+
@curl --retry 7 --retry-connrefused -sSfL https://raw.githubusercontent.com/ory/meta/master/install.sh | bash -s -- -d -b .bin ory v0.3.4
5152
@touch -a -m .bin/ory
5253

5354
# ==============================================================================
@@ -71,20 +72,44 @@ clean: ## Remove build artifacts
7172
# CODE QUALITY
7273
# ==============================================================================
7374

75+
# Code quality tool binaries
76+
.bin/golangci-lint: .deps/golangci-lint.yaml .bin/ory
77+
@mkdir -p .bin
78+
@URL=$$(.bin/ory dev ci deps url -o $(OS) -a $(ARCH) -c .deps/golangci-lint.yaml); \
79+
echo "Downloading golangci-lint from $${URL}..."; \
80+
curl -sSfL "$${URL}" | tar -xz -C .bin --strip-components=1 --wildcards '*/golangci-lint'; \
81+
chmod +x .bin/golangci-lint
82+
83+
.bin/tfplugindocs: .deps/tfplugindocs.yaml .bin/ory
84+
@mkdir -p .bin
85+
@URL=$$(.bin/ory dev ci deps url -o $(OS) -a $(ARCH) -c .deps/tfplugindocs.yaml); \
86+
echo "Downloading tfplugindocs from $${URL}..."; \
87+
curl -sSfL "$${URL}" -o /tmp/tfplugindocs.zip; \
88+
unzip -q -o /tmp/tfplugindocs.zip -d .bin tfplugindocs; \
89+
rm /tmp/tfplugindocs.zip; \
90+
chmod +x .bin/tfplugindocs
91+
92+
.bin/go-licenses: .deps/go-licenses.yaml .bin/ory
93+
@VERSION=$$(.bin/ory dev ci deps url -o $(OS) -a $(ARCH) -c .deps/go-licenses.yaml); \
94+
echo "Installing go-licenses $${VERSION}..."; \
95+
GOBIN=$(PWD)/.bin go install github.com/google/go-licenses@$${VERSION}
96+
7497
.PHONY: format
75-
format: ## Format all code (Go, Terraform, modules, docs, lint fixes)
98+
format: .bin/tfplugindocs .bin/golangci-lint ## Format all code (Go, Terraform, modules, docs, lint fixes)
7699
go fmt ./...
77100
gofmt -s -w .
78101
terraform fmt -recursive examples/
79102
go mod tidy
80-
@command -v tfplugindocs >/dev/null 2>&1 || { echo "Installing tfplugindocs..."; go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs@latest; }
81-
tfplugindocs generate --provider-name ory
82-
@command -v golangci-lint >/dev/null 2>&1 || { echo "Installing golangci-lint v2..."; go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest; }
83-
golangci-lint run --fix ./...
103+
.bin/tfplugindocs generate --provider-name ory
104+
.bin/golangci-lint run --fix ./...
84105

85106
.PHONY: lint
86-
lint: ## Run Go linter (without fixes)
87-
golangci-lint run ./...
107+
lint: .bin/golangci-lint ## Run Go linter (without fixes)
108+
.bin/golangci-lint run ./...
109+
110+
.PHONY: licenses
111+
licenses: .bin/go-licenses ## Check dependency licenses
112+
.bin/go-licenses check ./... --disallowed_types=forbidden,restricted
88113

89114
# ==============================================================================
90115
# TESTING

renovate.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
33
"extends": ["config:best-practices"],
44
"labels": ["dependencies"],
5+
"includePaths": [".github/**", ".deps/**", "go.mod"],
56
"packageRules": [
67
{
78
"description": "Group all Go module updates",
@@ -12,6 +13,21 @@
1213
"description": "Group all GitHub Actions updates",
1314
"matchManagers": ["github-actions"],
1415
"groupName": "github actions"
16+
},
17+
{
18+
"description": "Group all tool dependency updates",
19+
"matchFileNames": [".deps/**"],
20+
"groupName": "tool dependencies"
21+
}
22+
],
23+
"customManagers": [
24+
{
25+
"customType": "regex",
26+
"description": "Track tool versions in .deps yaml files",
27+
"managerFilePatterns": ["^.deps/.*.yaml$"],
28+
"matchStrings": [
29+
"# renovate: datasource=(?<datasource>.*?) depName=(?<depName>[^\\s]+)\\nversion: (?<currentValue>.*)"
30+
]
1531
}
1632
]
1733
}

0 commit comments

Comments
 (0)