diff --git a/tests/test-infrastructure/playbook.yml b/tests/test-infrastructure/playbook.yml index 3effdf44..3074db4a 100644 --- a/tests/test-infrastructure/playbook.yml +++ b/tests/test-infrastructure/playbook.yml @@ -1,5 +1,5 @@ --- -- name: Update deployed images. +- name: Update deployed images hosts: test_server gather_facts: no tasks: @@ -9,31 +9,25 @@ 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 or fetch the govtool repository + ansible.builtin.git: + repo: https://github.com/sireto/govtool + dest: /opt/govtool + update: yes + 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 \ No newline at end of file