Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CICD-2768: support debug flag #40

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ jobs:
| max_file_size | 3 | Maximum file size to be scanned in MB. Bigger files will be skipped | Integer | No | 5 |
| terraform_vars_path | /terraform-vars-path/terraform-vars.tfvars | Path where terraform variables are present | String | No | N/A |
| display_name | custom-display-name | Scan log display name (on Orca platform) | String | No | N/A |
| debug | true | Debug mode | Boolean | No | false |
| log_path | results/ | The directory path to specify where the logs should be written to on debug mode. | String | No | working directory |

## Annotations
After scanning, the action will add the results as annotations in a pull request:
Expand Down
7 changes: 7 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ inputs:
display_name:
description: "Scan log display name (on Orca platform)"
required: false
debug:
description: "Debug mode"
required: false
default: "false"
log_path:
description: "The directory path to specify where the logs should be written to on debug mode. Default to the current working directory"
required: false

outputs:
exit_code:
Expand Down
6 changes: 6 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ function set_global_flags() {
if [ "${INPUT_DISPLAY_NAME}" ]; then
GLOBAL_FLAGS+=(--display-name "${INPUT_DISPLAY_NAME}")
fi
if [ "${INPUT_DEBUG}" == "true" ]; then
GLOBAL_FLAGS+=(--debug)
fi
if [ "${INPUT_LOG_PATH}" ]; then
GLOBAL_FLAGS+=(--log-path "${INPUT_LOG_PATH}")
fi
}

# Json format must be reported and be stored in a file for github annotations
Expand Down
Loading