Skip to content

Commit 53bae3e

Browse files
developer-guynaveensrinivasan
authored andcommitted
feat: upgrade to ko v0.10.0
Signed-off-by: Batuhan Apaydın <[email protected]>
1 parent 1306b34 commit 53bae3e

File tree

3 files changed

+194
-69
lines changed

3 files changed

+194
-69
lines changed

Makefile

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ IMAGE_NAME = scorecard
1212
OUTPUT = output
1313
PLATFORM="linux/amd64,linux/arm64,linux/386,linux/arm"
1414
LDFLAGS=$(shell ./scripts/version-ldflags)
15+
KOCACHE_PATH=/tmp/ko
16+
17+
define create_kocache_path
18+
mkdir -p $(KOCACHE_PATH)
19+
endef
20+
21+
1522

1623
############################### make help #####################################
1724
.PHONY: help
@@ -190,45 +197,59 @@ ko-targets = scorecard-ko cron-controller-ko cron-worker-ko cron-cii-worker-ko c
190197
ko-build-everything: $(ko-targets)
191198

192199
scorecard-ko:
200+
$(call create_kocache_path)
193201
KO_DATA_DATE_EPOCH=$(SOURCE_DATE_EPOCH) KO_DOCKER_REPO=${KO_PREFIX}/scorecard LDFLAGS="$(LDFLAGS)" \
194-
ko publish -B \
202+
KO_CACHE=$(KOCACHE_PATH) ko build -B \
195203
--push=false \
204+
--sbom=none \
196205
--platform=$(PLATFORM)\
197206
--tags latest,$(GIT_VERSION),$(GIT_HASH) github.com/ossf/scorecard/v4
198207
cron-controller-ko:
208+
$(call_create_kocache_path)
199209
KO_DATA_DATE_EPOCH=$(SOURCE_DATE_EPOCH) KO_DOCKER_REPO=${KO_PREFIX}/$(IMAGE_NAME)-batch-controller LDFLAGS="$(LDFLAGS)" \
200-
ko publish -B \
210+
KOCACHE=$(KOCACHE_PATH) ko build -B \
201211
--push=false \
212+
--sbom=none \
202213
--platform=$(PLATFORM)\
203214
--tags latest,$(GIT_VERSION),$(GIT_HASH) github.com/ossf/scorecard/v4/cron/controller
204215
cron-worker-ko:
216+
$(call_create_kocache_path)
205217
KO_DATA_DATE_EPOCH=$(SOURCE_DATE_EPOCH) KO_DOCKER_REPO=${KO_PREFIX}/$(IMAGE_NAME)-batch-worker LDFLAGS="$(LDFLAGS)" \
206-
ko publish -B \
218+
KOCACHE=$(KOCACHE_PATH) ko build -B \
207219
--push=false \
220+
--sbom=none \
208221
--platform=$(PLATFORM)\
209222
--tags latest,$(GIT_VERSION),$(GIT_HASH) github.com/ossf/scorecard/v4/cron/worker
210223
cron-cii-worker-ko:
224+
$(call_create_kocache_path)
211225
KO_DATA_DATE_EPOCH=$(SOURCE_DATE_EPOCH) KO_DOCKER_REPO=${KO_PREFIX}/$(IMAGE_NAME)-cii-worker LDFLAGS="$(LDFLAGS)" \
212-
ko publish -B \
226+
KOCACHE=$(KOCACHE_PATH) ko build -B \
213227
--push=false \
228+
--sbom=none \
214229
--platform=$(PLATFORM)\
215230
--tags latest,$(GIT_VERSION),$(GIT_HASH) github.com/ossf/scorecard/v4/cron/cii
216231
cron-bq-transfer-ko:
232+
$(call_create_kocache_path)
217233
KO_DATA_DATE_EPOCH=$(SOURCE_DATE_EPOCH) KO_DOCKER_REPO=${KO_PREFIX}/$(IMAGE_NAME)-bq-transfer LDFLAGS="$(LDFLAGS)" \
218-
ko publish -B \
234+
KOCACHE=$(KOCACHE_PATH) ko build -B \
219235
--push=false \
236+
--sbom=none \
220237
--platform=$(PLATFORM)\
221238
--tags latest,$(GIT_VERSION),$(GIT_HASH) github.com/ossf/scorecard/v4/cron/bq
222239
cron-webhook-ko:
240+
$(call_create_kocache_path)
223241
KO_DATA_DATE_EPOCH=$(SOURCE_DATE_EPOCH) KO_DOCKER_REPO=${KO_PREFIX}/$(IMAGE_NAME)-cron-webhook LDFLAGS="$(LDFLAGS)" \
224-
ko publish -B \
242+
KOCACHE=$(KOCACHE_PATH) ko build -B \
225243
--push=false \
244+
--sbom=none \
226245
--platform=$(PLATFORM)\
227246
--tags latest,$(GIT_VERSION),$(GIT_HASH) github.com/ossf/scorecard/v4/cron/webhook
228247
cron-github-server-ko:
248+
$(call_create_kocache_path)
229249
KO_DATA_DATE_EPOCH=$(SOURCE_DATE_EPOCH) KO_DOCKER_REPO=${KO_PREFIX}/$(IMAGE_NAME)-github-server LDFLAGS="$(LDFLAGS)" \
230-
ko publish -B \
250+
KOCACHE=$(KOCACHE_PATH) ko build -B \
231251
--push=false \
252+
--sbom=none \
232253
--platform=$(PLATFORM)\
233254
--tags latest,$(GIT_VERSION),$(GIT_HASH) github.com/ossf/scorecard/v4/clients/githubrepo/roundtripper/tokens/server
234255

tools/go.mod

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/golang/mock v1.6.0
77
github.com/golangci/golangci-lint v1.44.0
88
github.com/google/addlicense v1.0.0
9-
github.com/google/ko v0.9.4-0.20211123143443-5787600e9220
9+
github.com/google/ko v0.10.0
1010
github.com/goreleaser/goreleaser v1.5.0
1111
github.com/naveensrinivasan/stunning-tribble v0.4.2
1212
github.com/onsi/ginkgo/v2 v2.1.3
@@ -56,18 +56,21 @@ require (
5656
github.com/ashanbrown/makezero v1.1.0 // indirect
5757
github.com/atc0005/go-teams-notify/v2 v2.6.0 // indirect
5858
github.com/aws/aws-sdk-go v1.42.24 // indirect
59-
github.com/aws/aws-sdk-go-v2 v1.11.2 // indirect
60-
github.com/aws/aws-sdk-go-v2/config v1.11.0 // indirect
61-
github.com/aws/aws-sdk-go-v2/credentials v1.6.4 // indirect
62-
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.8.2 // indirect
63-
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.2 // indirect
64-
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.0.2 // indirect
65-
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.2 // indirect
66-
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.5.2 // indirect
59+
github.com/aws/aws-sdk-go-v2 v1.13.0 // indirect
60+
github.com/aws/aws-sdk-go-v2/config v1.13.1 // indirect
61+
github.com/aws/aws-sdk-go-v2/credentials v1.8.0 // indirect
62+
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.10.0 // indirect
63+
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.4 // indirect
64+
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.2.0 // indirect
65+
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.5 // indirect
66+
github.com/aws/aws-sdk-go-v2/service/ecr v1.14.0 // indirect
67+
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.11.0 // indirect
68+
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.7.0 // indirect
6769
github.com/aws/aws-sdk-go-v2/service/kms v1.11.1 // indirect
68-
github.com/aws/aws-sdk-go-v2/service/sso v1.6.2 // indirect
69-
github.com/aws/aws-sdk-go-v2/service/sts v1.11.1 // indirect
70-
github.com/aws/smithy-go v1.9.0 // indirect
70+
github.com/aws/aws-sdk-go-v2/service/sso v1.9.0 // indirect
71+
github.com/aws/aws-sdk-go-v2/service/sts v1.14.0 // indirect
72+
github.com/aws/smithy-go v1.10.0 // indirect
73+
github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20220216180153-3d7835abdf40 // indirect
7174
github.com/beorn7/perks v1.0.1 // indirect
7275
github.com/bkielbasa/cyclop v1.2.0 // indirect
7376
github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb // indirect
@@ -87,10 +90,11 @@ require (
8790
github.com/cespare/xxhash/v2 v2.1.2 // indirect
8891
github.com/charithe/durationcheck v0.0.9 // indirect
8992
github.com/chavacava/garif v0.0.0-20210405164556-e8a0a408d6af // indirect
93+
github.com/chrismellard/docker-credential-acr-env v0.0.0-20220119192733-fe33c00cee21 // indirect
9094
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4 // indirect
9195
github.com/cncf/xds/go v0.0.0-20211216145620-d92e9ce0af51 // indirect
92-
github.com/containerd/containerd v1.5.8 // indirect
93-
github.com/containerd/stargz-snapshotter/estargz v0.10.1 // indirect
96+
github.com/containerd/containerd v1.5.9 // indirect
97+
github.com/containerd/stargz-snapshotter/estargz v0.11.0 // indirect
9498
github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
9599
github.com/daixiang0/gci v0.2.9 // indirect
96100
github.com/davecgh/go-spew v1.1.1 // indirect
@@ -120,7 +124,7 @@ require (
120124
github.com/go-git/gcfg v1.5.0 // indirect
121125
github.com/go-git/go-billy/v5 v5.3.1 // indirect
122126
github.com/go-git/go-git/v5 v5.4.2 // indirect
123-
github.com/go-logr/logr v1.0.0 // indirect
127+
github.com/go-logr/logr v1.2.0 // indirect
124128
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
125129
github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible // indirect
126130
github.com/go-toolsmith/astcast v1.0.0 // indirect
@@ -146,8 +150,8 @@ require (
146150
github.com/golangci/misspell v0.3.5 // indirect
147151
github.com/golangci/revgrep v0.0.0-20210930125155-c22e5001d4f2 // indirect
148152
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect
149-
github.com/google/go-cmp v0.5.6 // indirect
150-
github.com/google/go-containerregistry v0.8.0 // indirect
153+
github.com/google/go-cmp v0.5.7 // indirect
154+
github.com/google/go-containerregistry v0.8.1-0.20220209165246-a44adc326839 // indirect
151155
github.com/google/go-github/v42 v42.0.0 // indirect
152156
github.com/google/go-querystring v1.1.0 // indirect
153157
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
@@ -183,7 +187,7 @@ require (
183187
github.com/kevinburke/ssh_config v1.1.0 // indirect
184188
github.com/kisielk/errcheck v1.6.0 // indirect
185189
github.com/kisielk/gotool v1.0.0 // indirect
186-
github.com/klauspost/compress v1.13.6 // indirect
190+
github.com/klauspost/compress v1.14.2 // indirect
187191
github.com/kulti/thelper v0.5.0 // indirect
188192
github.com/kunwardeep/paralleltest v1.0.3 // indirect
189193
github.com/kyoh86/exportloopref v0.1.8 // indirect
@@ -219,7 +223,7 @@ require (
219223
github.com/olekukonko/tablewriter v0.0.5 // indirect
220224
github.com/onsi/ginkgo v1.16.5 // indirect
221225
github.com/opencontainers/go-digest v1.0.0 // indirect
222-
github.com/opencontainers/image-spec v1.0.2-0.20211117181255-693428a734f5 // indirect
226+
github.com/opencontainers/image-spec v1.0.3-0.20220114050600-8b9d41f48198 // indirect
223227
github.com/pelletier/go-toml v1.9.4 // indirect
224228
github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d // indirect
225229
github.com/pkg/errors v0.9.1 // indirect
@@ -283,25 +287,26 @@ require (
283287
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
284288
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
285289
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
286-
golang.org/x/sys v0.0.0-20220204135822-1c1b9b1eba6a // indirect
290+
golang.org/x/sys v0.0.0-20220209214540-3681064d5158 // indirect
287291
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
288292
golang.org/x/text v0.3.7 // indirect
289293
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect
290-
golang.org/x/tools v0.1.9-0.20211228192929-ee1ca4ffc4da // indirect
294+
golang.org/x/tools v0.1.9 // indirect
291295
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
292296
google.golang.org/api v0.63.0 // indirect
293297
google.golang.org/appengine v1.6.7 // indirect
294-
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect
295-
google.golang.org/grpc v1.43.0 // indirect
298+
google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 // indirect
299+
google.golang.org/grpc v1.44.0 // indirect
296300
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
297301
gopkg.in/ini.v1 v1.66.2 // indirect
298302
gopkg.in/mail.v2 v2.3.1 // indirect
299303
gopkg.in/warnings.v0 v0.1.2 // indirect
300304
gopkg.in/yaml.v2 v2.4.0 // indirect
301305
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
302306
honnef.co/go/tools v0.2.2 // indirect
303-
k8s.io/apimachinery v0.22.4 // indirect
304-
k8s.io/klog/v2 v2.20.0 // indirect
307+
k8s.io/apimachinery v0.23.3 // indirect
308+
k8s.io/klog/v2 v2.30.0 // indirect
309+
k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect
305310
mvdan.cc/gofumpt v0.2.1 // indirect
306311
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect
307312
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect

0 commit comments

Comments
 (0)