Commit 37bdb016 by 刘旋尧

预发布环境

parent 9ce58d43
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
- name: 执行hook - name: 执行hook
hosts: pre hosts: pre
become: yes become: yes
vars:
type: pre
vars_files: vars_files:
- vars/main.yml - vars/main.yml
roles: roles:
......
--- ---
- name: 先拉取代码 - name: first-pull-code
git: repo={{ projects[project].repo }} dest={{ projects[project].dir }} accept_hostkey=yes clone=yes update=yes force=yes git: repo={{ projects[project].repo }} dest={{ projects[project].dir }} accept_hostkey=yes clone=yes update=yes force=yes
- name: 更新到指定版本 - name: pull-pre
command: "git pull origin {{ branch }}"
args:
chdir: "{{ projects[project].dir }}"
when: type == "pre"
- name: pull-pre
command: "git checkout {{ branch }}"
args:
chdir: "{{ projects[project].dir }}"
when: type == "pre"
- name: update-to-special-commit
command: "git checkout {{ commit }}" command: "git checkout {{ commit }}"
args: args:
chdir: "{{ projects[project].dir }}" chdir: "{{ projects[project].dir }}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment