Skip to content

Commit

Permalink
switch horizon image to use horizon-rxt
Browse files Browse the repository at this point in the history
use multi-stage build

Signed-off-by: Kevin Carter <[email protected]>
  • Loading branch information
cloudnull committed Jan 12, 2024
1 parent 1509648 commit f829a7a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/release-horizon-rxt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ jobs:
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
- name: Dynamically set MY_DATE environment variable
run: echo "MY_DATE=$(date +%s)" >> $GITHUB_ENV
- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
Expand All @@ -64,6 +66,7 @@ jobs:
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/horizon-rxt:${{ github.event.inputs.pluginTag }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/horizon-rxt:${{ github.event.inputs.pluginTag }}-${{ env.MY_DATE }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ github.event.inputs.imageTag }}
Expand Down
16 changes: 12 additions & 4 deletions Containerfiles/HorizonRXT-Containerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
ARG VERSION=master-ubuntu_jammy
FROM openstackhelm/horizon:${VERSION}
FROM openstackhelm/horizon:${VERSION} as build
ARG PLUGIN_VERSION=master
RUN /var/lib/openstack/bin/pip install --constraint=https://releases.openstack.org/constraints/upper/${PLUGIN_VERSION} \
heat-dashboard \
octavia-dashboard
RUN apt update && apt install -y git
RUN /var/lib/openstack/bin/pip install --upgrade --force-reinstall pip
RUN export ORIG_PLUGIN_VERSION="${PLUGIN_VERSION}"; \
if [ "${PLUGIN_VERSION}" != 'master' ]; then export PLUGIN_VERSION=stable/${PLUGIN_VERSION}; fi; \
. /var/lib/openstack/bin/activate; \
/var/lib/openstack/bin/pip install --constraint=https://releases.openstack.org/constraints/upper/${ORIG_PLUGIN_VERSION} \
git+https://opendev.org/openstack/heat-dashboard@${PLUGIN_VERSION}#egg=heat_dashboard \
git+https://opendev.org/openstack/octavia-dashboard@${PLUGIN_VERSION}#egg=octavia_dashboard
RUN find /var/lib/openstack -regex '^.*\(__pycache__\|\.py[co]\)$' -delete
FROM openstackhelm/horizon:${VERSION}
COPY --from=build /var/lib/openstack/. /var/lib/openstack/

0 comments on commit f829a7a

Please sign in to comment.