-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.deps.yml
More file actions
108 lines (98 loc) · 3.3 KB
/
Taskfile.deps.yml
File metadata and controls
108 lines (98 loc) · 3.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# Copyright AGNTCY Contributors (https://github.com/agntcy)
# SPDX-License-Identifier: Apache-2.0
version: "3"
tasks:
default:
cmd: echo "Run the main Taskfile instead of this one."
deps:bin-dir:
desc: Create bin directory
run: once
cmd: mkdir -p {{.BIN_DIR}}
status:
- test -d {{.BIN_DIR}}
deps:helm:
desc: Ensure supported Helm version is installed
internal: true
deps:
- deps:bin-dir
preconditions:
- which curl
- which tar
cmds:
- cmd: echo "Downloading Helm v{{.HELM_VERSION}}..."
- cmd: curl -sSfL 'https://get.helm.sh/helm-v{{.HELM_VERSION}}-{{OS}}-{{ARCH}}.tar.gz' --output - | tar xzvOf - '{{OS}}-{{ARCH}}/helm' > {{.HELM_BIN}}
- cmd: chmod +x {{.HELM_BIN}}
status:
- test -x {{.HELM_BIN}}
deps:kubectl:
desc: Ensure supported kubectl version is installed
internal: true
deps:
- deps:bin-dir
preconditions:
- which curl
cmds:
- cmd: echo "Downloading Kubectl v{{.KUBECTL_VERSION}}..."
- cmd: curl -L "https://dl.k8s.io/release/v{{.KUBECTL_VERSION}}/bin/{{OS}}/{{ARCH}}/kubectl" -o {{.KUBECTL_BIN}}
- cmd: chmod +x {{.KUBECTL_BIN}}
status:
- test -x {{.KUBECTL_BIN}}
deps:kind:
desc: Ensure supported kind version is installed
internal: true
deps:
- deps:bin-dir
preconditions:
- which go
cmds:
- cmd: echo "Downloading Kind v{{.KIND_VERSION}}..."
- cmd: GOBIN={{.BIN_DIR}} go install sigs.k8s.io/kind@v{{.KIND_VERSION}}
- cmd: mv {{.BIN_DIR}}/kind {{.KIND_BIN}}
status:
- test -x {{.KIND_BIN}}
deps:cosign:
desc: Install sigstore cosign
internal: true
deps:
- deps:bin-dir
cmds:
- curl -sfL https://github.com/sigstore/cosign/releases/download/v{{.COSIGN_VERSION}}/cosign-{{OS}}-{{ARCH}} -o {{.BIN_DIR}}/cosign-{{.COSIGN_VERSION}}
- chmod +x {{.BIN_DIR}}/cosign-{{.COSIGN_VERSION}}
status:
- test -x {{.COSIGN_BIN}}
deps:dir-ctl:
desc: Install dir-ctl
internal: true
run: once
vars:
DIRCTL_IMAGE_TAG: "{{ .DIRCTL_IMAGE_TAG }}"
preconditions:
- which docker
cmds:
- docker image pull ghcr.io/agntcy/dir-ctl:{{ .DIRCTL_IMAGE_TAG }}
deps:renovate:
desc: Install Renovate
internal: true
cmd: npm install -g renovate@{{ .RENOVATE_VERSION }}
status:
- npm list -g renovate
deps:renovate:sync:
desc: Sync dependencies with Renovate
summary: |
For extra CLI flags pass RENOVATE_OPTS (e.g. task deps:renovate:sync RENOVATE_OPTS='--dry-run').
Default platform is local so local runs do not touch remote project data.
Github Action CI sets RENOVATE_PLATFORM to github.
This step is only analytical without GITHUB TOKEN and will not update PRs or project data.
deps:
- deps:renovate
dir: "{{ .ROOT_DIR }}"
vars:
RENOVATE_OPTS_DEFAULT: >-
--persist-repo-data 'true'
--allowed-post-upgrade-commands '[".*"]'
--post-upgrade-tasks '{"commands": ["task sdk:tidy"], "executionMode": "branch"}'
RENOVATE_OPTS: "{{ .RENOVATE_OPTS | default .RENOVATE_OPTS_DEFAULT }}"
RENOVATE_PLATFORM_EFFECTIVE:
sh: printf '%s' "${RENOVATE_PLATFORM:-local}"
cmds:
- renovate {{ .RENOVATE_OPTS }} --platform "{{ .RENOVATE_PLATFORM_EFFECTIVE }}"