generated from hjess/PythonTemplateProject
Merge pull request 'Trying something ...' (#9) from mvc into main
Some checks failed
Build, Push, and Deploy to Nomad / docker-nomad (push) Has been cancelled
Some checks failed
Build, Push, and Deploy to Nomad / docker-nomad (push) Has been cancelled
Reviewed-on: #9
This commit was merged in pull request #9.
This commit is contained in:
@@ -45,11 +45,18 @@ jobs:
|
||||
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..."
|
||||
|
||||
# Fetch the latest allocation ID for the job
|
||||
NEW_ALLOC=$(nomad job status lifefaq | awk '/ID/ {getline; print $1}' | head -n 1)
|
||||
echo "Latest allocation ID: $NEW_ALLOC"
|
||||
|
||||
# Wait for the new allocation to become healthy
|
||||
until nomad alloc status $NEW_ALLOC | grep -q "Client Status.*running"; do
|
||||
echo "New allocation not healthy yet, retrying..."
|
||||
sleep 5
|
||||
done
|
||||
echo "Job is healthy!"
|
||||
|
||||
echo "New allocation is healthy!"
|
||||
|
||||
- name: Stop old deployment
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user