Skip to content

Commit 4baf579

Browse files
committed
chore(taskfile): replace Makefile with remote taskfile
Signed-off-by: Evgeniy Frolov <[email protected]> chore: lint Signed-off-by: Evgeniy Frolov <[email protected]>
1 parent acff6da commit 4baf579

File tree

10 files changed

+78
-134
lines changed

10 files changed

+78
-134
lines changed

.github/workflows/lint.yaml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,34 @@ name: Lint
33
on:
44
push:
55
branches:
6-
- main
6+
- main
77
pull_request:
88

9+
env:
10+
TASK_X_REMOTE_TASKFILES: 1
11+
912
jobs:
1013
lint:
1114
name: Lint
1215
runs-on: ubuntu-latest
1316
env:
1417
GOFLAGS: -mod=readonly
1518
steps:
16-
- name: Checkout code
17-
uses: actions/checkout@v3
19+
- name: Checkout code
20+
uses: actions/checkout@v4
1821

19-
- name: Set up Go
20-
uses: actions/setup-go@v3
21-
with:
22+
- name: Set up Go
23+
uses: actions/setup-go@v5
24+
with:
2225
go-version-file: go.mod
2326

24-
- name: Install linter
25-
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2
27+
- name: Install Task
28+
uses: arduino/setup-task@v2
29+
with:
30+
repo-token: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: Install golangci-lint
33+
run: task --yes -p deps:install:golangci-lint
2634

27-
- name: Lint
28-
run: make lint
35+
- name: Lint
36+
run: task --yes -p lint

.github/workflows/release_please.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,31 @@ name: Do release PR or GitHub release
22
on:
33
push:
44
branches:
5-
- main
5+
- main
66

77
jobs:
88
release-please:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: werf/third-party-release-please-action@werf
12-
with:
13-
release-type: go
14-
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
15-
release-notes-header: "## Changelog"
16-
release-notes-footer: |
17-
## Installation
18-
To install `kubedog` we recommend following [these instructions](https://github.com/werf/kubedog#install-kubedog-cli).
11+
- uses: werf/third-party-release-please-action@werf
12+
with:
13+
release-type: go
14+
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
15+
release-notes-header: "## Changelog"
16+
release-notes-footer: |
17+
## Installation
18+
To install `kubedog` we recommend following [these instructions](https://github.com/werf/kubedog#install-kubedog-cli).
1919
20-
Alternatively, you can download `kubedog` binaries from here:
21-
* [Linux amd64](https://tuf.kubedog.werf.io/targets/releases/{{> version }}/linux-amd64/bin/kubedog) ([PGP signature](https://tuf.kubedog.werf.io/targets/signatures/{{> version }}/linux-amd64/bin/kubedog.sig))
22-
* [Linux arm64](https://tuf.kubedog.werf.io/targets/releases/{{> version }}/linux-arm64/bin/kubedog) ([PGP signature](https://tuf.kubedog.werf.io/targets/signatures/{{> version }}/linux-arm64/bin/kubedog.sig))
23-
* [macOS amd64](https://tuf.kubedog.werf.io/targets/releases/{{> version }}/darwin-amd64/bin/kubedog) ([PGP signature](https://tuf.kubedog.werf.io/targets/signatures/{{> version }}/darwin-amd64/bin/kubedog.sig))
24-
* [macOS arm64](https://tuf.kubedog.werf.io/targets/releases/{{> version }}/darwin-arm64/bin/kubedog) ([PGP signature](https://tuf.kubedog.werf.io/targets/signatures/{{> version }}/darwin-arm64/bin/kubedog.sig))
25-
* [Windows amd64](https://tuf.kubedog.werf.io/targets/releases/{{> version }}/windows-amd64/bin/kubedog.exe) ([PGP signature](https://tuf.kubedog.werf.io/targets/signatures/{{> version }}/windows-amd64/bin/kubedog.exe.sig))
20+
Alternatively, you can download `kubedog` binaries from here:
21+
* [Linux amd64](https://tuf.kubedog.werf.io/targets/releases/{{> version }}/linux-amd64/bin/kubedog) ([PGP signature](https://tuf.kubedog.werf.io/targets/signatures/{{> version }}/linux-amd64/bin/kubedog.sig))
22+
* [Linux arm64](https://tuf.kubedog.werf.io/targets/releases/{{> version }}/linux-arm64/bin/kubedog) ([PGP signature](https://tuf.kubedog.werf.io/targets/signatures/{{> version }}/linux-arm64/bin/kubedog.sig))
23+
* [macOS amd64](https://tuf.kubedog.werf.io/targets/releases/{{> version }}/darwin-amd64/bin/kubedog) ([PGP signature](https://tuf.kubedog.werf.io/targets/signatures/{{> version }}/darwin-amd64/bin/kubedog.sig))
24+
* [macOS arm64](https://tuf.kubedog.werf.io/targets/releases/{{> version }}/darwin-arm64/bin/kubedog) ([PGP signature](https://tuf.kubedog.werf.io/targets/signatures/{{> version }}/darwin-arm64/bin/kubedog.sig))
25+
* [Windows amd64](https://tuf.kubedog.werf.io/targets/releases/{{> version }}/windows-amd64/bin/kubedog.exe) ([PGP signature](https://tuf.kubedog.werf.io/targets/signatures/{{> version }}/windows-amd64/bin/kubedog.exe.sig))
2626
27-
These binaries were signed with PGP and could be verified with the [kubedog PGP public key](https://werf.io/kubedog.asc). For example, `kubedog` binary can be downloaded and verified with `gpg` on Linux with these commands:
28-
```shell
29-
curl -sSLO "https://tuf.kubedog.werf.io/targets/releases/{{> version }}/linux-amd64/bin/kubedog" -O "https://tuf.kubedog.werf.io/targets/signatures/{{> version }}/linux-amd64/bin/kubedog.sig"
30-
curl -sSL https://werf.io/kubedog.asc | gpg --import
31-
gpg --verify kubedog.sig kubedog
32-
```
27+
These binaries were signed with PGP and could be verified with the [kubedog PGP public key](https://werf.io/kubedog.asc). For example, `kubedog` binary can be downloaded and verified with `gpg` on Linux with these commands:
28+
```shell
29+
curl -sSLO "https://tuf.kubedog.werf.io/targets/releases/{{> version }}/linux-amd64/bin/kubedog" -O "https://tuf.kubedog.werf.io/targets/signatures/{{> version }}/linux-amd64/bin/kubedog.sig"
30+
curl -sSL https://werf.io/kubedog.asc | gpg --import
31+
gpg --verify kubedog.sig kubedog
32+
```

.github/workflows/trdl_releaser.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ jobs:
88
name: Perform kubedog release using trdl server
99
runs-on: ubuntu-latest
1010
steps:
11-
- name: Release
12-
uses: werf/trdl-vault-actions/release@main
13-
with:
14-
vault-addr: ${{ secrets.TRDL_VAULT_ADDR }}
15-
project-name: kubedog
16-
git-tag: ${{ github.event.ref }}
17-
vault-auth-method: approle
18-
vault-role-id: ${{ secrets.TRDL_VAULT_ROLE_ID }}
19-
vault-secret-id: ${{ secrets.TRDL_VAULT_SECRET_ID }}
11+
- name: Release
12+
uses: werf/trdl-vault-actions/release@main
13+
with:
14+
vault-addr: ${{ secrets.TRDL_VAULT_ADDR }}
15+
project-name: kubedog
16+
git-tag: ${{ github.event.ref }}
17+
vault-auth-method: approle
18+
vault-role-id: ${{ secrets.TRDL_VAULT_ROLE_ID }}
19+
vault-secret-id: ${{ secrets.TRDL_VAULT_SECRET_ID }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525

2626
# End of https://www.toptal.com/developers/gitignore/api/go
2727

28-
28+
.task
2929

3030
release-build

.golangci.yaml

Lines changed: 0 additions & 42 deletions
This file was deleted.

Makefile

Lines changed: 0 additions & 34 deletions
This file was deleted.

Taskfile.dist.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@ version: "3"
22

33
silent: true
44

5+
includes:
6+
lint:
7+
taskfile: https://raw.githubusercontent.com/werf/common-ci/refs/heads/main/Taskfile.format_lint.yml
8+
flatten: true
9+
vars:
10+
paths: "."
11+
deps:
12+
taskfile: https://raw.githubusercontent.com/werf/common-ci/refs/heads/main/Taskfile.deps.yml
13+
flatten: true
14+
515
tasks:
616
sign:
717
desc: 'Sign last version tag + origin/main and push signatures. Important vars: "refs".'
@@ -16,3 +26,10 @@ tasks:
1626
done
1727
- git signatures push {{.CLI_ARGS}}
1828

29+
build:
30+
desc: "Build kubedog binary file"
31+
cmd: go build github.com/werf/kubedog/cmd/kubedog
32+
33+
install:
34+
desc: "Install kubedog"
35+
cmd: go install github.com/werf/kubedog/cmd/kubedog

pkg/tracker/generic/contrib_resource_status_rules.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# their status. Custom rules to detect status of such resources are defined in this file.
44

55
rules:
6-
# Match the resource by its API group (without version)
6+
# Match the resource by its API group (without version)
77
- resourceGroup: "acid.zalan.do"
88
# Match the resource by its kind (case insensitive)
99
resourceKind: "postgresql"
@@ -47,7 +47,7 @@ rules:
4747
- "Unknown"
4848
failed:
4949
- "False"
50-
# https://github.com/bitnami-labs/sealed-secrets/blob/main/pkg/apis/sealedsecrets/v1alpha1/types.go
50+
# https://github.com/bitnami-labs/sealed-secrets/blob/main/pkg/apis/sealedsecrets/v1alpha1/types.go
5151
- resourceGroup: "bitnami.com"
5252
resourceKind: "SealedSecret"
5353
jsonPath: "$.status.conditions[?(@.type=='Synced')].status"
@@ -59,7 +59,7 @@ rules:
5959
- "Unknown"
6060
- "False"
6161
failed: []
62-
# https://github.com/kyverno/kyverno/blob/main/api/kyverno/v1/policy_status.go
62+
# https://github.com/kyverno/kyverno/blob/main/api/kyverno/v1/policy_status.go
6363
- resourceGroup: "kyverno.io"
6464
resourceKind: "Policy"
6565
jsonPath: "$.status.conditions[?(@.type=='Ready')].status"
@@ -82,7 +82,7 @@ rules:
8282
- "Unknown"
8383
- "False"
8484
failed: []
85-
# https://github.com/argoproj/gitops-engine/blob/master/pkg/health/health.go#L12
85+
# https://github.com/argoproj/gitops-engine/blob/master/pkg/health/health.go#L12
8686
- resourceGroup: "argoproj.io"
8787
resourceKind: "Application"
8888
jsonPath: "$.status.health.status"
@@ -97,7 +97,7 @@ rules:
9797
- "Missing"
9898
failed:
9999
- "Degraded"
100-
# https://github.com/argoproj/argo-cd/blob/master/pkg/apis/application/v1alpha1/applicationset_types.go#L807
100+
# https://github.com/argoproj/argo-cd/blob/master/pkg/apis/application/v1alpha1/applicationset_types.go#L807
101101
- resourceGroup: "argoproj.io"
102102
resourceKind: "ApplicationSet"
103103
jsonPath: "$.status.conditions[?(@.type=='ResourcesUpToDate')].status"
@@ -109,7 +109,7 @@ rules:
109109
- "Unknown"
110110
- "False"
111111
failed: []
112-
# https://github.com/cert-manager/cert-manager/blob/c21f257a1c2067dfb5a842ffe98235326456224c/pkg/apis/certmanager/v1/types_certificate.go#L669
112+
# https://github.com/cert-manager/cert-manager/blob/c21f257a1c2067dfb5a842ffe98235326456224c/pkg/apis/certmanager/v1/types_certificate.go#L669
113113
- resourceGroup: "cert-manager.io"
114114
resourceKind: "Certificate"
115115
jsonPath: '$.status.conditions[?(@.type=="Ready")].status'
@@ -121,7 +121,7 @@ rules:
121121
- "Unknown"
122122
- "False"
123123
failed: []
124-
# https://github.com/fluxcd/helm-controller/blob/main/api/v2/helmrelease_types.go#L971
124+
# https://github.com/fluxcd/helm-controller/blob/main/api/v2/helmrelease_types.go#L971
125125
- resourceGroup: "helm.toolkit.fluxcd.io"
126126
resourceKind: "HelmRelease"
127127
jsonPath: "$.status.conditions[?(@.type=='Ready')].status"
@@ -133,7 +133,7 @@ rules:
133133
- "Unknown"
134134
- "False"
135135
failed: []
136-
# https://github.com/fluxcd/kustomize-controller/blob/main/api/v1/kustomization_types.go#L277
136+
# https://github.com/fluxcd/kustomize-controller/blob/main/api/v1/kustomization_types.go#L277
137137
- resourceGroup: "kustomize.toolkit.fluxcd.io"
138138
resourceKind: "Kustomization"
139139
jsonPath: "$.status.conditions[?(@.type=='Ready')].status"
@@ -145,7 +145,7 @@ rules:
145145
- "Unknown"
146146
- "False"
147147
failed: []
148-
# http://github.com/prometheus-operator/prometheus-operator/blob/main/pkg/apis/monitoring/v1/types.go#L228
148+
# http://github.com/prometheus-operator/prometheus-operator/blob/main/pkg/apis/monitoring/v1/types.go#L228
149149
- resourceGroup: "monitoring.coreos.com"
150150
resourceKind: "Prometheus"
151151
jsonPath: "$.status.conditions[?(@.type=='Available')].status"
@@ -211,4 +211,4 @@ rules:
211211
- ""
212212
- "Unknown"
213213
failed:
214-
- "Error"
214+
- "Error"

pkg/trackers/rollout/multitrack/multitrack_display.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,6 @@ func (mt *multitracker) displayMultitrackServiceMessageF(format string, a ...int
218218
logboek.Context(context.Background()).Default().LogFHighlight(format, a...)
219219
}
220220

221-
func (mt *multitracker) displayMultitrackErrorMessageF(format string, a ...interface{}) {
222-
mt.resetLogProcess()
223-
logboek.Context(context.Background()).Warn().LogF(format, a...)
224-
}
225-
226221
func (mt *multitracker) displayStatusProgress() error {
227222
displayLn := false
228223
if mt.displayCalled {

trdl.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
docker_image: golang:1.21-alpine@sha256:fd78f2fb1e49bcf343079bbbb851c936a18fc694df993cbddaa24ace0cc724c5
22
commands:
3-
- go install github.com/mitchellh/gox@8c3b2b9e647dc52457d6ee7b5adcf97e2bafe131
4-
- ./scripts/ci/build_release_v2.sh {{ .Tag }} && cp -a release-build/{{ .Tag }}/* /result
3+
- go install github.com/mitchellh/gox@8c3b2b9e647dc52457d6ee7b5adcf97e2bafe131
4+
- ./scripts/ci/build_release_v2.sh {{ .Tag }} && cp -a release-build/{{ .Tag }}/* /result

0 commit comments

Comments
 (0)