@@ -21,17 +21,17 @@ endif
21
21
# invocation; otherwise it could collide across jenkins jobs. We'll use
22
22
# a .docker folder relative to pwd (the repo root).
23
23
CONTAINER_ENGINE_CONFIG_DIR = .docker
24
- # But docker and podman use different options to configure it :eyeroll:
25
- # ==> Podman uses --authfile=PATH *after* the `login` subcommand; but
26
- # also accepts REGISTRY_AUTH_FILE from the env. See
27
- # https://www.mankier.com/1/podman-login#Options---authfile=path
28
24
export REGISTRY_AUTH_FILE = ${CONTAINER_ENGINE_CONFIG_DIR}/config.json
25
+
29
26
# If this configuration file doesn't exist, podman will error out. So
30
27
# we'll create it if it doesn't exist.
31
28
ifeq (,$(wildcard $(REGISTRY_AUTH_FILE ) ) )
32
29
$(shell mkdir -p $(CONTAINER_ENGINE_CONFIG_DIR))
33
- $(shell echo '{}' > $(REGISTRY_AUTH_FILE))
30
+ # Copy the node container auth file so that we get access to the registries the
31
+ # parent node has access to
32
+ $(shell cp /var/lib/jenkins/.docker/config.json $(REGISTRY_AUTH_FILE))
34
33
endif
34
+
35
35
# ==> Docker uses --config=PATH *before* (any) subcommand; so we'll glue
36
36
# that to the CONTAINER_ENGINE variable itself. (NOTE: I tried half a
37
37
# dozen other ways to do this. This was the least ugly one that actually
43
43
# Generate version and tag information from inputs
44
44
COMMIT_NUMBER =$(shell git rev-list `git rev-list --parents HEAD | grep -E "^[a-f0-9]{40}$$"`..HEAD --count)
45
45
CURRENT_COMMIT =$(shell git rev-parse --short=7 HEAD)
46
- OPERATOR_VERSION =$(VERSION_MAJOR ) .$(VERSION_MINOR ) .$(COMMIT_NUMBER ) -$(CURRENT_COMMIT )
46
+ OPERATOR_VERSION =$(VERSION_MAJOR ) .$(VERSION_MINOR ) .$(COMMIT_NUMBER ) -g $(CURRENT_COMMIT )
47
47
48
48
OPERATOR_IMAGE =$(IMAGE_REGISTRY ) /$(IMAGE_REPOSITORY ) /$(IMAGE_NAME )
49
49
OPERATOR_IMAGE_TAG =v$(OPERATOR_VERSION )
@@ -52,6 +52,7 @@ OPERATOR_IMAGE_URI=${IMG}
52
52
OPERATOR_IMAGE_URI_LATEST =$(IMAGE_REGISTRY ) /$(IMAGE_REPOSITORY ) /$(IMAGE_NAME ) :latest
53
53
OPERATOR_DOCKERFILE ?=build/Dockerfile
54
54
REGISTRY_IMAGE =$(IMAGE_REGISTRY ) /$(IMAGE_REPOSITORY ) /$(IMAGE_NAME ) -registry
55
+ OPERATOR_REPO_NAME =$(shell git config --get remote.origin.url | sed 's,.* /,,; s/\.git$$//')
55
56
56
57
ifeq ($(SUPPLEMENTARY_IMAGE_NAME ) ,)
57
58
# We need SUPPLEMENTARY_IMAGE to be defined for csv-generate.mk
@@ -323,6 +324,7 @@ coverage:
323
324
# TODO: Boilerplate this script.
324
325
.PHONY : build-push
325
326
build-push :
327
+ OPERATOR_VERSION=" ${OPERATOR_VERSION} " \
326
328
${CONVENTION_DIR} /app-sre-build-deploy.sh ${REGISTRY_IMAGE} ${CURRENT_COMMIT} " $$ IMAGES_TO_BUILD"
327
329
328
330
.PHONY : opm-build-push
@@ -383,8 +385,10 @@ container-coverage:
383
385
384
386
.PHONY : rvmo-bundle
385
387
rvmo-bundle :
388
+ RELEASE_BRANCH=$(RELEASE_BRANCH ) \
389
+ REPO_NAME=$(OPERATOR_REPO_NAME ) \
386
390
OPERATOR_NAME=$(OPERATOR_NAME ) \
387
391
OPERATOR_VERSION=$(OPERATOR_VERSION ) \
388
392
OPERATOR_OLM_REGISTRY_IMAGE=$(REGISTRY_IMAGE ) \
389
- TEMPLATE_FILE =$(abspath hack/olm-registry/olm-artifacts-template.yaml ) \
393
+ TEMPLATE_DIR =$(abspath hack/release-bundle ) \
390
394
bash ${CONVENTION_DIR} /rvmo-bundle.sh
0 commit comments