DroidsOnRoids / bitrise_step_build_info_jira_comment

MIT License
3 stars 7 forks source link

failing JIRA step #7

Closed lrodriguez2022 closed 1 year ago

lrodriguez2022 commented 1 year ago

fatal: ..: '..' is outside repository at '/bitrise/src'

koral-- commented 1 year ago

It seems that the git invocation evaluated to an empty string: https://github.com/DroidsOnRoids/bitrise_step_build_info_jira_comment/blob/master/step.sh#L12 For example you have no commits in the repository.

With this amount of information you provided it is impossible to do anything.

lrodriguez2022 commented 1 year ago

Thank you for your reply. No commits present seems to be the case. What would be the easiest way to run only if there are commits present? (this way, the whole step won't fail, but will get omitted)

koral-- commented 1 year ago

You can use run_if property for that. For example if there is no BITRISE_GIT_COMMIT env var set in those cases: {{getenv "BITRISE_GIT_COMMIT" | ne ""}} image

More info in bitrise docs: https://devcenter.bitrise.io/en/steps-and-workflows/introduction-to-steps/enabling-or-disabling-a-step-conditionally.html