From 02dfc855cd68b5ed620cdcaa815b56c1f1068d1e Mon Sep 17 00:00:00 2001 From: eric-intuitem <71850047+eric-intuitem@users.noreply.github.com> Date: Sun, 5 May 2024 20:27:15 +0200 Subject: [PATCH 1/9] Update startup-tests.yml avoid using a secret for postres password: - this has no security benefit, as the service is running on localhost for the test runner - this makes external PRs fail, because they are not allowed to get the secret. To be reviewed before merge. --- .github/workflows/startup-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/startup-tests.yml b/.github/workflows/startup-tests.yml index c68b4a0ac..5775140ad 100644 --- a/.github/workflows/startup-tests.yml +++ b/.github/workflows/startup-tests.yml @@ -18,7 +18,7 @@ jobs: image: postgres:14.1 env: POSTGRES_USER: postgres - POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} + POSTGRES_PASSWORD: postgres POSTGRES_DB: postgres ports: ["5432:5432"] options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 From a3a63c20e82903e11b074e3fa948aac088346f85 Mon Sep 17 00:00:00 2001 From: eric-intuitem <71850047+eric-intuitem@users.noreply.github.com> Date: Sun, 5 May 2024 20:30:19 +0200 Subject: [PATCH 2/9] Update startup-tests.yml try random value --- .github/workflows/startup-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/startup-tests.yml b/.github/workflows/startup-tests.yml index 5775140ad..7e9d468bc 100644 --- a/.github/workflows/startup-tests.yml +++ b/.github/workflows/startup-tests.yml @@ -18,7 +18,7 @@ jobs: image: postgres:14.1 env: POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres + POSTGRES_PASSWORD: $(uuidgen) POSTGRES_DB: postgres ports: ["5432:5432"] options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 From b1e3b34370e48df7624d0d74dd540378734ec9cc Mon Sep 17 00:00:00 2001 From: eric-intuitem <71850047+eric-intuitem@users.noreply.github.com> Date: Sun, 5 May 2024 20:38:17 +0200 Subject: [PATCH 3/9] Update startup-tests.yml yet another test --- .github/workflows/startup-tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/startup-tests.yml b/.github/workflows/startup-tests.yml index 7e9d468bc..d0513e801 100644 --- a/.github/workflows/startup-tests.yml +++ b/.github/workflows/startup-tests.yml @@ -65,10 +65,11 @@ jobs: echo DJANGO_SUPERUSER_PASSWORD=1234 >> .env echo POSTGRES_NAME=postgres >> .env echo POSTGRES_USER=postgres >> .env - echo POSTGRES_PASSWORD=${{ secrets.POSTGRES_PASSWORD }} >> .env + echo POSTGRES_PASSWORD=$POSTGRES_PASSWORD >> .env echo DB_HOST=localhost >> .env echo CISO_ASSISTANT_SUPERUSER_EMAIL='' >> .env echo CISO_ASSISTANT_URL=http://localhost:4173 >> .env + echo "THIS IS A TEST, DO NOT KEEP IT. $POSTGRES_PASSWORD" - name: Run migrations working-directory: ${{ env.backend-directory }} run: | From 6869883f61e8ccfe23d7d473aa38706d63bc84d4 Mon Sep 17 00:00:00 2001 From: eric-intuitem <71850047+eric-intuitem@users.noreply.github.com> Date: Sun, 5 May 2024 21:08:32 +0200 Subject: [PATCH 4/9] Update startup-tests.yml --- .github/workflows/startup-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/startup-tests.yml b/.github/workflows/startup-tests.yml index d0513e801..03728bbbc 100644 --- a/.github/workflows/startup-tests.yml +++ b/.github/workflows/startup-tests.yml @@ -18,7 +18,7 @@ jobs: image: postgres:14.1 env: POSTGRES_USER: postgres - POSTGRES_PASSWORD: $(uuidgen) + POSTGRES_PASSWORD: postgres POSTGRES_DB: postgres ports: ["5432:5432"] options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 From 69e4704e1211268f05ef752088e826fcf44bd148 Mon Sep 17 00:00:00 2001 From: eric-intuitem <71850047+eric-intuitem@users.noreply.github.com> Date: Sun, 5 May 2024 21:15:25 +0200 Subject: [PATCH 5/9] Update startup-tests.yml --- .github/workflows/startup-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/startup-tests.yml b/.github/workflows/startup-tests.yml index 03728bbbc..7f43ce7b0 100644 --- a/.github/workflows/startup-tests.yml +++ b/.github/workflows/startup-tests.yml @@ -65,11 +65,11 @@ jobs: echo DJANGO_SUPERUSER_PASSWORD=1234 >> .env echo POSTGRES_NAME=postgres >> .env echo POSTGRES_USER=postgres >> .env - echo POSTGRES_PASSWORD=$POSTGRES_PASSWORD >> .env + echo POSTGRES_PASSWORD=${{ env.POSTGRES_PASSWORD }} >> .env echo DB_HOST=localhost >> .env echo CISO_ASSISTANT_SUPERUSER_EMAIL='' >> .env echo CISO_ASSISTANT_URL=http://localhost:4173 >> .env - echo "THIS IS A TEST, DO NOT KEEP IT. $POSTGRES_PASSWORD" + echo "THIS IS A TEST, DO NOT KEEP IT;" ${{ env.POSTGRES_PASSWORD }} - name: Run migrations working-directory: ${{ env.backend-directory }} run: | From 9a901d7cd5558348acfec2f4c57dca517ae86ea6 Mon Sep 17 00:00:00 2001 From: eric-intuitem <71850047+eric-intuitem@users.noreply.github.com> Date: Sun, 5 May 2024 21:22:00 +0200 Subject: [PATCH 6/9] Update startup-tests.yml --- .github/workflows/startup-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/startup-tests.yml b/.github/workflows/startup-tests.yml index 7f43ce7b0..59051ac41 100644 --- a/.github/workflows/startup-tests.yml +++ b/.github/workflows/startup-tests.yml @@ -8,6 +8,7 @@ env: GITHUB_WORKFLOW: github_actions backend-directory: ./backend working-directory: ./frontend + POSTGRES_PASSWORD: postgres jobs: startup-functional-test: @@ -18,7 +19,6 @@ jobs: image: postgres:14.1 env: POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres POSTGRES_DB: postgres ports: ["5432:5432"] options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 From 432e8fddf8281217657c034a6b7c03fe717e62f8 Mon Sep 17 00:00:00 2001 From: eric-intuitem <71850047+eric-intuitem@users.noreply.github.com> Date: Sun, 5 May 2024 21:25:06 +0200 Subject: [PATCH 7/9] Update startup-tests.yml --- .github/workflows/startup-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/startup-tests.yml b/.github/workflows/startup-tests.yml index 59051ac41..47bf374b5 100644 --- a/.github/workflows/startup-tests.yml +++ b/.github/workflows/startup-tests.yml @@ -19,6 +19,7 @@ jobs: image: postgres:14.1 env: POSTGRES_USER: postgres + POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }} POSTGRES_DB: postgres ports: ["5432:5432"] options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 From cb9b2838c740a8b83e46e9db5e47029db662246f Mon Sep 17 00:00:00 2001 From: eric-intuitem <71850047+eric-intuitem@users.noreply.github.com> Date: Sun, 5 May 2024 22:41:38 +0200 Subject: [PATCH 8/9] Update startup-tests.yml --- .github/workflows/startup-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/startup-tests.yml b/.github/workflows/startup-tests.yml index 47bf374b5..d99220642 100644 --- a/.github/workflows/startup-tests.yml +++ b/.github/workflows/startup-tests.yml @@ -8,7 +8,7 @@ env: GITHUB_WORKFLOW: github_actions backend-directory: ./backend working-directory: ./frontend - POSTGRES_PASSWORD: postgres + POSTGRES_PASSWORD: $(uuidgen) jobs: startup-functional-test: From c4b2de556e45fbbf3f1ebc8dcb90ba9736b55edc Mon Sep 17 00:00:00 2001 From: eric-intuitem <71850047+eric-intuitem@users.noreply.github.com> Date: Sun, 5 May 2024 22:47:11 +0200 Subject: [PATCH 9/9] Update startup-tests.yml --- .github/workflows/startup-tests.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/startup-tests.yml b/.github/workflows/startup-tests.yml index d99220642..6d5b84a57 100644 --- a/.github/workflows/startup-tests.yml +++ b/.github/workflows/startup-tests.yml @@ -8,8 +8,7 @@ env: GITHUB_WORKFLOW: github_actions backend-directory: ./backend working-directory: ./frontend - POSTGRES_PASSWORD: $(uuidgen) - + jobs: startup-functional-test: runs-on: ubuntu-20.04 @@ -19,7 +18,7 @@ jobs: image: postgres:14.1 env: POSTGRES_USER: postgres - POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }} + POSTGRES_PASSWORD: postgres POSTGRES_DB: postgres ports: ["5432:5432"] options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 @@ -66,11 +65,10 @@ jobs: echo DJANGO_SUPERUSER_PASSWORD=1234 >> .env echo POSTGRES_NAME=postgres >> .env echo POSTGRES_USER=postgres >> .env - echo POSTGRES_PASSWORD=${{ env.POSTGRES_PASSWORD }} >> .env + echo POSTGRES_PASSWORD=postgres >> .env echo DB_HOST=localhost >> .env echo CISO_ASSISTANT_SUPERUSER_EMAIL='' >> .env echo CISO_ASSISTANT_URL=http://localhost:4173 >> .env - echo "THIS IS A TEST, DO NOT KEEP IT;" ${{ env.POSTGRES_PASSWORD }} - name: Run migrations working-directory: ${{ env.backend-directory }} run: |