Merge pull request 'Extend pipeline to deploy the test instance after the tests pass' (#114) from testing-pipeline into main
Reviewed-on: https://gitea.pangea.org/trustchain-oc1-orchestral/IdHub/pulls/114
This commit is contained in:
commit
4bda5abd64
|
@ -69,3 +69,21 @@ jobs:
|
||||||
source venv/bin/activate
|
source venv/bin/activate
|
||||||
python manage.py test
|
python manage.py test
|
||||||
|
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
needs: test
|
||||||
|
runs-on: self-hosted
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Trigger Remote Script
|
||||||
|
run: |
|
||||||
|
response=$(curl -s -o /dev/null -w "%{http_code}" -X POST http://45.150.187.54:5000/trigger-script -H "Authorization: SecretToken")
|
||||||
|
if [ "$response" -ne 200 ]; then
|
||||||
|
echo "Script execution failed with HTTP status $response"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Script execution successful"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
if: success() && github.ref == 'refs/heads/main'
|
||||||
|
|
Loading…
Reference in New Issue