Skip to content

Commit

Permalink
Clone repo on server instead of copy file
Browse files Browse the repository at this point in the history
  • Loading branch information
mesudip committed May 9, 2024
1 parent 3414ca7 commit 30bba11
Showing 1 changed file with 15 additions and 22 deletions.
37 changes: 15 additions & 22 deletions tests/test-infrastructure/playbook.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Update deployed images.
- name: Update deployed images
hosts: test_server
gather_facts: no
tasks:
Expand All @@ -9,31 +9,24 @@
state: directory
become: yes

- name: Copy files to the server
ansible.builtin.copy:
src: "{{ item }}"
dest: "/opt/govtool/{{ item }}"
mode: '0755'
with_items:
- build-and-deploy.sh
- build-images.sh
- configs_template/
- deploy.sh
- docker-compose-basic-services.yml
- docker-compose-cardano.yml
- docker-compose-govaction-loader.yml
- docker-compose-govtool.yml
- docker-compose-test.yml
- gen-configs.sh
- scripts/
- secrets_template/
- .env.example
- name: Clone the govtool repository
ansible.builtin.git:
repo: https://github.com/sireto/govtool
dest: /opt/govtool
become: yes

- name: Checkout to GOVTOOL_TAG commit
ansible.builtin.git:
repo: https://github.com/sireto/govtool
dest: /opt/govtool
version: "{{ GOVTOOL_TAG }}"
force: yes
become: yes

- name: Execute build-and-deploy.sh
ansible.builtin.shell: "/opt/govtool/build-and-deploy.sh update-images"
args:
chdir: "/opt/govtool"
chdir: "/opt/govtool/tests/test-infrastructure"
environment:
GOVTOOL_TAG: "{{ lookup('env', 'GOVTOOL_TAG') }}"
become: yes
become: yes

0 comments on commit 30bba11

Please sign in to comment.