Skip to content

Commit

Permalink
Random thing
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Demeester <[email protected]>
  • Loading branch information
vdemeester committed Sep 26, 2024
1 parent b3fd3ef commit 12d935a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 52 deletions.
60 changes: 8 additions & 52 deletions .tekton/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions cmd/tkn-pac/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
)

func main() {
// foo
clients := params.New()
pac := tknpac.Root(clients)

Expand Down

0 comments on commit 12d935a

Please sign in to comment.