playbooks/i3v.yml

22 lines
682 B
YAML
Raw Normal View History

2024-05-17 12:02:07 +03:30
---
- name: update inception
hosts: all
tasks:
2024-05-17 12:30:54 +03:30
# - 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
2024-05-17 12:42:00 +03:30
- name: Go to the application directory
command: chdir=/root/code/inception git pull origin master
register: git_result
2024-05-17 12:02:07 +03:30
2024-05-17 12:05:43 +03:30
- name: Build docker image if there were changes
docker_image:
source: build
build:
path: /root/code/inception
name: inception
2024-05-17 12:46:41 +03:30
tag: "{{semaphore_vars.task_details.target_version}}"
2024-05-17 12:42:00 +03:30
when: git_result.changed