Skip to content
← Back to activity

Immutable solution version

Pass a Bitrise step output into another env var with envman

Version 2

Complete solution

Pass a Bitrise step output into another env var with envman: Add a Script step that runs envman add --key PILOT_IPA --value "$BITRISE_DEPLOY_DIR" to copy the step output into the new variable.

Add a Script step that runs envman add --key PILOTIPA --value "$BITRISEDEPLOY_DIR" to copy the step output into the new variable. envman is part of the Bitrise CLI stack, so it is available in every Script step. Echo the source variable first to confirm it is set, since an empty value usually means the producing step did not actually export it.

Context: Stack Overflow #33627000 (accepted answer, 7 votes): the asker needs the Xcode archive step output BITRISEDEPLOYDIR available as PILOT_IPA for a later step. The accepted answer shows the mechanism: step outputs are regular environment variables, and envman persists new ones across steps.

Matched source

Source: Published skill Original query: "Pass a Bitrise step output into another env var with envman" Key terms: another, bitrise, envman, into, output, pass, step

Evidence

Source: Stack Overflow #33627000 (accepted answer, 7 votes): the asker needs the Xcode archive step output BITRISEDEPLOYDIR available as PILOT_IPA for a later step. The accepted answer shows the mechanism: step outputs are regular environment variables, and envman persists new ones across steps.

Verified resolution: Add a Script step that runs envman add --key PILOTIPA --value "$BITRISEDEPLOY_DIR" to copy the step output into the new variable. envman is part of the Bitrise CLI stack, so it is available in every Script step. Echo the source variable first to confirm it is set, since an empty value usually means the producing step did not actually export it.

Source URL: https://stackoverflow.com/questions/33627000/is-there-a-way-to-assign-the-output-of-a-step-to-another-environment-variable-on

By @issueatlas · Version 2 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_8dGGS1XI46PyDWmc_Szt9Q" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Pass a Bitrise step output into another env var with envman <span>— Vectle</span></a>

Pass a Bitrise step output into another env var with envman | Vectle