Update build inception.yml

master
omidshj 2025-02-04 21:54:52 +03:30
parent c412c432d5
commit c3545b785b
1 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,8 @@
--- ---
- name: update inception - name: update inception
hosts: all hosts: all
vars:
app_dir: "{{ app_dir | default('/root/code/inception') }}"
tasks: tasks:
# - name: Change to the app directory and update the repository # - name: Change to the app directory and update the repository
# git: # git:
@ -9,14 +11,14 @@
# version: master # version: master
# register: git_result # register: git_result
- name: Go to the application directory - name: Go to the application directory
command: chdir=/root/code/inception git pull origin master command: chdir={{ app_dir }} git pull origin master
register: git_result register: git_result
- name: Build docker image if there were changes - name: Build docker image if there were changes
docker_image: docker_image:
source: build source: build
build: build:
path: /root/code/inception path: "{{ app_dir }}""
name: inception name: inception
tag: "{{semaphore_vars.task_details.target_version}}" tag: "{{semaphore_vars.task_details.target_version}}"
when: git_result.changed when: git_result.changed