From 737e0faf209d79d7ad7f696ac7951337900e84e0 Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Fri, 2 Aug 2024 08:41:22 -0500 Subject: [PATCH 1/3] fix: fixup the tagging on the common workflow container The common workflow container needs to push to latest when we merge into the main branch, otherwise it should create a tag and a PR specific tag. --- .github/workflows/containers.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/containers.yaml b/.github/workflows/containers.yaml index 66d5ddbd0..31d4ad5e6 100644 --- a/.github/workflows/containers.yaml +++ b/.github/workflows/containers.yaml @@ -126,6 +126,10 @@ jobs: uses: docker/metadata-action@v5 with: images: ghcr.io/rackerlabs/understack/${{ matrix.container.name }} + tags: | + type=raw,value=latest,enable={{is_default_branch}} + type=ref,event=tag + type=ref,event=pr labels: | org.opencontainers.image.title=${{ matrix.container.title }} env: From c5dd3c2c0813836678ed2cf4b50950b5367c6af2 Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Fri, 2 Aug 2024 09:27:54 -0500 Subject: [PATCH 2/3] fix: ensure we install undercloud-workflows in the container The point of this container is to have undercloud-workflows in it so install it and not just its dependencies. --- containers/Dockerfile.ironic-nautobot-client | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/containers/Dockerfile.ironic-nautobot-client b/containers/Dockerfile.ironic-nautobot-client index da199218b..987fd8db9 100644 --- a/containers/Dockerfile.ironic-nautobot-client +++ b/containers/Dockerfile.ironic-nautobot-client @@ -28,6 +28,6 @@ WORKDIR /app RUN mkdir -p /opt/venv/wheels/ COPY --from=builder /app/dist/*.whl /app/dist/requirements.txt /opt/venv/wheels/ -RUN --mount=type=cache,target=/root/.cache/.pip /opt/venv/bin/pip install --find-links /opt/venv/wheels/ --only-binary netifaces -r /opt/venv/wheels/requirements.txt +RUN --mount=type=cache,target=/root/.cache/.pip /opt/venv/bin/pip install --find-links /opt/venv/wheels/ --only-binary netifaces -r /opt/venv/wheels/requirements.txt understack-workflows USER $APP_USER From 5893d2adcadc737ae6e6f4b847efe1a476765c2e Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Fri, 2 Aug 2024 09:28:37 -0500 Subject: [PATCH 3/3] fix: correct import line for our module --- .../understack_workflows/main/sync_nautobot_interfaces.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/understack-workflows/understack_workflows/main/sync_nautobot_interfaces.py b/python/understack-workflows/understack_workflows/main/sync_nautobot_interfaces.py index 7d36225d1..4395196c2 100644 --- a/python/understack-workflows/understack_workflows/main/sync_nautobot_interfaces.py +++ b/python/understack-workflows/understack_workflows/main/sync_nautobot_interfaces.py @@ -1,5 +1,4 @@ import sushy -from nautobot import Nautobot from understack_workflows.helpers import arg_parser from understack_workflows.helpers import credential @@ -8,6 +7,7 @@ from understack_workflows.helpers import oob_sushy_session from understack_workflows.helpers import setup_logger from understack_workflows.models import Chassis +from understack_workflows.nautobot import Nautobot logger = setup_logger(__name__)