Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
- Remove unused ports
- Refactored workflow to use mktemp for temporary directory
- Simplified compression step
- Updated Docker image loading process
  • Loading branch information
jayasanka-sack committed Oct 26, 2023
1 parent 9009ce0 commit 7c1cc6b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/e2e-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,19 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Create Temporary Directory to Download Docker Images
id: tempdir
run: echo "tmpdir=$(mktemp -d)" >> "$GITHUB_OUTPUT"

- name: Download Docker Images
uses: actions/download-artifact@v3
with:
name: e2e_release_env_images
path: /tmp
path: ${{ steps.tempdir.outputs.tmpdir }}

- name: Load Docker Images
run: |
tar xzvf /tmp/e2e_release_env_images.tar.gz
gzip -d ${{ steps.tempdir.outputs.tmpdir }}/e2e_release_env_images.tar.gz
docker load --input e2e_release_env_images.tar
docker image ls -a
Expand Down Expand Up @@ -108,11 +112,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Create Temporary Directory to Download Docker Images
id: tempdir
run: echo "tmpdir=$(mktemp -d)" >> "$GITHUB_OUTPUT"

- name: Download Docker Images
uses: actions/download-artifact@v3
with:
name: e2e_release_env_images
path: /tmp
path: ${{ steps.tempdir.outputs.tmpdir }}

- name: Load Docker Images
run: |
Expand Down Expand Up @@ -169,7 +177,7 @@ jobs:
uses: actions/download-artifact@v3
with:
name: e2e_release_env_images
path: /tmp
path: ${{ steps.tempdir.outputs.tmpdir }}

- name: Load Docker Images
run: |
Expand Down Expand Up @@ -226,7 +234,7 @@ jobs:
uses: actions/download-artifact@v3
with:
name: e2e_release_env_images
path: /tmp
path: ${{ steps.tempdir.outputs.tmpdir }}

- name: Load Docker Images
run: |
Expand Down Expand Up @@ -283,7 +291,7 @@ jobs:
uses: actions/download-artifact@v3
with:
name: e2e_release_env_images
path: /tmp
path: ${{ steps.tempdir.outputs.tmpdir }}

- name: Load Docker Images
run: |
Expand Down
2 changes: 1 addition & 1 deletion e2e_test_support_files/commit_and_export_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ docker commit $db_container_id db
docker save frontend gateway backend db > e2e_release_env_images.tar

# compress the file (to decrease the upload file size)
tar czvf e2e_release_env_images.tar.gz e2e_release_env_images.tar
gzip -c e2e_release_env_images.tar > e2e_release_env_images.tar.gz
2 changes: 0 additions & 2 deletions e2e_test_support_files/docker-compose-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ services:
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080/openmrs" ]
timeout: 5s
ports:
- 8080:8080

# MariaDB
db:
Expand Down
2 changes: 1 addition & 1 deletion e2e_test_support_files/extract_tag_numbers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ get_repository_tag() {
local repo_name="$2"
local app="$3"
local value
value=$(grep "\"$app\":" "$file" | awk -F'"' '{print $4}')
value=$(awk -F'"' "/${app/\//\/}/ {print \$4}" "$file")
echo "$repo_name=$value"
}

Expand Down

0 comments on commit 7c1cc6b

Please sign in to comment.