From 12d935afeec29948657ce36a10a4019c433c7cf9 Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Thu, 26 Sep 2024 16:06:01 +0200 Subject: [PATCH] Random thing Signed-off-by: Vincent Demeester --- .tekton/go.yaml | 60 ++++++--------------------------------------- cmd/tkn-pac/main.go | 1 + 2 files changed, 9 insertions(+), 52 deletions(-) diff --git a/.tekton/go.yaml b/.tekton/go.yaml index ee00b1922..6aa47b9b5 100644 --- a/.tekton/go.yaml +++ b/.tekton/go.yaml @@ -52,63 +52,19 @@ spec: value: $(workspaces.source.path)/go-build-cache - name: workingdir value: $(workspaces.source.path) - - name: unittest - # we get bumped out when usingh the official image with docker.io - # ratelimit so workaround this. - image: golang:1.22 - env: - - name: GOCACHE - value: $(workspaces.source.path)/go-build-cache/cache - - name: GOMODCACHE - value: $(workspaces.source.path)/go-build-cache/mod - workingDir: $(workspaces.source.path) + - name: cache-test + image: ghcr.io/openshift-pipelines/tekton-caches/cache:latest script: | #!/usr/bin/env bash - set -eux - git config --global --add safe.directory $(workspaces.source.path) - export GO_TEST_FLAGS="-v -race -coverprofile=coverage.txt -covermode=atomic" - make test + env + ls -l /tekton/* + ls -l /tekton/*/* - - name: coverage - image: golang:1.22 - env: - - name: CODECOV_TOKEN - valueFrom: - secretKeyRef: - name: pipelines-as-code-codecov-token - key: token - - name: GOCACHE - value: $(workspaces.source.path)/go-build-cache/cache - - name: GOMODCACHE - value: $(workspaces.source.path)/go-build-cache/mod - - name: GITHUB_REPOSITORY - value: "{{repo_owner}}/{{repo_name}}" - - name: GITHUB_PULL_REQUEST_ID - value: "{{pull_request_number}}" - workingDir: $(workspaces.source.path) + - name: cache-crane-test + image: cgr.dev/chainguard/crane script: | #!/usr/bin/env bash - set -eux - ARCH=aarch64 - git config --global --add safe.directory $(workspaces.source.path) - git fetch -a --tags - curl -LOs https://uploader.codecov.io/v0.7.3/aarch64/codecov - chmod +x ./codecov - ./codecov -P $GITHUB_PULL_REQUEST_ID -C {{revision}} -v - - name: lint - image: golangci/golangci-lint:latest - workingDir: $(workspaces.source.path) - env: - - name: GOCACHE - value: $(workspaces.source.path)/go-build-cache/cache - - name: GOMODCACHE - value: $(workspaces.source.path)/go-build-cache/mod - - name: GOLANGCILINT_CACHE - value: $(workspaces.source.path)/go-build-cache/golangci-cache - script: | - #!/usr/bin/env bash - set -eux - make lint-go + crane ls oci://image-registry.openshift-image-registry.svc:5000/$(context.pipelineRun.namespace)/cache-go - name: cache-upload ref: resolver: http diff --git a/cmd/tkn-pac/main.go b/cmd/tkn-pac/main.go index 855d9f87e..1819c33bf 100644 --- a/cmd/tkn-pac/main.go +++ b/cmd/tkn-pac/main.go @@ -8,6 +8,7 @@ import ( ) func main() { + // foo clients := params.New() pac := tknpac.Root(clients)