From 7994fda368cd2ee66041ae75d534b890b5f7f0ab Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Wed, 10 Apr 2024 15:54:31 -0400 Subject: [PATCH 1/3] Update open-pr.yml --- .github/workflows/open-pr.yml | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/workflows/open-pr.yml b/.github/workflows/open-pr.yml index c1bb46c..3c56c7a 100644 --- a/.github/workflows/open-pr.yml +++ b/.github/workflows/open-pr.yml @@ -13,6 +13,7 @@ env: SCORE_COMPOSE_VERSION: 'latest' SCORE_HELM_VERSION: 'latest' WORKLOAD_NAME: my-sample-app + CONTAINER_NAME: my-sample-app HUMCTL_VERSION: '0.19.1' jobs: build-run-test-push: @@ -36,17 +37,15 @@ jobs: file: score-compose token: ${{ secrets.GITHUB_TOKEN }} version: ${{ env.SCORE_COMPOSE_VERSION }} - - name: generate docker compose files + - name: score-compose generate run: | - docker build -t ${{ env.IMAGE_NAME }}:${{ env.ENVIRONMENT_ID }} app/ - score-compose run \ - --build app/ \ - -f score/score.yaml \ - -o compose.yaml + score-compose init + score-compose generate score.yaml \ + --build=${{ env.CONTAINER_NAME }}=app/ + cat < compose.override.yaml services: - ${{ env.WORKLOAD_NAME }}: - image: ${{ env.IMAGE_NAME }}:${{ env.ENVIRONMENT_ID }} + ${{ env.WORKLOAD_NAME }}-${{ env.CONTAINER_NAME }}: read_only: true cap_drop: - ALL @@ -54,12 +53,7 @@ jobs: EOF - name: build & run container run: | - docker compose \ - up \ - --build \ - -d \ - --wait \ - --wait-timeout 30 + docker compose up --build -d --wait --wait-timeout 30 - name: test container run: | sleep 10 From a6b23bb787aa728b0a4827d88775f97097be6e7b Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Wed, 10 Apr 2024 15:57:16 -0400 Subject: [PATCH 2/3] Update open-pr.yml --- .github/workflows/open-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/open-pr.yml b/.github/workflows/open-pr.yml index 3c56c7a..d698770 100644 --- a/.github/workflows/open-pr.yml +++ b/.github/workflows/open-pr.yml @@ -41,7 +41,7 @@ jobs: run: | score-compose init score-compose generate score.yaml \ - --build=${{ env.CONTAINER_NAME }}=app/ + --build=${{ env.CONTAINER_NAME }}=app/ cat < compose.override.yaml services: From aee4b4df8537acab24a0e4b707f88637a9c4bf54 Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Fri, 12 Apr 2024 04:08:27 +0000 Subject: [PATCH 3/3] Fix open-pr --- .github/workflows/open-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/open-pr.yml b/.github/workflows/open-pr.yml index d698770..1006e33 100644 --- a/.github/workflows/open-pr.yml +++ b/.github/workflows/open-pr.yml @@ -40,7 +40,7 @@ jobs: - name: score-compose generate run: | score-compose init - score-compose generate score.yaml \ + score-compose generate score/score.yaml \ --build=${{ env.CONTAINER_NAME }}=app/ cat < compose.override.yaml