generated from hjess/PythonTemplateProject
Merge pull request 'Trying something ...' (#8) from mvc into main
All checks were successful
Build, Push, and Deploy to Nomad / docker-nomad (push) Successful in 8s
All checks were successful
Build, Push, and Deploy to Nomad / docker-nomad (push) Successful in 8s
Reviewed-on: #8
This commit was merged in pull request #8.
This commit is contained in:
@@ -35,6 +35,22 @@ jobs:
|
||||
NOMAD_ADDR: https://nomad.i80.dk
|
||||
run: nomad job validate .gitea/workflows/nomad-job.hcl
|
||||
|
||||
- name: Apply Nomad Job
|
||||
env:
|
||||
NOMAD_ADDR: https://nomad.i80.dk
|
||||
run: nomad job run .gitea/workflows/nomad-job.hcl
|
||||
|
||||
- name: Wait for New Job to Become Healthy
|
||||
env:
|
||||
NOMAD_ADDR: https://nomad.i80.dk
|
||||
run: |
|
||||
echo "Waiting for the new job to become healthy..."
|
||||
until nomad job status lifefaq | grep -q "healthy"; do
|
||||
echo "Job not healthy yet, retrying..."
|
||||
sleep 5
|
||||
done
|
||||
echo "Job is healthy!"
|
||||
|
||||
- name: Stop old deployment
|
||||
env:
|
||||
NOMAD_ADDR: https://nomad.i80.dk
|
||||
@@ -42,10 +58,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
|
||||
|
||||
- name: Apply Nomad Job
|
||||
env:
|
||||
NOMAD_ADDR: https://nomad.i80.dk
|
||||
run: nomad job run .gitea/workflows/nomad-job.hcl
|
||||
|
||||
|
||||
- name: Update Nginx Configuration
|
||||
run: ssh runner@nomad sudo /opt/nginx_updater/venv/bin/python3 /opt/nginx_updater/nginx_updater.py lifefaq
|
||||
|
||||
Reference in New Issue
Block a user