Skip to content

Commit

Permalink
Attempt to publish ingress URL as part of deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas-Geraghty committed Feb 6, 2025
1 parent 6fcd395 commit e2e9746
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
12 changes: 11 additions & 1 deletion .github/actions/cloud-platform-deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ outputs:
deployment_changelog:
description: "The changelog for the deployment"
value: ${{ steps.version_history.outputs.deployment_changelog }}
deployment_ingress_url:
description: "Ingress URL for the deployment"
value: ${{ steps.get_deployment_ingress_url.outputs.deployment_ingress_url }}

runs:
using: composite
Expand Down Expand Up @@ -154,4 +157,11 @@ runs:
${{ inputs.helm_additional_args }} \
${{ steps.check-ip-allowlists.outputs.ALLOWLIST_GROUPS }} \
${{ steps.check-ip-allowlists-version.outputs.ALLOWLIST_VERSION }} \
--wait
--wait
- name: Extract deployment ingress URL
id: get_deployment_ingress_url
shell: bash
run: |
ingress_host=$(yq '.generic-service.ingress.host' "helm_deploy/values-${{ steps.env.outputs.environment }}.yaml")
echo "deployment_ingress_url=https://${ingress_host}" >> $GITHUB_OUTPUT
19 changes: 18 additions & 1 deletion .github/workflows/deploy_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ jobs:
strategy:
fail-fast: false
environment: ${{ inputs.environment }}
outputs:
deployment_ingress_url: ${{ steps.deploy.outputs.deployment_ingress_url }}
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -90,4 +92,19 @@ jobs:
helm_dir: ${{ inputs.helm_dir }}
helm_allowlist_groups: ${{ vars.HMPPS_IP_ALLOWLIST_GROUPS_YAML }}
helm_allowlist_version: ${{ vars.HMPPS_IP_ALLOWLIST_GROUPS_VERSION }}
release_name: ${{ inputs.release_name }}
release_name: ${{ inputs.release_name }}

deployment_status:
name: Update Deployment Status
runs-on: ubuntu-latest
needs: [deploy_env]
steps:
- name: Update Deployment Status
uses: octokit/request-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
route: POST /repos/${{ github.repository }}/deployments/${{ github.run_id }}/statuses
state: success
environment_url: ${{ needs.deploy_env.outputs.deployment_ingress_url }}
description: "Deployment completed successfully!"

0 comments on commit e2e9746

Please sign in to comment.