diff --git a/.github/workflows/goclean.yml b/.github/workflows/goclean.yml index ab8b5794c3..532e337251 100644 --- a/.github/workflows/goclean.yml +++ b/.github/workflows/goclean.yml @@ -24,12 +24,12 @@ jobs: goclean: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 # check-out repository - - - name: Setup Go - uses: actions/setup-go@v3 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + fetch-depth: 0 + - uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0 with: - go-version: '1.20.0' + go-version-file: "go.mod" - name: go vet run: | diff --git a/.github/workflows/kind-e2e.yaml b/.github/workflows/kind-e2e.yaml index 67f5202fe1..6bc680f639 100644 --- a/.github/workflows/kind-e2e.yaml +++ b/.github/workflows/kind-e2e.yaml @@ -18,25 +18,21 @@ jobs: matrix: # Keep in sync with the list of supported releases: https://kubernetes.io/releases/ k8s-version: - - v1.25.x - - v1.26.x - v1.27.x - # Needs https://github.com/sigstore/scaffolding/pull/756 - # - v1.28.x + - v1.28.x + - v1.29.x + - v1.30.x uses: ./.github/workflows/reusable-e2e.yaml with: k8s-version: ${{ matrix.k8s-version }} - pipelines-release: v0.50.1 + pipelines-release: v0.59.6 pipelines-lts: strategy: fail-fast: false # Keep running if one leg fails. matrix: pipelines-release: - - v0.44.4 # LTS - - v0.47.3 # LTS - - v0.50.1 # LTS - - v0.51.0 + - v0.59.6 # Had to change this to working versions during CVE fixes. Older versions gave gcr issue uses: ./.github/workflows/reusable-e2e.yaml with: - k8s-version: v1.26.x + k8s-version: v1.27.x pipelines-release: ${{ matrix.pipelines-release }} diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index e94cfb7904..f321151dcf 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -17,33 +17,14 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v4 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: - go-version: "1.20" - - - uses: actions/checkout@v3 - + fetch-depth: 0 + - uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0 + with: + go-version-file: "go.mod" - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0 with: - # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version - version: latest - - # Optional: working directory, useful for monorepos - # working-directory: somedir - - # Optional: golangci-lint command line arguments. - args: --timeout 10m0s - - # Optional: show only new issues if it's a pull request. The default value is `false`. - only-new-issues: true - - # Optional: if set to true then the all caching functionality will be complete disabled, - # takes precedence over all other caching options. - # skip-cache: true - - # Optional: if set to true then the action don't cache or restore ~/go/pkg. - # skip-pkg-cache: true - - # Optional: if set to true then the action don't cache or restore ~/.cache/go-build. - # skip-build-cache: true + version: v2.7.2 + args: --new-from-merge-base=origin/${{ github.base_ref }} --timeout=10m diff --git a/.github/workflows/reusable-e2e.yaml b/.github/workflows/reusable-e2e.yaml index d9081bfeda..61a08aa78b 100644 --- a/.github/workflows/reusable-e2e.yaml +++ b/.github/workflows/reusable-e2e.yaml @@ -27,15 +27,20 @@ jobs: GOFLAGS: -ldflags=-s -ldflags=-w KO_DOCKER_REPO: registry.local:5000/knative KOCACHE: ~/ko - SIGSTORE_SCAFFOLDING_RELEASE_VERSION: "v0.6.6" - TEKTON_PIPELINES_RELEASE: "https://storage.googleapis.com/tekton-releases/pipeline/previous/${{ inputs.pipelines-release }}/release.yaml" + SIGSTORE_SCAFFOLDING_RELEASE_VERSION: "v0.7.2" + TEKTON_PIPELINES_RELEASE: "https://github.com/tektoncd/pipeline/releases/download/${{ inputs.pipelines-release }}/release.yaml" # Note that we do not include the v prefix here so we can use it in all # the places this is used. TEKTON_CLI_RELEASE: "0.30.0" steps: + - name: Check out our repo + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + path: ./src/github.com/tektoncd/chains + # https://github.com/mvdan/github-actions-golang#how-do-i-set-up-caching-between-builds - - uses: actions/cache@v2 + - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: # In order: # * Module download cache @@ -48,14 +53,11 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Set up Go - uses: actions/setup-go@v2 + - uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0 with: - go-version: 1.20.x + go-version-file: "src/github.com/tektoncd/chains/go.mod" - - uses: imjasonh/setup-ko@v0.6 - with: - version: tip + - uses: ko-build/setup-ko@d006021bd0c28d1ce33a07e7943d48b079944c8d # v0.9 - name: Install tkn cli run: | @@ -63,13 +65,15 @@ jobs: tar xvzf ./tkn_${{ env.TEKTON_CLI_RELEASE }}_Linux_x86_64.tar.gz tkn chmod u+x ./tkn - - name: Check out our repo - uses: actions/checkout@v2 - with: - path: ./src/github.com/tektoncd/chains + - name: Setup Docker daemon config + run: | + sudo mkdir -p /etc/docker + if [ ! -f /etc/docker/daemon.json ]; then + echo '{}' | sudo tee /etc/docker/daemon.json + fi - name: Install mirror, kind, knative + sigstore - uses: sigstore/scaffolding/actions/setup@main + uses: sigstore/scaffolding/actions/setup@039e0ece31c5fc9fe0466d2f7b289ed643b88fdb # v0.7.2 with: k8s-version: ${{ inputs.k8s-version }} version: ${{ env.SIGSTORE_SCAFFOLDING_RELEASE_VERSION }} @@ -77,14 +81,17 @@ jobs: - name: Install Tekton pipelines run: | - while ! kubectl apply --filename ${{ env.TEKTON_PIPELINES_RELEASE }} - do - echo "waiting for tekton pipelines to get installed" - sleep 2 - done - - # Restart so picks up the changes. - kubectl -n tekton-pipelines delete po -l app=tekton-pipelines-controller + kubectl apply --filename ${{ env.TEKTON_PIPELINES_RELEASE }} + + # Wait for deployments to be available + kubectl wait --for=condition=available --timeout=5m deployment/tekton-pipelines-controller -n tekton-pipelines + kubectl wait --for=condition=available --timeout=5m deployment/tekton-pipelines-webhook -n tekton-pipelines + + # Restart controller so it picks up the changes + kubectl -n tekton-pipelines rollout restart deployment/tekton-pipelines-controller + + # Wait for controller to be ready after restart + kubectl -n tekton-pipelines rollout status deployment/tekton-pipelines-controller --timeout=5m - name: Install all the everythings working-directory: ./src/github.com/tektoncd/chains @@ -140,7 +147,7 @@ jobs: - name: Collect diagnostics if: ${{ failure() }} - uses: chainguard-dev/actions/kind-diag@84c993eaf02da1c325854fb272a4df9184bd80fc # main + uses: chainguard-dev/actions/kind-diag@17095df6250b18f9cc2c2e45b179d9a641668d8c # main with: cluster-resources: nodes namespace-resources: pods,taskruns,jobs diff --git a/.golang-ci.yaml b/.golang-ci.yaml deleted file mode 100644 index 670425c6ab..0000000000 --- a/.golang-ci.yaml +++ /dev/null @@ -1,84 +0,0 @@ -# Documentation: https://golangci-lint.run/usage/configuration/ -linters-settings: -linters: - enable: - - bodyclose - - containedctx - - decorder - - depguard - - dogsled - - dupl - - dupword - - errcheck - - errchkjson - - errname - - errorlint - - exhaustive - - goconst - - gocritic - - gofmt - - goimports - - gomodguard - - gosec - - gosimple - - govet - - ireturn - - maintidx - - makezero - - misspell - - musttag - - nakedret - - nilerr - - nilnil - - noctx - - nolintlint - - nosprintfhostport - - revive - - staticheck - - thelper - - typecheck - - unconvert - - unparam - - unused - - usestdlibvars - - whitespace - - wrapcheck - # Enabling presets means that new linters that we automatically adopt new - # linters that augment a preset. This also opts us in for replacement linters - # when a linter is deprecated. - presets: - - bugs - - comment - - complexity - - error - - format - - import - - metalinter - - module - - performance - - sql - - style - - test - - unused -output: - uniq-by-line: false -issues: - exclude-rules: - - path: _test\.go - linters: - - errcheck - - gosec - max-issues-per-linter: 0 - max-same-issues: 0 - include: - # Enable off-by-default rules for revive requiring that all exported elements have a properly formatted comment. - - EXC0012 # https://golangci-lint.run/usage/false-positives/#exc0012 - - EXC0014 # https://golangci-lint.run/usage/false-positives/#exc0014 -run: - issues-exit-code: 1 - build-tags: - - e2e - skip-dirs: - - vendor - timeout: 20m - modules-download-mode: vendor diff --git a/.golangci.yaml b/.golangci.yaml new file mode 100644 index 0000000000..a8f05991e5 --- /dev/null +++ b/.golangci.yaml @@ -0,0 +1,82 @@ +version: "2" +run: + build-tags: + - e2e + modules-download-mode: vendor + issues-exit-code: 1 +linters: + default: none + enable: + - bodyclose + - containedctx + - decorder + - depguard + - dogsled + - dupl + - dupword + - errcheck + - errchkjson + - errname + - errorlint + - exhaustive + - goconst + - gocritic + - gomodguard + - gosec + - govet + - ireturn + - maintidx + - makezero + - misspell + - musttag + - nakedret + - nilerr + - nilnil + - noctx + - nolintlint + - nosprintfhostport + - revive + - staticcheck + - thelper + - unconvert + - unparam + - unused + - usestdlibvars + - whitespace + settings: + depguard: + rules: + main: + list-mode: lax + allow: + - $gostd + exclusions: + generated: lax + presets: + - common-false-positives + - legacy + - std-error-handling + rules: + - linters: + - errcheck + - gosec + path: _test\.go + paths: + - third_party$ + - builtin$ + - examples$ +issues: + max-issues-per-linter: 0 + max-same-issues: 0 + new: true + uniq-by-line: false +formatters: + enable: + - gofmt + - goimports + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ \ No newline at end of file diff --git a/docs/performance.md b/docs/performance.md index 0043a96520..9fa4e3234e 100644 --- a/docs/performance.md +++ b/docs/performance.md @@ -19,7 +19,7 @@ spec: template: spec: containers: - - image: gcr.io/tekton-releases/github.com/tektoncd/chains/cmd/controller:v0.20.0 + - image: ghcr.io/tekton-releases/github.com/tektoncd/chains/cmd/controller:v0.20.0 args: - --threads-per-controller=32 - --kube-api-burst=2 diff --git a/examples/releases/v0.3.0-build-chains-taskrun.yaml b/examples/releases/v0.3.0-build-chains-taskrun.yaml index db9b95bc9a..7f491761d9 100644 --- a/examples/releases/v0.3.0-build-chains-taskrun.yaml +++ b/examples/releases/v0.3.0-build-chains-taskrun.yaml @@ -38,7 +38,7 @@ spec: - name: IMAGE_DIGEST steps: - name: ko - image: gcr.io/tekton-releases/dogfooding/ko@sha256:ff918ec2c8bbe416d5a9b6f9d25dfe9012dce673922fe7b2d5d69a99b02df0ac + image: ghcr.io/tekton-releases/dogfooding/ko@sha256:ff918ec2c8bbe416d5a9b6f9d25dfe9012dce673922fe7b2d5d69a99b02df0ac workingDir: /workspaces env: - name: KO_DOCKER_REPO diff --git a/go.mod b/go.mod index 9e27cc1d12..b2fdada2d7 100644 --- a/go.mod +++ b/go.mod @@ -29,6 +29,7 @@ require ( github.com/stretchr/testify v1.8.4 github.com/tektoncd/pipeline v0.56.0 github.com/tektoncd/plumbing v0.0.0-20230907180608-5625252a2de1 + go.opencensus.io v0.24.0 go.uber.org/zap v1.26.0 gocloud.dev v0.36.0 gocloud.dev/docstore/mongodocstore v0.36.0 @@ -400,7 +401,6 @@ require ( gitlab.com/bosi/decorder v0.4.1 // indirect go-simpler.org/sloglint v0.1.2 // indirect go.mongodb.org/mongo-driver v1.13.1 // indirect - go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 // indirect go.opentelemetry.io/otel v1.21.0 // indirect diff --git a/pkg/chains/formats/slsa/internal/artifact/append_test.go b/pkg/chains/formats/slsa/internal/artifact/append_test.go index 3ea0704744..16ac891087 100644 --- a/pkg/chains/formats/slsa/internal/artifact/append_test.go +++ b/pkg/chains/formats/slsa/internal/artifact/append_test.go @@ -33,7 +33,7 @@ func TestAppendSubjects(t *testing.T) { name: "add a completely new subject", original: []intoto.Subject{ { - Name: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + Name: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "a", }, @@ -46,7 +46,7 @@ func TestAppendSubjects(t *testing.T) { }, toAdd: []intoto.Subject{ { - Name: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init", + Name: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init", Digest: common.DigestSet{ "sha256": "c", }, @@ -54,7 +54,7 @@ func TestAppendSubjects(t *testing.T) { }, want: []intoto.Subject{ { - Name: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + Name: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "a", }, @@ -64,7 +64,7 @@ func TestAppendSubjects(t *testing.T) { "sha256": "b", }, }, { - Name: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init", + Name: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init", Digest: common.DigestSet{ "sha256": "c", }, @@ -74,7 +74,7 @@ func TestAppendSubjects(t *testing.T) { name: "add a subject with same uri and digest", original: []intoto.Subject{ { - Name: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + Name: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "a", }, @@ -82,7 +82,7 @@ func TestAppendSubjects(t *testing.T) { }, toAdd: []intoto.Subject{ { - Name: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + Name: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "a", }, @@ -90,7 +90,7 @@ func TestAppendSubjects(t *testing.T) { }, want: []intoto.Subject{ { - Name: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + Name: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "a", }, @@ -100,7 +100,7 @@ func TestAppendSubjects(t *testing.T) { name: "add a subject with same uri but different digest", original: []intoto.Subject{ { - Name: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + Name: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "a", }, @@ -108,7 +108,7 @@ func TestAppendSubjects(t *testing.T) { }, toAdd: []intoto.Subject{ { - Name: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + Name: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b", }, @@ -116,12 +116,12 @@ func TestAppendSubjects(t *testing.T) { }, want: []intoto.Subject{ { - Name: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + Name: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "a", }, }, { - Name: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + Name: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b", }, @@ -132,7 +132,7 @@ func TestAppendSubjects(t *testing.T) { name: "add a subject with same uri, one common digest and one different digest", original: []intoto.Subject{ { - Name: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + Name: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "a", "sha224": "b", @@ -141,7 +141,7 @@ func TestAppendSubjects(t *testing.T) { }, toAdd: []intoto.Subject{ { - Name: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + Name: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "a", "sha512": "c", @@ -150,7 +150,7 @@ func TestAppendSubjects(t *testing.T) { }, want: []intoto.Subject{ { - Name: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + Name: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "a", "sha224": "b", @@ -181,7 +181,7 @@ func TestAppendMaterials(t *testing.T) { name: "add a completely new material", original: []common.ProvenanceMaterial{ { - URI: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "a", }, @@ -194,7 +194,7 @@ func TestAppendMaterials(t *testing.T) { }, toAdd: []common.ProvenanceMaterial{ { - URI: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init", + URI: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init", Digest: common.DigestSet{ "sha256": "c", }, @@ -202,7 +202,7 @@ func TestAppendMaterials(t *testing.T) { }, want: []common.ProvenanceMaterial{ { - URI: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "a", }, @@ -212,7 +212,7 @@ func TestAppendMaterials(t *testing.T) { "sha256": "b", }, }, { - URI: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init", + URI: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init", Digest: common.DigestSet{ "sha256": "c", }, @@ -222,7 +222,7 @@ func TestAppendMaterials(t *testing.T) { name: "add a material with same uri and digest", original: []common.ProvenanceMaterial{ { - URI: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "a", }, @@ -230,7 +230,7 @@ func TestAppendMaterials(t *testing.T) { }, toAdd: []common.ProvenanceMaterial{ { - URI: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "a", }, @@ -238,7 +238,7 @@ func TestAppendMaterials(t *testing.T) { }, want: []common.ProvenanceMaterial{ { - URI: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "a", }, @@ -248,7 +248,7 @@ func TestAppendMaterials(t *testing.T) { name: "add a material with same uri but different digest", original: []common.ProvenanceMaterial{ { - URI: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "a", }, @@ -256,7 +256,7 @@ func TestAppendMaterials(t *testing.T) { }, toAdd: []common.ProvenanceMaterial{ { - URI: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b", }, @@ -264,12 +264,12 @@ func TestAppendMaterials(t *testing.T) { }, want: []common.ProvenanceMaterial{ { - URI: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "a", }, }, { - URI: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b", }, @@ -280,7 +280,7 @@ func TestAppendMaterials(t *testing.T) { name: "add a material with same uri, one common digest and one different digest", original: []common.ProvenanceMaterial{ { - URI: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "a", "sha224": "b", @@ -289,7 +289,7 @@ func TestAppendMaterials(t *testing.T) { }, toAdd: []common.ProvenanceMaterial{ { - URI: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "a", "sha512": "c", @@ -298,7 +298,7 @@ func TestAppendMaterials(t *testing.T) { }, want: []common.ProvenanceMaterial{ { - URI: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "a", "sha224": "b", diff --git a/pkg/chains/formats/slsa/internal/material/material_test.go b/pkg/chains/formats/slsa/internal/material/material_test.go index 9bd827aa8e..f623f5d9f1 100644 --- a/pkg/chains/formats/slsa/internal/material/material_test.go +++ b/pkg/chains/formats/slsa/internal/material/material_test.go @@ -263,10 +263,10 @@ func TestTaskMaterials(t *testing.T) { TaskRunStatusFields: v1.TaskRunStatusFields{ Steps: []v1.StepState{{ Name: "git-source-repo-jwqcl", - ImageID: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", + ImageID: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, { Name: "git-source-repo-repeat-again-jwqcl", - ImageID: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", + ImageID: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, { Name: "build", ImageID: "gcr.io/cloud-marketplace-containers/google/bazel@sha256:010a1ecd1a8c3610f12039a25b823e3a17bd3e8ae455a53e340dcfdd37a49964", @@ -276,7 +276,7 @@ func TestTaskMaterials(t *testing.T) { }), want: []common.ProvenanceMaterial{ { - URI: artifacts.OCIScheme + "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: artifacts.OCIScheme + "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, @@ -296,24 +296,24 @@ func TestTaskMaterials(t *testing.T) { TaskRunStatusFields: v1.TaskRunStatusFields{ Steps: []v1.StepState{{ Name: "git-source-repo-jwqcl", - ImageID: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", + ImageID: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, { Name: "git-source-repo-repeat-again-jwqcl", - ImageID: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", + ImageID: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, { Name: "build", ImageID: "gcr.io/cloud-marketplace-containers/google/bazel@sha256:010a1ecd1a8c3610f12039a25b823e3a17bd3e8ae455a53e340dcfdd37a49964", }}, Sidecars: []v1.SidecarState{{ Name: "sidecar-jwqcl", - ImageID: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init@sha256:a1234f6e7a69617db57b685893256f978436277094c21d43b153994acd8a09567", + ImageID: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init@sha256:a1234f6e7a69617db57b685893256f978436277094c21d43b153994acd8a09567", }}, }, }, }), want: []common.ProvenanceMaterial{ { - URI: artifacts.OCIScheme + "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: artifacts.OCIScheme + "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, @@ -323,7 +323,7 @@ func TestTaskMaterials(t *testing.T) { "sha256": "010a1ecd1a8c3610f12039a25b823e3a17bd3e8ae455a53e340dcfdd37a49964", }, }, { - URI: artifacts.OCIScheme + "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init", + URI: artifacts.OCIScheme + "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init", Digest: common.DigestSet{ "sha256": "a1234f6e7a69617db57b685893256f978436277094c21d43b153994acd8a09567", }, diff --git a/pkg/chains/formats/slsa/internal/material/v1beta1/material_test.go b/pkg/chains/formats/slsa/internal/material/v1beta1/material_test.go index f9a0dc4fb3..0937e79795 100644 --- a/pkg/chains/formats/slsa/internal/material/v1beta1/material_test.go +++ b/pkg/chains/formats/slsa/internal/material/v1beta1/material_test.go @@ -259,10 +259,10 @@ func TestTaskMaterials(t *testing.T) { TaskRunStatusFields: v1beta1.TaskRunStatusFields{ Steps: []v1beta1.StepState{{ Name: "git-source-repo-jwqcl", - ImageID: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", + ImageID: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, { Name: "git-source-repo-repeat-again-jwqcl", - ImageID: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", + ImageID: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, { Name: "build", ImageID: "gcr.io/cloud-marketplace-containers/google/bazel@sha256:010a1ecd1a8c3610f12039a25b823e3a17bd3e8ae455a53e340dcfdd37a49964", @@ -272,7 +272,7 @@ func TestTaskMaterials(t *testing.T) { }, want: []common.ProvenanceMaterial{ { - URI: artifacts.OCIScheme + "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: artifacts.OCIScheme + "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, @@ -291,24 +291,24 @@ func TestTaskMaterials(t *testing.T) { TaskRunStatusFields: v1beta1.TaskRunStatusFields{ Steps: []v1beta1.StepState{{ Name: "git-source-repo-jwqcl", - ImageID: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", + ImageID: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, { Name: "git-source-repo-repeat-again-jwqcl", - ImageID: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", + ImageID: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, { Name: "build", ImageID: "gcr.io/cloud-marketplace-containers/google/bazel@sha256:010a1ecd1a8c3610f12039a25b823e3a17bd3e8ae455a53e340dcfdd37a49964", }}, Sidecars: []v1beta1.SidecarState{{ Name: "sidecar-jwqcl", - ImageID: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init@sha256:a1234f6e7a69617db57b685893256f978436277094c21d43b153994acd8a09567", + ImageID: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init@sha256:a1234f6e7a69617db57b685893256f978436277094c21d43b153994acd8a09567", }}, }, }, }, want: []common.ProvenanceMaterial{ { - URI: artifacts.OCIScheme + "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: artifacts.OCIScheme + "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, @@ -318,7 +318,7 @@ func TestTaskMaterials(t *testing.T) { "sha256": "010a1ecd1a8c3610f12039a25b823e3a17bd3e8ae455a53e340dcfdd37a49964", }, }, { - URI: artifacts.OCIScheme + "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init", + URI: artifacts.OCIScheme + "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init", Digest: common.DigestSet{ "sha256": "a1234f6e7a69617db57b685893256f978436277094c21d43b153994acd8a09567", }, diff --git a/pkg/chains/formats/slsa/internal/resolved_dependencies/resolved_dependencies_test.go b/pkg/chains/formats/slsa/internal/resolved_dependencies/resolved_dependencies_test.go index e3516423df..35f661188e 100644 --- a/pkg/chains/formats/slsa/internal/resolved_dependencies/resolved_dependencies_test.go +++ b/pkg/chains/formats/slsa/internal/resolved_dependencies/resolved_dependencies_test.go @@ -33,7 +33,7 @@ func TestRemoveDuplicates(t *testing.T) { name: "no duplicate resolvedDependencies", rds: []v1slsa.ResourceDescriptor{ { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, @@ -43,7 +43,7 @@ func TestRemoveDuplicates(t *testing.T) { "sha256": "010a1ecd1a8c3610f12039a25b823e3a17bd3e8ae455a53e340dcfdd37a49964", }, }, { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init", Digest: common.DigestSet{ "sha256": "a1234f6e7a69617db57b685893256f978436277094c21d43b153994acd8a09567", }, @@ -51,7 +51,7 @@ func TestRemoveDuplicates(t *testing.T) { }, want: []v1slsa.ResourceDescriptor{ { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, @@ -61,7 +61,7 @@ func TestRemoveDuplicates(t *testing.T) { "sha256": "010a1ecd1a8c3610f12039a25b823e3a17bd3e8ae455a53e340dcfdd37a49964", }, }, { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init", Digest: common.DigestSet{ "sha256": "a1234f6e7a69617db57b685893256f978436277094c21d43b153994acd8a09567", }, @@ -71,12 +71,12 @@ func TestRemoveDuplicates(t *testing.T) { name: "same uri and digest", rds: []v1slsa.ResourceDescriptor{ { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, }, { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, @@ -84,7 +84,7 @@ func TestRemoveDuplicates(t *testing.T) { }, want: []v1slsa.ResourceDescriptor{ { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, @@ -94,12 +94,12 @@ func TestRemoveDuplicates(t *testing.T) { name: "same uri but different digest", rds: []v1slsa.ResourceDescriptor{ { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, }, { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01248", }, @@ -107,12 +107,12 @@ func TestRemoveDuplicates(t *testing.T) { }, want: []v1slsa.ResourceDescriptor{ { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, }, { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01248", }, @@ -122,12 +122,12 @@ func TestRemoveDuplicates(t *testing.T) { name: "same uri but different digest, swap order", rds: []v1slsa.ResourceDescriptor{ { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01248", }, }, { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, @@ -135,12 +135,12 @@ func TestRemoveDuplicates(t *testing.T) { }, want: []v1slsa.ResourceDescriptor{ { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01248", }, }, { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, @@ -150,18 +150,18 @@ func TestRemoveDuplicates(t *testing.T) { name: "task config must be present", rds: []v1slsa.ResourceDescriptor{ { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01248", }, }, { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, }, { Name: "task", - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, @@ -169,18 +169,18 @@ func TestRemoveDuplicates(t *testing.T) { }, want: []v1slsa.ResourceDescriptor{ { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01248", }, }, { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, }, { Name: "task", - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, @@ -190,18 +190,18 @@ func TestRemoveDuplicates(t *testing.T) { name: "pipeline config must be present", rds: []v1slsa.ResourceDescriptor{ { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01248", }, }, { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, }, { Name: "pipeline", - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, @@ -209,18 +209,18 @@ func TestRemoveDuplicates(t *testing.T) { }, want: []v1slsa.ResourceDescriptor{ { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01248", }, }, { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, }, { Name: "pipeline", - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, diff --git a/pkg/chains/formats/slsa/v1/taskrun/buildconfig_test.go b/pkg/chains/formats/slsa/v1/taskrun/buildconfig_test.go index 8cb616995f..8e12ebf9e7 100644 --- a/pkg/chains/formats/slsa/v1/taskrun/buildconfig_test.go +++ b/pkg/chains/formats/slsa/v1/taskrun/buildconfig_test.go @@ -49,7 +49,7 @@ status: resources: {} steps: - container: step-git-source-repo-jwqcl - imageID: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247 + imageID: ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247 name: git-source-repo-jwqcl terminated: containerID: containerd://3e1aee4d75207745803b904a79dfdec3b9d5e30652b1af9336d0259f86c43873 @@ -69,7 +69,7 @@ status: { EntryPoint: "", Environment: map[string]interface{}{ - "image": artifacts.OCIScheme + "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", + "image": artifacts.OCIScheme + "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", "container": "git-source-repo-jwqcl", }, Arguments: interface{}([]string(nil)), diff --git a/pkg/chains/formats/slsa/v2alpha1/README.md b/pkg/chains/formats/slsa/v2alpha1/README.md index fe0060aa26..3f3dd4a899 100644 --- a/pkg/chains/formats/slsa/v2alpha1/README.md +++ b/pkg/chains/formats/slsa/v2alpha1/README.md @@ -17,7 +17,7 @@ spec: resolver: bundles params: - name: bundle - value: gcr.io/tekton-releases/catalog/upstream/git-clone:0.9 + value: ghcr.io/tekton-releases/catalog/upstream/git-clone:0.9 - name: name value: git-clone - name: kind @@ -47,7 +47,7 @@ The following output was generated. Notice the following below: "buildType": "https://chains.tekton.dev/format/slsa/v2alpha1/type/tekton.dev/v1/TaskRun", "invocation": { "configSource": { - "uri": "gcr.io/tekton-releases/catalog/upstream/git-clone", + "uri": "ghcr.io/tekton-releases/catalog/upstream/git-clone", "digest": { "sha256": "1ee0f45892faf152aa631b0745f192e353c684408286bc55e9041edfaf22cb5e" }, @@ -196,7 +196,7 @@ The following output was generated. Notice the following below: "name": "gitInitImage", "type": "string", "description": "The image providing the git-init binary that this Task runs.", - "default": "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.40.2" + "default": "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.40.2" }, { "name": "userHome", @@ -209,7 +209,7 @@ The following output was generated. Notice the following below: "steps": [ { "name": "clone", - "image": "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.40.2", + "image": "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.40.2", "env": [ { "name": "HOME", @@ -372,7 +372,7 @@ The following output was generated. Notice the following below: }, "materials": [ { - "uri": "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + "uri": "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", "digest": { "sha256": "28ff94e63e4058afc3f15b4c11c08cf3b54fa91faa646a4bbac90380cd7158df" } diff --git a/pkg/chains/formats/slsa/v2alpha2/internal/resolved_dependencies/resolved_dependencies_test.go b/pkg/chains/formats/slsa/v2alpha2/internal/resolved_dependencies/resolved_dependencies_test.go index 3f68bdb573..5f29de5640 100644 --- a/pkg/chains/formats/slsa/v2alpha2/internal/resolved_dependencies/resolved_dependencies_test.go +++ b/pkg/chains/formats/slsa/v2alpha2/internal/resolved_dependencies/resolved_dependencies_test.go @@ -216,10 +216,10 @@ func TestTaskRun(t *testing.T) { TaskRunStatusFields: v1beta1.TaskRunStatusFields{ Steps: []v1beta1.StepState{{ Name: "git-source-repo-jwqcl", - ImageID: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", + ImageID: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, { Name: "git-source-repo-repeat-again-jwqcl", - ImageID: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", + ImageID: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, { Name: "build", ImageID: "gcr.io/cloud-marketplace-containers/google/bazel@sha256:010a1ecd1a8c3610f12039a25b823e3a17bd3e8ae455a53e340dcfdd37a49964", @@ -229,7 +229,7 @@ func TestTaskRun(t *testing.T) { }, want: []v1.ResourceDescriptor{ { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, @@ -248,24 +248,24 @@ func TestTaskRun(t *testing.T) { TaskRunStatusFields: v1beta1.TaskRunStatusFields{ Steps: []v1beta1.StepState{{ Name: "git-source-repo-jwqcl", - ImageID: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", + ImageID: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, { Name: "git-source-repo-repeat-again-jwqcl", - ImageID: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", + ImageID: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, { Name: "build", ImageID: "gcr.io/cloud-marketplace-containers/google/bazel@sha256:010a1ecd1a8c3610f12039a25b823e3a17bd3e8ae455a53e340dcfdd37a49964", }}, Sidecars: []v1beta1.SidecarState{{ Name: "sidecar-jwqcl", - ImageID: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init@sha256:a1234f6e7a69617db57b685893256f978436277094c21d43b153994acd8a09567", + ImageID: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init@sha256:a1234f6e7a69617db57b685893256f978436277094c21d43b153994acd8a09567", }}, }, }, }, want: []v1.ResourceDescriptor{ { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, @@ -275,7 +275,7 @@ func TestTaskRun(t *testing.T) { "sha256": "010a1ecd1a8c3610f12039a25b823e3a17bd3e8ae455a53e340dcfdd37a49964", }, }, { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init", Digest: common.DigestSet{ "sha256": "a1234f6e7a69617db57b685893256f978436277094c21d43b153994acd8a09567", }, diff --git a/pkg/chains/formats/slsa/v2alpha3/internal/resolved_dependencies/resolved_dependencies_test.go b/pkg/chains/formats/slsa/v2alpha3/internal/resolved_dependencies/resolved_dependencies_test.go index 5222280301..cb86ec1254 100644 --- a/pkg/chains/formats/slsa/v2alpha3/internal/resolved_dependencies/resolved_dependencies_test.go +++ b/pkg/chains/formats/slsa/v2alpha3/internal/resolved_dependencies/resolved_dependencies_test.go @@ -220,10 +220,10 @@ func TestTaskRun(t *testing.T) { TaskRunStatusFields: v1.TaskRunStatusFields{ Steps: []v1.StepState{{ Name: "git-source-repo-jwqcl", - ImageID: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", + ImageID: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, { Name: "git-source-repo-repeat-again-jwqcl", - ImageID: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", + ImageID: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, { Name: "build", ImageID: "gcr.io/cloud-marketplace-containers/google/bazel@sha256:010a1ecd1a8c3610f12039a25b823e3a17bd3e8ae455a53e340dcfdd37a49964", @@ -233,7 +233,7 @@ func TestTaskRun(t *testing.T) { }), want: []v1slsa.ResourceDescriptor{ { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, @@ -253,24 +253,24 @@ func TestTaskRun(t *testing.T) { TaskRunStatusFields: v1.TaskRunStatusFields{ Steps: []v1.StepState{{ Name: "git-source-repo-jwqcl", - ImageID: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", + ImageID: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, { Name: "git-source-repo-repeat-again-jwqcl", - ImageID: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", + ImageID: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, { Name: "build", ImageID: "gcr.io/cloud-marketplace-containers/google/bazel@sha256:010a1ecd1a8c3610f12039a25b823e3a17bd3e8ae455a53e340dcfdd37a49964", }}, Sidecars: []v1.SidecarState{{ Name: "sidecar-jwqcl", - ImageID: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init@sha256:a1234f6e7a69617db57b685893256f978436277094c21d43b153994acd8a09567", + ImageID: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init@sha256:a1234f6e7a69617db57b685893256f978436277094c21d43b153994acd8a09567", }}, }, }, }), want: []v1slsa.ResourceDescriptor{ { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init", Digest: common.DigestSet{ "sha256": "b963f6e7a69617db57b685893256f978436277094c21d43b153994acd8a01247", }, @@ -280,7 +280,7 @@ func TestTaskRun(t *testing.T) { "sha256": "010a1ecd1a8c3610f12039a25b823e3a17bd3e8ae455a53e340dcfdd37a49964", }, }, { - URI: "oci://gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init", + URI: "oci://ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecar-git-init", Digest: common.DigestSet{ "sha256": "a1234f6e7a69617db57b685893256f978436277094c21d43b153994acd8a09567", }, diff --git a/pkg/chains/storage/oci/legacy_test.go b/pkg/chains/storage/oci/legacy_test.go index 10f7f40d3d..1d71aec2d3 100644 --- a/pkg/chains/storage/oci/legacy_test.go +++ b/pkg/chains/storage/oci/legacy_test.go @@ -30,7 +30,7 @@ func TestNewRepo(t *testing.T) { expectedRepoName string }{ { - imageName: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:bc4f7468f87486e3835b09098c74cd7f54db2cf697cbb9b824271b95a2d0871e", + imageName: "ghcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init@sha256:bc4f7468f87486e3835b09098c74cd7f54db2cf697cbb9b824271b95a2d0871e", expectedRepoName: "example.com/foo", }, { diff --git a/release/publish.yaml b/release/publish.yaml index 58a0f153a8..943235023d 100644 --- a/release/publish.yaml +++ b/release/publish.yaml @@ -95,7 +95,7 @@ spec: cp ${DOCKER_CONFIG} /workspace/docker-config.json - name: run-ko - image: gcr.io/tekton-releases/dogfooding/ko:latest + image: ghcr.io/tekton-releases/dogfooding/ko:latest env: - name: KO_DOCKER_REPO value: $(params.imageRegistry)/$(params.imageRegistryPath) @@ -145,7 +145,7 @@ spec: - name: koparse - image: gcr.io/tekton-releases/dogfooding/koparse:latest + image: ghcr.io/tekton-releases/dogfooding/koparse:latest script: | set -ex