Skip to content

Conversation

lpusok
Copy link
Contributor

@lpusok lpusok commented May 12, 2025

Checklist

Version

Requires a PATCH version update

Context

BITRISE_BUILD_STATUS env was not set to failing inside a Step bundle.

workflows:
  debug:
    steps:
    - bundle::failing_step_bundle: { }

step_bundles:
  failing_step_bundle:
    title: Failing step
    steps:
    - script@1:
        title: Failing step
        inputs:
        - content: |-
            #!/usr/bin/env bash
            set -ex
            exit 1
    - script@1:
        title: Build status NOT failing
        is_always_run: true
        inputs:
        - content: |-
            #!/usr/bin/env bash
            set -ex
            # Ouptuts "0", incorrectly
            echo "$BITRISE_BUILD_STATUS"

Changes

Investigation details

Decisions

cli/run_util.go Outdated

// ------------------------------------------
// Main - Preparing & running the steps
for idx, stepPlan := range plan.Steps {
log.Printf("Step %d: %s)", idx, stepPlan.StepID)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this log in long term?

@lpusok lpusok force-pushed the SSW-2304-build-status branch from 4a91ca3 to 9519106 Compare May 14, 2025 08:31
@lpusok lpusok changed the title Try to fix Build status for step bundles Fixing Build status for step bundles May 14, 2025
@lpusok lpusok requested a review from godrei May 14, 2025 09:19
@@ -166,10 +166,16 @@ func (r WorkflowRunner) activateAndRunSteps(
failedStepRunResult := currentBuildRunResult.FailedSteps[0]
failedStepEnvs := bitrise.FailedStepEnvs(failedStepRunResult)
*environments = append(*environments, failedStepEnvs...)
if currentStepBundleUUID != "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also add a test case for verifying the failed step env vars within a step bundle?

ofalvai
ofalvai previously approved these changes May 27, 2025
bitrise.yml Outdated
@@ -182,6 +182,20 @@ workflows:
set -ex
exit 0

debug:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we clean this up before merge?

bitrise.yml Outdated
@@ -358,7 +372,7 @@ step_bundles:
- content: |-
#!/usr/bin/env bash
set -ex
go install github.com/jstemmer/go-junit-report/v2@latest
#go install github.com/jstemmer/go-junit-report/v2@latest
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

@lpusok lpusok closed this Jun 17, 2025
@lpusok lpusok reopened this Jun 17, 2025
@lpusok lpusok closed this Jun 17, 2025
@lpusok lpusok reopened this Jun 17, 2025
@lpusok lpusok merged commit 3ecb599 into master Jun 17, 2025
8 checks passed
@lpusok lpusok deleted the SSW-2304-build-status branch June 17, 2025 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants