safe compose up

master
omidshj 2025-02-07 16:59:04 +03:30
parent 14da76b2b7
commit 08806ef22d
1 changed files with 6 additions and 1 deletions

View File

@ -10,7 +10,6 @@
- name: Go to the ocean directory
command: "chdir={{directory}} git pull origin {{branch}}"
register: git_result
- name: Build docker image if there were changes
docker_image:
source: build
@ -19,6 +18,12 @@
name: ocean
tag: "{{semaphore_vars.task_details.target_version}}"
when: git_result.changed
register: build_result
ignore_errors: yes
- name: Print build result
debug:
msg: "Build failed!" # Log failure message
when: build_result.failed
- name: Bring down Docker Compose services
command: docker compose up -d
args: