Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy: Follow newest capistrano git handlings #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions manala.deploy/tasks/strategy/git.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
---

- name: strategy/git > Cached repository
- name: strategy/git > Update repository
git:
repo: "{{ manala_deploy_strategy_git_repo }}"
dest: "{{ deploy_helper.shared_path ~ '/cached-copy' }}"
dest: "{{ manala_deploy_dir ~ '/repo' }}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would give /srv/app/repo instead of /srv/app/shared/cached-copy, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

version: "{{ manala_deploy_strategy_git_version }}"
accept_hostkey: true
update: true
force: true

- name: strategy/git > Create release folder
file:
state: directory
path: "{{ deploy_helper.new_release_path }}"

- name: strategy/git > Get head
command: git rev-parse --short HEAD
shell: git archive --format=tar {{ manala_deploy_strategy_git_version }} | tar -x -f - -C "{{ deploy_helper.new_release_path }}"
args:
chdir: "{{ deploy_helper.shared_path ~ '/cached-copy' }}"
chdir: "{{ manala_deploy_dir ~ '/repo' }}"
register: __manala_deploy_strategy_git_head_result

- name: strategy/git > Set head
Expand Down