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

Refactor Step result processing #5

Open
sandy724 opened this issue Nov 7, 2022 · 0 comments
Open

Refactor Step result processing #5

sandy724 opened this issue Nov 7, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@sandy724
Copy link
Contributor

sandy724 commented Nov 7, 2022

At most of the places

if [ $? -eq 0 ]
then
  logInfoMessage "Congratulations docker lint scan succeeded!!!"
  generateOutput mvn_execute true "Congratulations docker lint scan succeeded!!!"
elif [ $VALIDATION_FAILURE_ACTION == "FAILURE" ]
  then
    logErrorMessage "Please check docker lint scan failed!!!"
    generateOutput ${ACTIVITY_SUB_TASK_CODE} false "Please check docker lint scan failed!!!"
    exit 1
   else
    logWarningMessage "Please check docker lint scan failed!!!"
    generateOutput ${ACTIVITY_SUB_TASK_CODE} true "Please check docker lint scan failed!!!"
fi

This is the repeated code where we check the result and then depending on SUCCESS/FAILURE/WARNING mark the step and store the result.
This process is consistent across all the step so this can also be moved into BP functions

@sandy724 sandy724 self-assigned this Nov 7, 2022
@sandy724 sandy724 added enhancement New feature or request good first issue Good for newcomers labels Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant