-
-
Notifications
You must be signed in to change notification settings - Fork 606
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: Remove untracked files from project folder #1146
Conversation
🤔 don't deploys fail right now if there's untracked files? If so, this would silently delete files and allow them to succeed? |
No, untracked files just being ignored by
No longer failling after #999 (comment)
Untracked files are actually okay to exist. They don't make a difference. Adding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah forgot about that force
change.
Makes sense 👍
Guys, I got an error on that task:
|
What is the output when you run ansible in verbose mode? ansible-playbook deploy.yml -e env=production -e site=example.com -vvv
deploy production example.com -vvv |
|
What if you reorder these 2 tasks in https://github.com/roots/trellis/blob/ca56ae5f0b2b262af173d4a0b025e2f69d883621/roles/deploy/tasks/update.yml: - - name: Remove untracked files from project folder
- command: git clean -fdx
- args:
- chdir: "{{ project_source_path }}"
- register: git_clean
- changed_when: not not(git_clean.stdout)
- name: Failed connection to remote repo
fail:
msg: |
Git repo {{ project.repo }} cannot be accessed. Please verify the repository exists and you have SSH forwarding set up correctly.
More info:
> https://roots.io/trellis/docs/deploys/#ssh-keys
> https://roots.io/trellis/docs/ssh-keys/#cloning-remote-repo-using-ssh-agent-forwarding
when: git_clone is failed
+ - name: Remove untracked files from project folder
+ command: git clean -fdx
+ args:
+ chdir: "{{ project_source_path }}"
+ register: git_clean
+ changed_when: not not(git_clean.stdout) I expect deployment now fails at - name: Clone project files
git:
repo: "{{ project_git_repo }}"
dest: "{{ project_source_path }}"
version: "{{ project_version }}"
accept_hostkey: "{{ project.repo_accept_hostkey | default(repo_accept_hostkey | default(true)) }}"
force: yes
ignore_errors: true
- no_log: true
+ no_log: false
register: git_clone |
@tangrufus you were right,
and here is what I got after switching
So question is, why is that? Why
also in config:
and yes, repo exists. |
@tangrufus ok I revised all config files, deployed new droplet and appears it was my mistake. I used the non-existing branch on bitbucket for staging. |
No description provided.