Skip to content

Commit

Permalink
Fix build script
Browse files Browse the repository at this point in the history
  • Loading branch information
mesudip committed May 9, 2024
1 parent 5ad580a commit 427bb98
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 32 deletions.
3 changes: 2 additions & 1 deletion tests/test-infrastructure/build-and-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function update-service(){
}

if [[ "$1" == "update-images" ]]

then
update-service govtool_backend "$BASE_IMAGE_NAME"/backend:${GOVTOOL_TAG}
update-service govtool_frontend "$BASE_IMAGE_NAME"/frontend:${GOVTOOL_TAG}
update-service govtool_metadata-validation "$BASE_IMAGE_NAME"/metadata-validation:${GOVTOOL_TAG}
Expand All @@ -29,5 +29,6 @@ if [[ "$1" == "update-images" ]]
update-service govaction-loader_frontend "$BASE_IMAGE_NAME"/gov-action-loader-backend:${GOVTOOL_TAG}

elif [[ $1 == "full" ]]
then
./deploy stack all
fi
2 changes: 0 additions & 2 deletions tests/test-infrastructure/docker-compose-govaction-loader.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ services:
environment:
KUBER_API_URL: "http://kuber:8081"
KUBER_API_KEY: ""
BLOCKFROST_API_URL: "${BLOCKFROST_API_URL}"
BLOCKFROST_PROJECT_ID: "${BLOCKFROST_PROJECT_ID}"
VIRTUAL_HOST: https://governance-${BASE_DOMAIN}/api/ -> /api/
networks:
- default
Expand Down
41 changes: 12 additions & 29 deletions tests/test-infrastructure/playbook.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,22 @@
---
- name: Update deployed images.
- name: Update deployed images
hosts: test_server
gather_facts: no
tasks:
- name: Create /opt/govtool directory if it does not exist
ansible.builtin.file:
path: /opt/govtool
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: Checkout to GOVTOOL_TAG commit
ansible.builtin.git:
repo: https://github.com/intersectmbo/govtool
dest: /opt/govtool
version: "{{ lookup('env', 'GOVTOOL_TAG') }}"
force: yes
update: yes
clone: yes
become: yes

- name: Execute build-and-deploy.sh
ansible.builtin.shell: "/opt/govtool/build-and-deploy.sh update-images"
ansible.builtin.shell: "/opt/govtool/tests/test-infrastructure/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 427bb98

Please sign in to comment.