2024-05-17 19:42:53 +03:30
|
|
|
---
|
|
|
|
- name: build ocean
|
|
|
|
hosts: all
|
|
|
|
tasks:
|
|
|
|
# - name: Change to the app directory and update the repository
|
|
|
|
# git:
|
|
|
|
# repo: 'https://gt.eron.co/eron/inception.git' # Replace with your repository URL
|
|
|
|
# dest: /root/code/inception
|
|
|
|
# version: master
|
|
|
|
# register: git_result
|
|
|
|
- name: Go to the ocean directory
|
2024-09-02 13:44:05 +03:30
|
|
|
command: "chdir={{directory}} git pull origin {{branch}}"
|
2024-05-17 19:42:53 +03:30
|
|
|
register: git_result
|
|
|
|
|
|
|
|
- name: Build docker image if there were changes
|
|
|
|
docker_image:
|
|
|
|
source: build
|
|
|
|
build:
|
2024-09-02 13:47:29 +03:30
|
|
|
path: "{{directory}}"
|
2024-05-17 19:42:53 +03:30
|
|
|
name: ocean
|
|
|
|
tag: "{{semaphore_vars.task_details.target_version}}"
|
|
|
|
when: git_result.changed
|