-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into GT-1397-Resultaat-value-is-not-returned-in…
…-ZakLa01-message-(the-return-message-to-geefZaakDetails-Request)
- Loading branch information
Showing
772 changed files
with
17,795 additions
and
15,021 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
name: Run Larva Scenarios | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
image-id: | ||
type: string | ||
description: > | ||
Docker image id of the loaded image to use. | ||
Note that the Docker image needs to be available to the Docker runtime already. | ||
required: false | ||
docker-image-tag: | ||
type: string | ||
description: > | ||
Docker image tag of the loaded image to use. For example: 'wearefrank/zaakbrug:1.2.0'. | ||
Note that the Docker image needs to be available to the Docker runtime already. | ||
required: false | ||
|
||
jobs: | ||
run-larva-scenarios: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #4.1.7 | ||
|
||
- name: Download Docker tar | ||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 #4.1.8 | ||
with: | ||
name: build-docker-image | ||
|
||
- name: Load Docker tar | ||
shell: bash | ||
run: | | ||
docker load --input image.tar | ||
docker image ls -a | ||
- name: Start Application | ||
id: docker-run | ||
shell: bash | ||
run: | | ||
echo "container-id=$(docker run -d -p 8080:8080 -e dtap.stage=LOC ${{ inputs.image-id || inputs.docker-image-tag }})" >> "$GITHUB_OUTPUT" | ||
timeout-minutes: 2 | ||
|
||
- name: Wait for Application to be Healthy | ||
shell: bash | ||
run: | | ||
start_time=$(date +%s) | ||
timeout=300 | ||
while true; do | ||
if [ "$(docker inspect --format='{{json .State.Health.Status}}' ${{steps.docker-run.outputs.container-id}})" = '"healthy"' ]; then | ||
echo "Application is healthy." | ||
break | ||
fi | ||
current_time=$(date +%s) | ||
elapsed_time=$((current_time - start_time)) | ||
if [ $elapsed_time -ge $timeout ]; then | ||
echo "Application did not become healthy within $timeout seconds. Failing the job." | ||
exit 1 | ||
fi | ||
echo "Waiting for application to be healthy..." | ||
sleep 5 | ||
done | ||
timeout-minutes: 6 | ||
|
||
- name: Trigger Larva Tool | ||
shell: bash | ||
run: | | ||
curl -X POST 'http://localhost:8080/iaf/larva/index.jsp' \ | ||
--header 'Content-Type: application/x-www-form-urlencoded' \ | ||
--data-urlencode 'scenariosrootdirectory=/opt/frank/testtool' \ | ||
--data-urlencode 'waitbeforecleanup=100' \ | ||
--data-urlencode 'loglevel=WRONG_PIPELINE_MESSAGES_PREPARED_FOR_DIFF' \ | ||
--data-urlencode 'execute=/opt/frank/testtool' \ | ||
--data-urlencode 'submit=start' > results.html | ||
- name: Check if all scenarios passed | ||
shell: bash | ||
run: | | ||
if ! grep -q 'All scenarios passed' results.html; then | ||
echo "Not all scenarios passed. Failing the job." | ||
exit 1 | ||
fi | ||
- name: Generate Result in Markdown | ||
uses: docker://pandoc/core:3.5 | ||
if: ${{ always() }} | ||
with: | ||
args: -s results.html --from html -o results.md --to gfm --standalone | ||
|
||
- name: Add Larva Result To GitHub Actions Summary | ||
shell: bash | ||
if: ${{ always() }} | ||
run: | | ||
cat results.md >> $GITHUB_STEP_SUMMARY | ||
- name: Cleanup | ||
shell: bash | ||
if: ${{ always() }} | ||
run: | | ||
docker stop ${{ steps.docker-run.outputs.container-id }} | ||
docker rm --volumes ${{ steps.docker-run.outputs.container-id }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Dispatch an action and get the run ID | ||
uses: Codex-/[email protected].2 | ||
uses: Codex-/[email protected].3 | ||
id: return_dispatch | ||
with: | ||
token: ${{ secrets.token }} | ||
|
Oops, something went wrong.