Skip to content

Commit eed9e1b

Browse files
committed
Override IMAGE_TAG correctly
Signed-off-by: Fiachra Corcoran <fiachra.corcoran@est.tech>
1 parent e3ff3a0 commit eed9e1b

4 files changed

Lines changed: 2 additions & 21 deletions

File tree

.github/workflows/porch-e2e-ci-jobs.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,7 @@ jobs:
154154
kind load docker-image ${IMAGE_REPO}/${PORCH_WRAPPER_SERVER_IMAGE}:${{ needs.build.outputs.image-tag }} -n ${KIND_CONTEXT_NAME}
155155
kind load docker-image ${IMAGE_REPO}/${TEST_GIT_SERVER_IMAGE}:${{ needs.build.outputs.image-tag }} -n ${KIND_CONTEXT_NAME}
156156
- name: Deploy porch kpt pkg
157-
run: |
158-
export IMAGE_TAG=${{ needs.build.outputs.image-tag }}
159-
export SKIP_IMG_BUILD=true
160-
make ${{ matrix.make_target }}
157+
run: IMAGE_TAG=${{ needs.build.outputs.image-tag }} SKIP_IMG_BUILD=true make ${{ matrix.make_target }}
161158
- name: Run E2E tests
162159
run: ${{ matrix.test_env }} go test -v -timeout 20m ${{ matrix.test_path }}
163160
- name: Export porch server logs

make/deploy.mk

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export SKIP_IMG_BUILD ?= false
1919
export SKIP_PORCHSERVER_BUILD ?= false
2020
export SKIP_CONTROLLER_BUILD ?= false
2121
export SKIP_LOCAL_GIT ?= false
22-
export IMAGE_TAG ?= test
22+
2323

2424
# Porch cache type: CR (Custom Resource) || DB (Database)
2525
export PORCH_CACHE_TYPE ?= CR
@@ -43,52 +43,44 @@ endif
4343

4444
.PHONY: run-in-kind
4545
run-in-kind: IMAGE_REPO=porch-kind## Build and deploy porch into a kind cluster
46-
run-in-kind: IMAGE_TAG?=test
4746
run-in-kind: PORCH_CACHE_TYPE=CR
4847
run-in-kind: load-images-to-kind deployment-config deploy-current-config
4948

5049
.PHONY: run-in-kind-db-cache
5150
run-in-kind-db-cache: IMAGE_REPO=porch-kind## Build and deploy porch into a kind cluster with postgres backend
52-
run-in-kind-db-cache: IMAGE_TAG?=test
5351
run-in-kind-db-cache: PORCH_CACHE_TYPE=DB
5452
run-in-kind-db-cache: load-images-to-kind deployment-config deploy-current-config
5553

5654
.PHONY: run-in-kind-no-git
5755
run-in-kind-no-git: IMAGE_REPO=porch-kind## Build and deploy porch into a kind cluster without mock git server
58-
run-in-kind-no-git: IMAGE_TAG?=test
5956
run-in-kind-no-git: SKIP_LOCAL_GIT=true
6057
run-in-kind-no-git: PORCH_CACHE_TYPE=CR
6158
run-in-kind-no-git: load-images-to-kind deployment-config deploy-current-config
6259

6360
.PHONY: run-in-kind-db-cache-no-git
6461
run-in-kind-db-cache-no-git: IMAGE_REPO=porch-kind## Build and deploy porch into a kind cluster with postgres backend without mock git server
65-
run-in-kind-db-cache-no-git: IMAGE_TAG?=test
6662
run-in-kind-db-cache-no-git: SKIP_LOCAL_GIT=true
6763
run-in-kind-db-cache-no-git: PORCH_CACHE_TYPE=DB
6864
run-in-kind-db-cache-no-git: load-images-to-kind deployment-config deploy-current-config
6965

7066
.PHONY: run-in-kind-no-server
7167
run-in-kind-no-server: IMAGE_REPO=porch-kind## Build and deploy porch without the porch-server into a kind cluster
72-
run-in-kind-no-server: IMAGE_TAG?=test
7368
run-in-kind-no-server: SKIP_PORCHSERVER_BUILD=true
7469
run-in-kind-no-server: PORCH_CACHE_TYPE=CR
7570
run-in-kind-no-server: load-images-to-kind deployment-config-no-server deploy-current-config
7671

7772
.PHONY: run-in-kind-db-cache-no-server
7873
run-in-kind-db-cache-no-server: IMAGE_REPO=porch-kind## Build and deploy porch into a kind cluster with postgres backend without the porch-server
79-
run-in-kind-db-cache-no-server: IMAGE_TAG?=test
8074
run-in-kind-db-cache-no-server: PORCH_CACHE_TYPE=DB
8175
run-in-kind-db-cache-no-server: load-images-to-kind deployment-config-no-server deploy-current-config
8276

8377
.PHONY: run-in-kind-no-controller
8478
run-in-kind-no-controller: IMAGE_REPO=porch-kind## Build and deploy porch without the controllers into a kind cluster
85-
run-in-kind-no-controller: IMAGE_TAG?=test
8679
run-in-kind-no-controller: SKIP_CONTROLLER_BUILD=true
8780
run-in-kind-no-controller: load-images-to-kind deployment-config-no-controller deploy-current-config
8881

8982
.PHONY: run-in-kind-db-cache-no-controller
9083
run-in-kind-db-cache-no-controller: IMAGE_REPO=porch-kind## Build and deploy porch without the controllers into a kind cluster with postgres backend
91-
run-in-kind-db-cache-no-controller: IMAGE_TAG?=test
9284
run-in-kind-db-cache-no-controller: SKIP_CONTROLLER_BUILD=true
9385
run-in-kind-db-cache-no-controller: PORCH_CACHE_TYPE=DB
9486
run-in-kind-db-cache-no-controller: load-images-to-kind deployment-config-no-controller deploy-current-config
@@ -124,19 +116,16 @@ deploy-current-config:## Deploy the configuration that is currently in $(DEPLOYP
124116

125117
.PHONY: reload-function-runner
126118
reload-function-runner: IMAGE_REPO=porch-kind## Rebuild and reload function-runner in kind cluster
127-
reload-function-runner: IMAGE_TAG?=test
128119
reload-function-runner:
129120
./scripts/reload-component.sh function-runner
130121

131122
.PHONY: reload-server
132123
reload-server: IMAGE_REPO=porch-kind## Rebuild and reload porch-server in kind cluster
133-
reload-server: IMAGE_TAG?=test
134124
reload-server:
135125
./scripts/reload-component.sh server
136126

137127
.PHONY: reload-controllers
138128
reload-controllers: IMAGE_REPO=porch-kind## Rebuild and reload porch-controllers in kind cluster
139-
reload-controllers: IMAGE_TAG?=test
140129
reload-controllers:
141130
./scripts/reload-component.sh controllers
142131

scripts/common.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
# NOTE: Users should use root Makefile targets instead of calling scripts directly
44

55
# Only set defaults if variables are not already exported from Makefile
6-
echo "DEBUG common.sh: IMAGE_TAG before fallback=${IMAGE_TAG}"
76
IMAGE_REPO=${IMAGE_REPO:-docker.io/nephio}
8-
IMAGE_TAG=${IMAGE_TAG:-latest}
9-
echo "DEBUG common.sh: IMAGE_TAG after fallback=${IMAGE_TAG}"
107

118
PORCH_SERVER_IMAGE=${PORCH_SERVER_IMAGE:-porch-server}
129
PORCH_CONTROLLERS_IMAGE=${PORCH_CONTROLLERS_IMAGE:-porch-controllers}

scripts/create-deployment-config.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ set -e
2121
source "$(dirname "$0")/common.sh"
2222

2323
echo "Creating deployment configuration..."
24-
echo "DEBUG: IMAGE_TAG=${IMAGE_TAG}"
25-
echo "DEBUG: IMAGE_REPO=${IMAGE_REPO}"
2624

2725
rm -rf "${DEPLOYPORCHCONFIGDIR}" || true
2826
mkdir -p "${DEPLOYPORCHCONFIGDIR}"

0 commit comments

Comments
 (0)