diff --git a/ci-operator/step-registry/firewatch/report-issues/firewatch-report-issues-commands.sh b/ci-operator/step-registry/firewatch/report-issues/firewatch-report-issues-commands.sh index 005ed25e1ae46..0597051b1c151 100644 --- a/ci-operator/step-registry/firewatch/report-issues/firewatch-report-issues-commands.sh +++ b/ci-operator/step-registry/firewatch/report-issues/firewatch-report-issues-commands.sh @@ -4,8 +4,13 @@ set -o nounset set -o errexit set -o pipefail -# Create the Jira configuration file -firewatch jira-config-gen --token-path "${FIREWATCH_JIRA_API_TOKEN_PATH}" --server-url "${FIREWATCH_JIRA_SERVER}" +jira_config_cmd="firewatch jira-config-gen --token-path ${FIREWATCH_JIRA_API_TOKEN_PATH} --server-url ${FIREWATCH_JIRA_SERVER}" + +if [ -f "${FIREWATCH_JIRA_EMAIL_PATH}" ]; then + jira_config_cmd+=" --email $(cat "${FIREWATCH_JIRA_EMAIL_PATH}")" +fi + +eval "${jira_config_cmd}" report_command="firewatch report" diff --git a/ci-operator/step-registry/firewatch/report-issues/firewatch-report-issues-ref.yaml b/ci-operator/step-registry/firewatch/report-issues/firewatch-report-issues-ref.yaml index 1c8ee28399fce..f3da045038b39 100644 --- a/ci-operator/step-registry/firewatch/report-issues/firewatch-report-issues-ref.yaml +++ b/ci-operator/step-registry/firewatch/report-issues/firewatch-report-issues-ref.yaml @@ -18,11 +18,14 @@ ref: memory: 100Mi env: - name: FIREWATCH_JIRA_SERVER - default: https://issues.redhat.com + default: https://redhat.atlassian.net documentation: The Jira server issues are to be reported to. - name: FIREWATCH_JIRA_API_TOKEN_PATH default: /tmp/secrets/jira/access_token documentation: The path to the file containing the Jira API token. + - name: FIREWATCH_JIRA_EMAIL_PATH + default: /tmp/secrets/jira/email + documentation: The path to the file containing the email address for Jira Cloud Basic auth. If the file exists, Basic auth (email + API token) is used instead of Bearer token auth. - name: FIREWATCH_FAIL_WITH_TEST_FAILURES default: "false" documentation: If you would like this ref to fail with a non-zero exit code if a test failure is found, set to "true"