Skip to content

Commit

Permalink
Merge pull request #2167 from Nordix/local_ironic
Browse files Browse the repository at this point in the history
✨ add support for locally built ironic in e2e test
  • Loading branch information
metal3-io-bot authored Jan 9, 2025
2 parents 0633e68 + cc72eb5 commit cdc2d73
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
9 changes: 9 additions & 0 deletions hack/ci-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ echo "BMO_E2E_EMULATOR=${BMO_E2E_EMULATOR}"
export E2E_CONF_FILE="${REPO_ROOT}/test/e2e/config/ironic.yaml"
export E2E_BMCS_CONF_FILE="${REPO_ROOT}/test/e2e/config/bmcs-${BMC_PROTOCOL}.yaml"

LOAD_LOCAL_IRONIC="${LOAD_LOCAL_IRONIC:-false}"

case "${GINKGO_FOCUS:-}" in
*upgrade*)
export DEPLOY_IRONIC="false"
Expand Down Expand Up @@ -80,6 +82,13 @@ while ! minikube start; do sleep 30; done
docker image save -o /tmp/bmo-e2e.tar quay.io/metal3-io/baremetal-operator:e2e
minikube image load /tmp/bmo-e2e.tar
rm /tmp/bmo-e2e.tar
if [[ "${LOAD_LOCAL_IRONIC}" == "true" ]]; then
echo "Saving local ironic image!"
docker image save -o \
"/tmp/ironic-e2e.tar" "quay.io/metal3-io/ironic:local"
minikube image load /tmp/ironic-e2e.tar
rm /tmp/ironic-e2e.tar
fi

# This IP is defined by the network we created above.
IP_ADDRESS="192.168.222.1"
Expand Down
10 changes: 10 additions & 0 deletions ironic-deployment/overlays/e2e-local-ironic/ironic-patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ironic
spec:
template:
spec:
containers:
- name: ironic-dnsmasq
$patch: delete
27 changes: 27 additions & 0 deletions ironic-deployment/overlays/e2e-local-ironic/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: baremetal-operator-system
resources:
- ../e2e

patches:
- path: ironic-patch.yaml
- patch: |
# Don't try to pull again the pre-loaded image
- op: replace
path: /spec/template/spec/containers/0/imagePullPolicy
value: IfNotPresent
- op: replace
path: /spec/template/spec/containers/1/imagePullPolicy
value: IfNotPresent
- op: replace
path: /spec/template/spec/containers/2/imagePullPolicy
value: IfNotPresent
target:
kind: Deployment
name: ironic

images:
- name: quay.io/metal3-io/ironic
newTag: local

0 comments on commit cdc2d73

Please sign in to comment.