Skip to content

Commit 4af0677

Browse files
authored
Merge pull request #448 from mattcary/prow-2.1
Update release-tools and prow script for release-2.1
2 parents 540ab05 + 66d3631 commit 4af0677

File tree

6 files changed

+179
-130
lines changed

6 files changed

+179
-130
lines changed

.prow.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#! /bin/bash
22

3+
# This is specific to the release-2.1 branch and overrides the
4+
# version set in the prow config.
5+
export CSI_SNAPSHOTTER_VERSION=v2.1.2
6+
37
. release-tools/prow.sh
48

59
main

deploy/kubernetes/csi-snapshotter/setup-csi-snapshotter.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ spec:
7979
env:
8080
- name: ADDRESS
8181
value: /csi/csi.sock
82-
imagePullPolicy: Always
82+
imagePullPolicy: IfNotPresent
8383
volumeMounts:
8484
- name: socket-dir
8585
mountPath: /csi
@@ -92,7 +92,7 @@ spec:
9292
env:
9393
- name: ADDRESS
9494
value: /csi/csi.sock
95-
imagePullPolicy: Always
95+
imagePullPolicy: IfNotPresent
9696
volumeMounts:
9797
- name: socket-dir
9898
mountPath: /csi
@@ -110,7 +110,7 @@ spec:
110110
fieldRef:
111111
apiVersion: v1
112112
fieldPath: spec.nodeName
113-
imagePullPolicy: Always
113+
imagePullPolicy: IfNotPresent
114114
securityContext:
115115
privileged: true
116116
volumeMounts:

deploy/kubernetes/snapshot-controller/setup-snapshot-controller.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ spec:
2323
args:
2424
- "--v=5"
2525
- "--leader-election=false"
26-
imagePullPolicy: Always
26+
imagePullPolicy: IfNotPresent

release-tools/build.make

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
# This is the default. It can be overridden in the main Makefile after
2222
# including build.make.
23-
REGISTRY_NAME=quay.io/k8scsi
23+
REGISTRY_NAME?=quay.io/k8scsi
2424

2525
# Can be set to -mod=vendor to ensure that the "vendor" directory is used.
2626
GOFLAGS_VENDOR=
@@ -69,12 +69,17 @@ endif
6969
# toolchain.
7070
BUILD_PLATFORMS =
7171

72+
# Add go ldflags using LDFLAGS at the time of compilation.
73+
IMPORTPATH_LDFLAGS = -X main.version=$(REV)
74+
EXT_LDFLAGS = -extldflags "-static"
75+
LDFLAGS =
76+
FULL_LDFLAGS = $(LDFLAGS) $(IMPORTPATH_LDFLAGS) $(EXT_LDFLAGS)
7277
# This builds each command (= the sub-directories of ./cmd) for the target platform(s)
7378
# defined by BUILD_PLATFORMS.
7479
$(CMDS:%=build-%): build-%: check-go-version-go
7580
mkdir -p bin
7681
echo '$(BUILD_PLATFORMS)' | tr ';' '\n' | while read -r os arch suffix; do \
77-
if ! (set -x; CGO_ENABLED=0 GOOS="$$os" GOARCH="$$arch" go build $(GOFLAGS_VENDOR) -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o "./bin/$*$$suffix" ./cmd/$*); then \
82+
if ! (set -x; CGO_ENABLED=0 GOOS="$$os" GOARCH="$$arch" go build $(GOFLAGS_VENDOR) -a -ldflags '$(FULL_LDFLAGS)' -o "./bin/$*$$suffix" ./cmd/$*); then \
7883
echo "Building $* for GOOS=$$os GOARCH=$$arch failed, see error(s) above."; \
7984
exit 1; \
8085
fi; \
@@ -240,9 +245,10 @@ test-vendor:
240245

241246
.PHONY: test-subtree
242247
test: test-subtree
248+
# For the release-2.1 branch, we have forked release-tools and so cannot run
249+
# the subtree test.
243250
test-subtree:
244-
@ echo; echo "### $@:"
245-
./release-tools/verify-subtree.sh release-tools
251+
@ echo; echo "### $@: skipping test-subtree"
246252

247253
# Components can extend the set of directories which must pass shellcheck.
248254
# The default is to check only the release-tools directory itself.

release-tools/cloudbuild.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
# To promote release images, see https://github.com/kubernetes/k8s.io/tree/master/k8s.gcr.io/images/k8s-staging-sig-storage.
1717

1818
# This must be specified in seconds. If omitted, defaults to 600s (10 mins).
19-
timeout: 1800s
19+
# Building three images in external-snapshotter takes roughly half an hour,
20+
# sometimes more.
21+
timeout: 3600s
2022
# This prevents errors if you don't use both _GIT_TAG and _PULL_BASE_REF,
2123
# or any new substitutions added in the future.
2224
options:

0 commit comments

Comments
 (0)