Deploy using HURL
So that the deployment can be monitored
This commit is contained in:
@@ -81,6 +81,10 @@ jobs:
|
||||
if: github.ref == 'refs/heads/main'
|
||||
concurrency: deploy-group
|
||||
steps:
|
||||
- name: Notify Coolify
|
||||
run: |
|
||||
curl --request GET '${{ secrets.COOLIFY_WEBHOOK }}' --header 'Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}'
|
||||
- uses: actions/checkout@v4
|
||||
- uses: gacts/install-hurl@v1
|
||||
- run: hurl --test --progress-bar scripts/deploy.hurl
|
||||
env:
|
||||
HURL_coolify_token: ${{ secrets.COOLIFY_TOKEN }}
|
||||
HURL_coolify_host: ${{ vars.COOLIFY_HOST }}
|
||||
HURL_coolify_app_uuid: ${{ vars.COOLIFY_APP_UUID }}
|
||||
|
||||
@@ -168,10 +168,10 @@ run = 'rm data/music_library_prod*'
|
||||
description = 'Run HTTP tests against production'
|
||||
run = 'hurl --test test/prod.hurl'
|
||||
|
||||
[tasks."prod:trigger-deploy"]
|
||||
description = 'Trigger a deploy on production infra'
|
||||
[tasks."prod:deploy"]
|
||||
description = 'Deploy on production and monitor'
|
||||
run = """
|
||||
curl --request GET "$COOLIFY_WEBHOOK" --header "Authorization: Bearer $COOLIFY_TOKEN"
|
||||
hurl --test --progress-bar scripts/deploy.hurl
|
||||
"""
|
||||
|
||||
# GIT TOOLING
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# Trigger a deploy and capture the deployment ID
|
||||
|
||||
GET {{coolify_host}}/api/v1/deploy
|
||||
Authorization: Bearer {{coolify_token}}
|
||||
[Query]
|
||||
uuid: {{coolify_app_uuid}}
|
||||
HTTP 200
|
||||
[Captures]
|
||||
deployment_uuid: jsonpath "$.deployments[0].deployment_uuid"
|
||||
|
||||
# Watch the deployment until it's finished
|
||||
|
||||
GET {{coolify_host}}/api/v1/deployments/{{deployment_uuid}}
|
||||
Authorization: Bearer {{coolify_token}}
|
||||
[Options]
|
||||
delay: 20s
|
||||
retry: 20
|
||||
retry-interval: 10s
|
||||
HTTP 200
|
||||
[Asserts]
|
||||
jsonpath "$.status" == "finished"
|
||||
Reference in New Issue
Block a user