Commit e34bce4a by 刘旋尧

ook

parent c0fd0d81
...@@ -2,6 +2,25 @@ ...@@ -2,6 +2,25 @@
- name: 先拉取代码 - name: 先拉取代码
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: 切换到master
command: "git checkout master"
args:
chdir: "{{ projects[project].dir }}"
when: type==test
- name: 合并dev
command: "git merge dev"
args:
chdir: "{{ projects[project].dir }}"
when: type==test
- name: 推送到master
command: "git push origin master"
args:
chdir: "{{ projects[project].dir }}"
when: type==test
- name: 更新到指定版本 - name: 更新到指定版本
command: "git checkout {{ commit }}" command: "git checkout {{ commit }}"
args: args:
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
- name: 执行hook - name: 执行hook
hosts: test hosts: test
become: yes become: yes
vars:
type: test
vars_files: vars_files:
- vars/main.yml - vars/main.yml
roles: roles:
......
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