diff --git a/.github/scripts/configure-workflow.sh b/.github/scripts/configure-workflow.sh index a45aae3..29dd0e6 100644 --- a/.github/scripts/configure-workflow.sh +++ b/.github/scripts/configure-workflow.sh @@ -106,6 +106,18 @@ function get-run-tests-args() { echo "$payload" } +function get-input-reason() { + # Determine the REASON + if [ -n "$INPUT_REASON" ]; then + REASON="$INPUT_REASON" + elif [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then + REASON="Triggered from PR" + else + REASON="No reason provided" + fi + echo "$REASON" +} + function configure-workflow() { local event_name="$GITHUB_EVENT_NAME" local actor="$GITHUB_ACTOR" @@ -122,4 +134,5 @@ function configure-workflow() { set-output idp-host "${INPUT_TARGET_IDP_HOST}" set-output run-tests-args "$(get-run-tests-args $artifact_object_path)" set-output slack-channel "${INPUT_SLACK_CHANNEL:-#iam-bots}" + set-output input-reason "$(get-input-reason)" } diff --git a/.github/workflows/automated-idp-web-tests.yml b/.github/workflows/automated-idp-web-tests.yml index a7ad151..1cd7198 100644 --- a/.github/workflows/automated-idp-web-tests.yml +++ b/.github/workflows/automated-idp-web-tests.yml @@ -100,6 +100,7 @@ jobs: - name: Notify Teams of Test Run Start env: IDP_ENV: ${{ steps.configure.outputs.idp-env }} + INPUT_REASON: ${{ steps.configure.outputs.input-reason }} run: | curl -H "Content-Type: application/json" \ -d '{ @@ -126,7 +127,8 @@ jobs: { "type": "FactSet", "facts": [ - {"title": "IdP Web Tests running on ", "value": "'${{ env.IDP_ENV }}'"} + {"title": "IdP Web Tests running on ", "value": "'${{ env.IDP_ENV }}'"}, + {"title": "Reason for Test Run", "value": "${{ env.INPUT_REASON }}"} ] } ] diff --git a/docker-compose.yml b/docker-compose.yml index 634c9c5..87423ec 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -33,7 +33,9 @@ services: volumes: - ${CREDENTIAL_MOUNT_POINT}:/secrets:ro - ${REPORT_MOUNT_POINT}:/tmp/webdriver-report - command: pytest ${PYTEST_ARGS} --selenium-server selenium:4444 + # command: pytest ${PYTEST_ARGS} tests/access_control/test_auto_2fa.py --selenium-server selenium:4444 + # command: pytest ${PYTEST_ARGS} --selenium-server selenium:4444 + command: echo "The test would start here" selenium: image: selenium/standalone-chrome:4