This commit is contained in:
parent
d0efc38c6a
commit
319e42a5d1
@ -13,6 +13,14 @@ steps:
|
|||||||
- echo "$PWD"
|
- echo "$PWD"
|
||||||
- echo "$SSH_KEY" > $PWD/id_rsa && chmod 0600 $PWD/id_rsa
|
- echo "$SSH_KEY" > $PWD/id_rsa && chmod 0600 $PWD/id_rsa
|
||||||
|
|
||||||
|
- name: check ansible syntax
|
||||||
|
image: plugins/ansible:3
|
||||||
|
settings:
|
||||||
|
playbook: nightly.yaml
|
||||||
|
galaxy: requirements.yaml
|
||||||
|
inventory: inventory.yaml
|
||||||
|
syntax_check: true
|
||||||
|
|
||||||
- name: run playbook in check mode
|
- name: run playbook in check mode
|
||||||
image: plugins/ansible:3
|
image: plugins/ansible:3
|
||||||
environment:
|
environment:
|
||||||
|
@ -1,13 +1,16 @@
|
|||||||
---
|
---
|
||||||
- ansible.builtin.command: docker-compose pull
|
- name: Update service
|
||||||
|
ansible.builtin.command: docker-compose pull
|
||||||
args:
|
args:
|
||||||
chdir: /home/drone
|
chdir: /home/drone
|
||||||
|
|
||||||
- ansible.builtin.command: docker-compose down
|
- name: Shut down service
|
||||||
|
ansible.builtin.command: docker-compose down
|
||||||
args:
|
args:
|
||||||
chdir: /home/drone
|
chdir: /home/drone
|
||||||
|
|
||||||
- ansible.builtin.command: docker-compose up -d
|
- name: Start service
|
||||||
|
ansible.builtin.command: docker-compose up -d
|
||||||
args:
|
args:
|
||||||
chdir: /home/drone
|
chdir: /home/drone
|
||||||
...
|
...
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
- ansible.builtin.copy:
|
- name: Copy docker-compose configuration
|
||||||
|
ansible.builtin.copy:
|
||||||
src: docker-compose.yaml
|
src: docker-compose.yaml
|
||||||
dest: /home/service-user/docker-compose.yaml
|
dest: /home/service-user/docker-compose.yaml
|
||||||
owner: service-user
|
owner: service-user
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
- ansible.builtin.copy:
|
- name: Copy docker-compose configuration
|
||||||
|
ansible.builtin.copy:
|
||||||
src: docker-compose.yaml
|
src: docker-compose.yaml
|
||||||
dest: /home/service-user/docker-compose.yaml
|
dest: /home/service-user/docker-compose.yaml
|
||||||
owner: service-user
|
owner: service-user
|
||||||
|
@ -1,26 +1,30 @@
|
|||||||
---
|
---
|
||||||
- ansible.builtin.copy:
|
- name: Copy prometheus configuration
|
||||||
|
ansible.builtin.copy:
|
||||||
src: prometheus.yml
|
src: prometheus.yml
|
||||||
dest: /home/service-user/prometheus/prometheus.yml
|
dest: /home/service-user/prometheus/prometheus.yml
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
|
|
||||||
- ansible.builtin.copy:
|
- name: Copy alertmanager configuration
|
||||||
|
ansible.builtin.copy:
|
||||||
src: alertmanager.yml
|
src: alertmanager.yml
|
||||||
dest: /home/service-user/alertmanager/config.yml
|
dest: /home/service-user/alertmanager/config.yml
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
|
|
||||||
- ansible.builtin.copy:
|
- name: Copy alert rules
|
||||||
|
ansible.builtin.copy:
|
||||||
src: alert.rules
|
src: alert.rules
|
||||||
dest: /home/service-user/prometheus/alert.rules
|
dest: /home/service-user/prometheus/alert.rules
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
|
|
||||||
- ansible.builtin.copy:
|
- name: Copy docker-compose configuration
|
||||||
|
ansible.builtin.copy:
|
||||||
src: docker-compose.yaml
|
src: docker-compose.yaml
|
||||||
dest: /home/service-user/docker-compose.yaml
|
dest: /home/service-user/docker-compose.yaml
|
||||||
owner: service-user
|
owner: service-user
|
||||||
|
@ -1,20 +1,24 @@
|
|||||||
---
|
---
|
||||||
- ansible.builtin.copy:
|
- name: Copy docker-compose configuration
|
||||||
|
ansible.builtin.copy:
|
||||||
src: docker-compose.yml
|
src: docker-compose.yml
|
||||||
dest: /home/swagger/docker-compose.yml
|
dest: /home/swagger/docker-compose.yml
|
||||||
owner: swagger
|
owner: swagger
|
||||||
group: swagger
|
group: swagger
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
|
|
||||||
- ansible.builtin.command: docker-compose pull
|
- name: Update service
|
||||||
|
ansible.builtin.command: docker-compose pull
|
||||||
args:
|
args:
|
||||||
chdir: /home/swagger
|
chdir: /home/swagger
|
||||||
|
|
||||||
- ansible.builtin.command: docker-compose down
|
- name: Shut down service
|
||||||
|
ansible.builtin.command: docker-compose down
|
||||||
args:
|
args:
|
||||||
chdir: /home/swagger
|
chdir: /home/swagger
|
||||||
|
|
||||||
- ansible.builtin.command: docker-compose up -d
|
- name: Start service
|
||||||
|
ansible.builtin.command: docker-compose up -d
|
||||||
args:
|
args:
|
||||||
chdir: /home/swagger
|
chdir: /home/swagger
|
||||||
...
|
...
|
||||||
|
@ -1,13 +1,16 @@
|
|||||||
---
|
---
|
||||||
- ansible.builtin.command: docker-compose pull
|
- name: Update service
|
||||||
|
ansible.builtin.command: docker-compose pull
|
||||||
args:
|
args:
|
||||||
chdir: /home/service-user
|
chdir: /home/service-user
|
||||||
|
|
||||||
- ansible.builtin.command: docker-compose down
|
- name: Shut down service
|
||||||
|
ansible.builtin.command: docker-compose down
|
||||||
args:
|
args:
|
||||||
chdir: /home/service-user
|
chdir: /home/service-user
|
||||||
|
|
||||||
- ansible.builtin.command: docker-compose up -d
|
- name: Start service
|
||||||
|
ansible.builtin.command: docker-compose up -d
|
||||||
args:
|
args:
|
||||||
chdir: /home/service-user
|
chdir: /home/service-user
|
||||||
...
|
...
|
||||||
|
Loading…
Reference in New Issue
Block a user