diff --git a/.github/workflows/release-horizon-rxt.yml b/.github/workflows/release-horizon-rxt.yml index e6b4563d1..a41e4f5a1 100644 --- a/.github/workflows/release-horizon-rxt.yml +++ b/.github/workflows/release-horizon-rxt.yml @@ -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: @@ -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 }} diff --git a/Containerfiles/HorizonRXT-Containerfile b/Containerfiles/HorizonRXT-Containerfile index 8f6f20282..3fc30a77b 100644 --- a/Containerfiles/HorizonRXT-Containerfile +++ b/Containerfiles/HorizonRXT-Containerfile @@ -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/ diff --git a/helm-configs/horizon/horizon-helm-overrides.yaml b/helm-configs/horizon/horizon-helm-overrides.yaml index 1ae772ac9..298f82385 100644 --- a/helm-configs/horizon/horizon-helm-overrides.yaml +++ b/helm-configs/horizon/horizon-helm-overrides.yaml @@ -20,8 +20,8 @@ images: tags: db_init: docker.io/openstackhelm/heat:2023.1-ubuntu_jammy db_drop: docker.io/openstackhelm/heat:2023.1-ubuntu_jammy - horizon_db_sync: docker.io/openstackhelm/horizon:2023.1-ubuntu_jammy - horizon: docker.io/openstackhelm/horizon:2023.1-ubuntu_jammy + horizon_db_sync: ghcr.io/rackerlabs/genestack/horizon-rxt:2023.1 + horizon: ghcr.io/rackerlabs/genestack/horizon-rxt:2023.1 test: docker.io/openstackhelm/osh-selenium:latest-ubuntu_focal dep_check: quay.io/airshipit/kubernetes-entrypoint:v1.0.0 image_repo_sync: docker.io/docker:17.07.0 @@ -6888,9 +6888,9 @@ conf: 'cloudwatch:PutMetricAlarm': 'rule:deny_stack_user' 'cloudwatch:PutMetricData': '' 'cloudwatch:SetAlarmState': 'rule:deny_stack_user' - context_is_admin: 'role:admin' - deny_everybody: '!' - deny_stack_user: 'not role:heat_stack_user' + 'context_is_admin': 'role:admin' + 'deny_everybody': '!' + 'deny_stack_user': 'not role:heat_stack_user' 'events:index': 'rule:deny_stack_user' 'events:show': 'rule:deny_stack_user' 'resource:index': 'rule:deny_stack_user'