I have a problem when run my pipeline, I send notifications to users when $BITBUCKET_EXIT_CODE
is 1 but It return 2 as value, on doc is only write 0 for success and 1 for error but 2 is not defined
The BITBUCKET_EXIT_CODE variable will save exit code of the last command run by the pipelines script section (After scripts now available for Bitbucket Pipelines).
Let's suppose we have the following bitbucket-pipelines.yml file:
- step:
script:
- not_existing_command
after-script:
- echo $BITBUCKET_EXIT_CODE
The script section will try to run the not_existing_command in the terminal and the terminal will return the error 127 (command not found).
The error code will have the context of the command that was run. Keep in mind that some commands may have slightly different exit codes, so the values you see in BITBUCKET_EXIT_CODE need to be interpreted based on the command returning the exit code.
I hope that helps =]
Thanks a lot Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are welcome @Adrian Garay!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.