Skip to content

Commit bb8140a

Browse files
committed
Update tasks dependencies version
Signed-off-by: Vincent Demeester <[email protected]>
1 parent ef3ca7b commit bb8140a

File tree

5 files changed

+26
-20
lines changed

5 files changed

+26
-20
lines changed

go-crane-image/README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
Build an oci using go and crane.
44

5+
- **Go** 1.20.
6+
- **Crane** 0.17.x.
7+
- The image(s) are based of Alpine.
8+
9+
510
## Workspaces
611

712
| Workspace | Optional | Description |
@@ -11,12 +16,12 @@ Build an oci using go and crane.
1116

1217
## Params
1318

14-
| Param | Type | Default | Description |
15-
|:----------|:--------:|:------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------|
16-
| `app` | `string` | (required) | The name of the "application" to build. This will have an impact on the binary and possibly the image reference |
17-
| `package` | `string` | `.` | The package to build. It needs to be a package `main` that compiles into a binary. The default value is `.`, usual value can be `./cmd/{name}` |
18-
| `image` | `object` | `{ base="", envs="", labels="", push="true", tag="latest" }` | The image specific options such as prefix, labels, env, … |
19-
| `go` | `object` | `{ GOOS="", version="1.18", CGO_ENABLED="0", GOARCH="", GOFLAGS="-v" }` | Golang options, such as flags, version, … |
19+
| Param | Type | Default | Description |
20+
|:----------|:--------:|:-------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------|
21+
| `app` | `string` | (required) | The name of the "application" to build. This will have an impact on the binary and possibly the image reference |
22+
| `package` | `string` | `.` | The package to build. It needs to be a package `main` that compiles into a binary. The default value is `.`, usual value can be `./cmd/{name}` |
23+
| `image` | `object` | `{ base="", envs="", labels="", push="true", tag="latest" }` | The image specific options such as prefix, labels, env, … |
24+
| `go` | `object` | `{ GOOS="", CGO_ENABLED="0", GOARCH="", GOFLAGS="-v" }` | Golang options, such as flags, version, … |
2025

2126
## Results
2227

go-crane-image/go-crane-image.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
labels:
66
app.kubernetes.io/version: "0.4.0"
77
annotations:
8-
tekton.dev/pipelines.minVersion: "0.50.0"
8+
tekton.dev/pipelines.minVersion: "0.53.0"
99
tekton.dev/categories: language
1010
tekton.dev/tags: go
1111
tekton.dev/displayName: "go crane image"
@@ -55,7 +55,6 @@ spec:
5555
GOARCH: {type: string}
5656
CGO_ENABLED: {type: string}
5757
default:
58-
version: "1.18"
5958
GOFLAGS: "-v"
6059
GOOS: ""
6160
GOARCH: ""
@@ -67,11 +66,11 @@ spec:
6766
description: URL of the image just built.
6867
steps:
6968
- name: build-go
70-
image: docker.io/library/golang:$(params.go.version)
69+
image: ghcr.io/shortbrain/golang-tasks/go:1.21
7170
workingDir: $(workspaces.source.path)
7271
script: |
7372
#!/usr/bin/env bash
74-
set -e
73+
set -eko
7574
go env
7675
go build -o $(params.app) $(params.package)
7776
env:
@@ -84,7 +83,7 @@ spec:
8483
- name: CGO_ENABLED
8584
value: "$(params.go.CGO_ENABLED)"
8685
- name: publish-image
87-
image: ghcr.io/shortbrain/golang-tasks/crane:main
86+
image: ghcr.io/shortbrain/golang-tasks/crane:0.17.0
8887
workingDir: $(workspaces.source.path)
8988
script: |
9089
#!/usr/bin/env bash

go-ko-image/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# go-ko-image
22

3-
Build an oci image using go and ko.
3+
Build an oci image using go and ko.
4+
5+
- **Go** 1.20.x.
6+
- **Ko** 0.15.x.
7+
- **Crane** 0.17.x.
8+
- The image(s) are based of Alpine.
49

510
## Workspaces
611

go-ko-image/go-ko-image.yaml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
labels:
66
app.kubernetes.io/version: "0.4.0"
77
annotations:
8-
tekton.dev/pipelines.minVersion: "0.50.0"
8+
tekton.dev/pipelines.minVersion: "0.53.0"
99
tekton.dev/categories: language
1010
tekton.dev/tags: go
1111
tekton.dev/displayName: "go ko image"
@@ -53,14 +53,11 @@ spec:
5353
Golang options, such as flags, version, …
5454
type: object
5555
properties:
56-
# FIXME: support go version
57-
# version: {type: string}
5856
GOFLAGS: {type: string}
5957
GOOS: {type: string}
6058
GOARCH: {type: string}
6159
CGO_ENABLED: {type: string}
6260
default:
63-
# version: "1.18"
6461
GOFLAGS: "-v"
6562
GOOS: ""
6663
GOARCH: ""
@@ -72,7 +69,7 @@ spec:
7269
description: URL of the image just built.
7370
steps:
7471
- name: build-and-publish
75-
image: ghcr.io/ko-build/ko:latest
72+
image: ghcr.io/ko-build/ko:v0.15.1
7673
workingDir: $(workspaces.source.path)
7774
script: |
7875
#!/usr/bin/env bash
@@ -127,8 +124,8 @@ spec:
127124
value: "$(params.go.CGO_ENABLED)"
128125
- name: KO_DOCKER_REPO
129126
value: $(params.image.prefix)
130-
- name: add-metadata
131-
image: ghcr.io/shortbrain/golang-tasks/crane:main
127+
- name: publish-image
128+
image: ghcr.io/shortbrain/golang-tasks/crane:0.17.0
132129
workingDir: $(workspaces.source.path)
133130
script: |
134131
#!/usr/bin/env bash

images/crane/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM alpine:3.19 AS crane
2-
ARG VERSION=0.12.0
2+
ARG VERSION=0.17.0
33
# RUN apk add --no-cache go && go install github.com/slsa-framework/slsa-verifier/cli/[email protected]
44
RUN ARCH=$(uname -m) OS=$(uname) && \
55
wget -O go-containerregistry.tar.gz https://github.com/google/go-containerregistry/releases/download/v${VERSION}/go-containerregistry_${OS}_${ARCH}.tar.gz && \

0 commit comments

Comments
 (0)