Skip to content

Commit

Permalink
feat(ci): add staging test
Browse files Browse the repository at this point in the history
DEVOPS-77
  • Loading branch information
remdub committed Jun 29, 2024
1 parent d1d5701 commit 3199a27
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ env:

jobs:
staging:
environment:
name: staging
runs-on:
group: self-hosted
steps:
Expand Down Expand Up @@ -60,6 +62,28 @@ jobs:
- name: Restart staging instances
run: |
curl -k --fail --show-error --header "X-Rundeck-Auth-Token:${{ secrets.TELESERVICES_RUNDECK_TOKEN }}" -d "filter=name ts001.staging.imio.be" ${{ secrets.RUNDECK_URL }}/api/18/job/5dca225b-ff0d-4251-8052-2a89a05aa314/run/
- name: Test staging instance
timeout-minutes: 5
run: |
until curl -m 2 --output /dev/null --silent --fail '${{ secrets.STAGING_HEALTH_API_URL }}';
do
sleep 5
echo 'Waiting until guichet-citoyen staging instance has started'
done
echo 'guichet-citoyen staging instance is up and running'
until curl -m 2 --output /dev/null --silent --fail '${{ secrets.STAGING_HEALTH_API_URL }}' | jq '
.data.passerelle.is_running
and .data.portal.is_running
and ".data.portal-agent.is_running"
and .data.idp.is_running
and .data.eservices.is_running
and .data.agenda.is_running
and .data.statistics.is_running'
do
sleep 3
echo 'Waiting until services are running on guichet-citoyen staging instance'
done
echo 'services are running on guichet-citoyen staging instance'
- name : Send notification on Mattermost
run: |
JOB_URL="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
Expand Down

0 comments on commit 3199a27

Please sign in to comment.