Skip to content

Commit 9e5aa31

Browse files
committed
Attempt to fix the http-tests workflow using secrets
1 parent 5bbba24 commit 9e5aa31

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/http-tests.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ jobs:
1010
ASF_ARCHIVE: https://archive.apache.org/dist/
1111
JENA_VERSION: 4.7.0
1212
BASE_URI: https://localhost:4443/
13-
OWNER_CERT_PWD: changeit
14-
SECRETARY_CERT_PWD: LinkedDataHub
1513
steps:
1614
- name: Install Linux packages
1715
run: sudo apt-get update && sudo apt-get install -qq raptor2-utils && sudo apt-get install curl
@@ -25,16 +23,20 @@ jobs:
2523
JENA_HOME: "${{runner.temp}}/apache-jena-${{env.JENA_VERSION}}"
2624
- name: Checkout code
2725
uses: actions/checkout@v3
28-
- name: Generate owner's and secretary's certificates/public keys
29-
run: ../scripts/setup.sh .env ssl "${{env.OWNER_CERT_PWD}}" "${{env.SECRETARY_CERT_PWD}}" 3650
3026
shell: bash
3127
working-directory: http-tests
28+
- name: Writing secrets to files
29+
run: |
30+
mkdir -p ./secrets
31+
echo "${{ secrets.HTTP_TEST_OWNER_CERT_PASSWORD }}" > ./secrets/owner_cert_password.txt
32+
echo "${{ secrets.HTTP_TEST_SECRETARY_CERT_PASSWORD }}" > ./secrets/secretary_cert_password.txt
33+
echo "${{ secrets.HTTP_TEST_SECRETARY_CERT_PASSWORD }}" > ./secrets/client_truststore_password.txt
3234
- name: Build Docker image & Run Docker containers
3335
run: docker compose -f docker-compose.yml -f ./http-tests/docker-compose.http-tests.yml --env-file ./http-tests/.env up --build -d
3436
- name: Wait for the server to start...
3537
run: while ! (status=$(curl -k -s -w "%{http_code}\n" https://localhost:4443 -o /dev/null) && echo "$status" && echo "$status" | grep "403") ; do sleep 1 ; done # wait for the webapp to start (returns 403 by default)
3638
- name: Run HTTP test scripts
37-
run: ./run.sh "$PWD/ssl/owner/cert.pem" "${{env.OWNER_CERT_PWD}}" "$PWD/ssl/secretary/cert.pem" "${{env.SECRETARY_CERT_PWD}}"
39+
run: ./run.sh "$PWD/ssl/owner/cert.pem" "${{ secrets.HTTP_TEST_OWNER_CERT_PASSWORD }}" "$PWD/ssl/secretary/cert.pem" "${{ secrets.HTTP_TEST_SECRETARY_CERT_PASSWORD }}"
3840
shell: bash
3941
working-directory: http-tests
4042
- name: Stop Docker containers

0 commit comments

Comments
 (0)