Skip to content

Commit 6f0669a

Browse files
fix: ci action for release branch
Signed-off-by: Anitha Natarajan <anataraj@redhat.com>
1 parent ab93ad4 commit 6f0669a

4 files changed

Lines changed: 30 additions & 33 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ jobs:
4040

4141
steps:
4242
- name: Checkout repository
43-
uses: actions/checkout@v4
43+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
4444

4545
# Initializes the CodeQL tools for scanning.
4646
- name: Initialize CodeQL
47-
uses: github/codeql-action/init@v3
47+
uses: github/codeql-action/init@a8d1ac45b9a34d11fe398d5503176af0d06b303e # v3.30.7
4848
with:
4949
languages: ${{ matrix.language }}
5050
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -58,7 +58,7 @@ jobs:
5858
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
5959
# If this step fails, then you should remove it and run the build manually (see below)
6060
- name: Autobuild
61-
uses: github/codeql-action/autobuild@v3
61+
uses: github/codeql-action/autobuild@a8d1ac45b9a34d11fe398d5503176af0d06b303e # v3.30.7
6262

6363
# ℹ️ Command-line programs to run using the OS shell.
6464
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -71,6 +71,6 @@ jobs:
7171
# ./location_of_script_within_repo/buildscript.sh
7272

7373
- name: Perform CodeQL Analysis
74-
uses: github/codeql-action/analyze@v3
74+
uses: github/codeql-action/analyze@a8d1ac45b9a34d11fe398d5503176af0d06b303e # v3.30.7
7575
with:
76-
category: "/language:${{matrix.language}}"
76+
category: "/language:${{matrix.language}}"

.github/workflows/lint.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,25 @@ jobs:
2424
steps:
2525
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
2626
with:
27-
go-version: "1.22"
27+
go-version: "1.23"
2828

2929
- uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7
30+
with:
31+
fetch-depth: 0
3032

3133
- name: golangci-lint
32-
uses: golangci/golangci-lint-action@v6.2.0
34+
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
3335
with:
3436
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
3537
version: latest
36-
38+
args: --new-from-merge-base=origin/${{ github.base_ref }} --timeout=10m
3739
# Optional: working directory, useful for monorepos
3840
# working-directory: somedir
3941

4042
# Optional: golangci-lint command line arguments.
4143

4244
# Optional: show only new issues if it's a pull request. The default value is `false`.
43-
only-new-issues: true
45+
# only-new-issues: true
4446

4547
# Optional: if set to true then the all caching functionality will be complete disabled,
4648
# takes precedence over all other caching options.
@@ -50,4 +52,4 @@ jobs:
5052
# skip-pkg-cache: true
5153

5254
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
53-
# skip-build-cache: true
55+
# skip-build-cache: true

.github/workflows/reusable-e2e.yaml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,35 +27,29 @@ jobs:
2727
GOFLAGS: -ldflags=-s -ldflags=-w
2828
KO_DOCKER_REPO: registry.local:5000/knative
2929
KOCACHE: ~/ko
30-
SIGSTORE_SCAFFOLDING_RELEASE_VERSION: "v0.7.12"
30+
SIGSTORE_SCAFFOLDING_RELEASE_VERSION: "v0.7.24"
3131
TEKTON_PIPELINES_RELEASE: "https://storage.googleapis.com/tekton-releases/pipeline/previous/${{ 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.
34-
TEKTON_CLI_RELEASE: "0.30.0"
34+
SKIP_INITIALIZE: true
3535

3636
steps:
3737
- name: Set up Go
3838
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
3939
with:
4040
go-version: 1.22.x
4141

42-
- uses: ko-build/setup-ko@v0.9
42+
- uses: ko-build/setup-ko@d006021bd0c28d1ce33a07e7943d48b079944c8d # v0.9
4343
with:
4444
version: tip
4545

46-
- name: Install tkn cli
47-
run: |
48-
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
49-
tar xvzf ./tkn_${{ env.TEKTON_CLI_RELEASE }}_Linux_x86_64.tar.gz tkn
50-
chmod u+x ./tkn
51-
5246
- name: Check out our repo
5347
uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7
5448
with:
5549
path: ./src/github.com/tektoncd/chains
5650

5751
- name: Install mirror, kind, knative + sigstore
58-
uses: sigstore/scaffolding/actions/setup@main
52+
uses: sigstore/scaffolding/actions/setup@d40cf576f588d980142f0b8462c425d7b32f00b1 # v0.7.25
5953
with:
6054
k8s-version: ${{ inputs.k8s-version }}
6155
version: ${{ env.SIGSTORE_SCAFFOLDING_RELEASE_VERSION }}
@@ -72,12 +66,14 @@ jobs:
7266
# Restart so picks up the changes.
7367
kubectl -n tekton-pipelines delete po -l app=tekton-pipelines-controller
7468
75-
- name: Install all the everythings
69+
- name: Run integration tests
7670
working-directory: ./src/github.com/tektoncd/chains
77-
timeout-minutes: 10
7871
run: |
79-
ko apply -BRf ./config/
72+
./test/presubmit-tests.sh --integration-tests
8073
74+
75+
- name: Run tutorial taskrun
76+
run: |
8177
kubectl patch configmap/chains-config \
8278
--namespace tekton-chains \
8379
--type merge \
@@ -88,10 +84,8 @@ jobs:
8884
8985
# TODO(vaikas): Better way to find when the chains has picked up
9086
# the changes
91-
sleep 10
87+
sleep 20
9288
93-
- name: Run tutorial taskrun
94-
run: |
9589
kubectl create -f https://raw.githubusercontent.com/tektoncd/chains/main/examples/taskruns/task-output-image.yaml
9690
9791
# Sleep so the taskrun shows up.
@@ -103,7 +97,7 @@ jobs:
10397
echo "Waiting for Chains to do it's thing"
10498
for i in {1..10}
10599
do
106-
./tkn tr describe --last -o jsonpath="{.metadata.annotations.chains\.tekton\.dev/transparency}" > tektonentry
100+
tkn tr describe --last -o jsonpath="{.metadata.annotations.chains\.tekton\.dev/transparency}" > tektonentry
107101
108102
if [ -s ./tektonentry ]; then
109103
if grep --quiet rekor.rekor-system.svc ./tektonentry ; then
@@ -126,7 +120,7 @@ jobs:
126120
127121
- name: Collect diagnostics
128122
if: ${{ failure() }}
129-
uses: chainguard-dev/actions/kind-diag@9c0be1ee0103db886d1887d114ec97f8766b7ef8 # main
123+
uses: chainguard-dev/actions/kind-diag@5363dd9eb48083bbf7674a4bbe62d71c3b230edd # v1.1.2
130124
with:
131125
cluster-resources: nodes
132-
namespace-resources: pods,taskruns,jobs
126+
namespace-resources: pods,taskruns,jobs

.golangci.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Documentation: https://golangci-lint.run/usage/configuration/
2+
version: "2"
23
linters:
34
disable-all: true
45
enable:
@@ -16,11 +17,8 @@ linters:
1617
- exhaustive
1718
- goconst
1819
- gocritic
19-
- gofmt
20-
- goimports
2120
- gomodguard
2221
- gosec
23-
- gosimple
2422
- govet
2523
- ireturn
2624
- maintidx
@@ -36,12 +34,15 @@ linters:
3634
- revive
3735
- staticcheck
3836
- thelper
39-
- typecheck
4037
- unconvert
4138
- unparam
4239
- unused
4340
- usestdlibvars
4441
- whitespace
42+
formatters:
43+
enable:
44+
- gofmt
45+
- goimports
4546
linters-settings:
4647
depguard:
4748
rules:

0 commit comments

Comments
 (0)