Skip to content

Commit b2369e0

Browse files
fix: ci(chore) replace tags with commit SHA
Signed-off-by: Anitha Natarajan <anataraj@redhat.com>
1 parent ebcd9c2 commit b2369e0

19 files changed

Lines changed: 233 additions & 249 deletions

File tree

.github/workflows/goclean.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ jobs:
2424
goclean:
2525
runs-on: ubuntu-latest
2626
steps:
27-
- uses: actions/checkout@v3 # check-out repository
28-
29-
- name: Setup Go
30-
uses: actions/setup-go@v3
27+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
28+
with:
29+
fetch-depth: 0
30+
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
3131
with:
32-
go-version: '1.20.0'
32+
go-version-file: "go.mod"
3333

3434
- name: go vet
3535
run: |

.github/workflows/kind-e2e.yaml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,23 @@ jobs:
1818
matrix:
1919
# Keep in sync with the list of supported releases: https://kubernetes.io/releases/
2020
k8s-version:
21-
- v1.25.x
22-
- v1.26.x
2321
- v1.27.x
24-
# Needs https://github.com/sigstore/scaffolding/pull/756
25-
# - v1.28.x
22+
- v1.28.x
23+
- v1.29.x
24+
- v1.30.x
2625
uses: ./.github/workflows/reusable-e2e.yaml
2726
with:
2827
k8s-version: ${{ matrix.k8s-version }}
29-
pipelines-release: v0.50.1
28+
pipelines-release: v0.59.6
3029
pipelines-lts:
3130
strategy:
3231
fail-fast: false # Keep running if one leg fails.
3332
matrix:
3433
pipelines-release:
35-
- v0.44.4 # LTS
36-
- v0.47.3 # LTS
37-
- v0.50.1 # LTS
38-
- v0.51.0
34+
- v0.59.6 # Had to change this to working versions during CVE fixes. Older versions gave gcr issue
35+
- v1.0.0
36+
- v1.1.0
3937
uses: ./.github/workflows/reusable-e2e.yaml
4038
with:
41-
k8s-version: v1.26.x
39+
k8s-version: v1.27.x
4240
pipelines-release: ${{ matrix.pipelines-release }}

.github/workflows/lint.yaml

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,14 @@ jobs:
1717
name: lint
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/setup-go@v4
20+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2121
with:
22-
go-version: "1.20"
23-
24-
- uses: actions/checkout@v3
25-
22+
fetch-depth: 0
23+
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
24+
with:
25+
go-version-file: "go.mod"
2626
- name: golangci-lint
27-
uses: golangci/golangci-lint-action@v3
27+
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
2828
with:
29-
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
30-
version: latest
31-
32-
# Optional: working directory, useful for monorepos
33-
# working-directory: somedir
34-
35-
# Optional: golangci-lint command line arguments.
36-
args: --timeout 10m0s
37-
38-
# Optional: show only new issues if it's a pull request. The default value is `false`.
39-
only-new-issues: true
40-
41-
# Optional: if set to true then the all caching functionality will be complete disabled,
42-
# takes precedence over all other caching options.
43-
# skip-cache: true
44-
45-
# Optional: if set to true then the action don't cache or restore ~/go/pkg.
46-
# skip-pkg-cache: true
47-
48-
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
49-
# skip-build-cache: true
29+
version: v2.7.2
30+
args: --new-from-merge-base=origin/${{ github.base_ref }} --timeout=10m

.github/workflows/reusable-e2e.yaml

Lines changed: 30 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,20 @@ jobs:
2727
GOFLAGS: -ldflags=-s -ldflags=-w
2828
KO_DOCKER_REPO: registry.local:5000/knative
2929
KOCACHE: ~/ko
30-
SIGSTORE_SCAFFOLDING_RELEASE_VERSION: "v0.6.6"
31-
TEKTON_PIPELINES_RELEASE: "https://storage.googleapis.com/tekton-releases/pipeline/previous/${{ inputs.pipelines-release }}/release.yaml"
30+
SIGSTORE_SCAFFOLDING_RELEASE_VERSION: "v0.7.2"
31+
TEKTON_PIPELINES_RELEASE: "https://github.com/tektoncd/pipeline/releases/download/${{ inputs.pipelines-release }}/release.yaml"
3232
# Note that we do not include the v prefix here so we can use it in all
3333
# the places this is used.
3434
TEKTON_CLI_RELEASE: "0.30.0"
3535

3636
steps:
37+
- name: Check out our repo
38+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
39+
with:
40+
path: ./src/github.com/tektoncd/chains
41+
3742
# https://github.com/mvdan/github-actions-golang#how-do-i-set-up-caching-between-builds
38-
- uses: actions/cache@v2
43+
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
3944
with:
4045
# In order:
4146
# * Module download cache
@@ -48,43 +53,45 @@ jobs:
4853
restore-keys: |
4954
${{ runner.os }}-go-
5055
51-
- name: Set up Go
52-
uses: actions/setup-go@v2
56+
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
5357
with:
54-
go-version: 1.20.x
58+
go-version-file: "src/github.com/tektoncd/chains/go.mod"
5559

56-
- uses: imjasonh/setup-ko@v0.6
57-
with:
58-
version: tip
60+
- uses: ko-build/setup-ko@d006021bd0c28d1ce33a07e7943d48b079944c8d # v0.9
5961

6062
- name: Install tkn cli
6163
run: |
6264
curl -Lo ./tkn_${{ env.TEKTON_CLI_RELEASE }}_Linux_x86_64.tar.gz https://github.com/tektoncd/cli/releases/download/v${{ env.TEKTON_CLI_RELEASE }}/tkn_${{ env.TEKTON_CLI_RELEASE }}_Linux_x86_64.tar.gz
6365
tar xvzf ./tkn_${{ env.TEKTON_CLI_RELEASE }}_Linux_x86_64.tar.gz tkn
6466
chmod u+x ./tkn
6567
66-
- name: Check out our repo
67-
uses: actions/checkout@v2
68-
with:
69-
path: ./src/github.com/tektoncd/chains
68+
- name: Setup Docker daemon config
69+
run: |
70+
sudo mkdir -p /etc/docker
71+
if [ ! -f /etc/docker/daemon.json ]; then
72+
echo '{}' | sudo tee /etc/docker/daemon.json
73+
fi
7074
7175
- name: Install mirror, kind, knative + sigstore
72-
uses: sigstore/scaffolding/actions/setup@main
76+
uses: sigstore/scaffolding/actions/setup@039e0ece31c5fc9fe0466d2f7b289ed643b88fdb # v0.7.2
7377
with:
7478
k8s-version: ${{ inputs.k8s-version }}
7579
version: ${{ env.SIGSTORE_SCAFFOLDING_RELEASE_VERSION }}
7680
knative-version: 1.9.0
7781

7882
- name: Install Tekton pipelines
7983
run: |
80-
while ! kubectl apply --filename ${{ env.TEKTON_PIPELINES_RELEASE }}
81-
do
82-
echo "waiting for tekton pipelines to get installed"
83-
sleep 2
84-
done
85-
86-
# Restart so picks up the changes.
87-
kubectl -n tekton-pipelines delete po -l app=tekton-pipelines-controller
84+
kubectl apply --filename ${{ env.TEKTON_PIPELINES_RELEASE }}
85+
86+
# Wait for deployments to be available
87+
kubectl wait --for=condition=available --timeout=5m deployment/tekton-pipelines-controller -n tekton-pipelines
88+
kubectl wait --for=condition=available --timeout=5m deployment/tekton-pipelines-webhook -n tekton-pipelines
89+
90+
# Restart controller so it picks up the changes
91+
kubectl -n tekton-pipelines rollout restart deployment/tekton-pipelines-controller
92+
93+
# Wait for controller to be ready after restart
94+
kubectl -n tekton-pipelines rollout status deployment/tekton-pipelines-controller --timeout=5m
8895
8996
- name: Install all the everythings
9097
working-directory: ./src/github.com/tektoncd/chains
@@ -140,7 +147,7 @@ jobs:
140147
141148
- name: Collect diagnostics
142149
if: ${{ failure() }}
143-
uses: chainguard-dev/actions/kind-diag@84c993eaf02da1c325854fb272a4df9184bd80fc # main
150+
uses: chainguard-dev/actions/kind-diag@17095df6250b18f9cc2c2e45b179d9a641668d8c # main
144151
with:
145152
cluster-resources: nodes
146153
namespace-resources: pods,taskruns,jobs

.golang-ci.yaml

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

.golangci.yaml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
version: "2"
2+
run:
3+
build-tags:
4+
- e2e
5+
modules-download-mode: vendor
6+
issues-exit-code: 1
7+
linters:
8+
default: none
9+
enable:
10+
- bodyclose
11+
- containedctx
12+
- decorder
13+
- depguard
14+
- dogsled
15+
- dupl
16+
- dupword
17+
- errcheck
18+
- errchkjson
19+
- errname
20+
- errorlint
21+
- exhaustive
22+
- goconst
23+
- gocritic
24+
- gomodguard
25+
- gosec
26+
- govet
27+
- ireturn
28+
- maintidx
29+
- makezero
30+
- misspell
31+
- musttag
32+
- nakedret
33+
- nilerr
34+
- nilnil
35+
- noctx
36+
- nolintlint
37+
- nosprintfhostport
38+
- revive
39+
- staticcheck
40+
- thelper
41+
- unconvert
42+
- unparam
43+
- unused
44+
- usestdlibvars
45+
- whitespace
46+
settings:
47+
depguard:
48+
rules:
49+
main:
50+
list-mode: lax
51+
allow:
52+
- $gostd
53+
exclusions:
54+
generated: lax
55+
presets:
56+
- common-false-positives
57+
- legacy
58+
- std-error-handling
59+
rules:
60+
- linters:
61+
- errcheck
62+
- gosec
63+
path: _test\.go
64+
paths:
65+
- third_party$
66+
- builtin$
67+
- examples$
68+
issues:
69+
max-issues-per-linter: 0
70+
max-same-issues: 0
71+
new: true
72+
uniq-by-line: false
73+
formatters:
74+
enable:
75+
- gofmt
76+
- goimports
77+
exclusions:
78+
generated: lax
79+
paths:
80+
- third_party$
81+
- builtin$
82+
- examples$

docs/performance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
template:
2020
spec:
2121
containers:
22-
- image: gcr.io/tekton-releases/github.com/tektoncd/chains/cmd/controller:v0.20.0
22+
- image: ghcr.io/tekton-releases/github.com/tektoncd/chains/cmd/controller:v0.20.0
2323
args:
2424
- --threads-per-controller=32
2525
- --kube-api-burst=2

examples/releases/v0.3.0-build-chains-taskrun.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ spec:
3838
- name: IMAGE_DIGEST
3939
steps:
4040
- name: ko
41-
image: gcr.io/tekton-releases/dogfooding/ko@sha256:ff918ec2c8bbe416d5a9b6f9d25dfe9012dce673922fe7b2d5d69a99b02df0ac
41+
image: ghcr.io/tekton-releases/dogfooding/ko@sha256:ff918ec2c8bbe416d5a9b6f9d25dfe9012dce673922fe7b2d5d69a99b02df0ac
4242
workingDir: /workspaces
4343
env:
4444
- name: KO_DOCKER_REPO

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ require (
2929
github.com/stretchr/testify v1.8.4
3030
github.com/tektoncd/pipeline v0.56.0
3131
github.com/tektoncd/plumbing v0.0.0-20230907180608-5625252a2de1
32+
go.opencensus.io v0.24.0
3233
go.uber.org/zap v1.26.0
3334
gocloud.dev v0.36.0
3435
gocloud.dev/docstore/mongodocstore v0.36.0
@@ -400,7 +401,6 @@ require (
400401
gitlab.com/bosi/decorder v0.4.1 // indirect
401402
go-simpler.org/sloglint v0.1.2 // indirect
402403
go.mongodb.org/mongo-driver v1.13.1 // indirect
403-
go.opencensus.io v0.24.0 // indirect
404404
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect
405405
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 // indirect
406406
go.opentelemetry.io/otel v1.21.0 // indirect

0 commit comments

Comments
 (0)