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

ARCH-2007 - Update the way outputs are set in pwsh #245

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

danielle-casella-adams
Copy link
Member

There was an issue in 1up-infrastructure when it tried to download a blob because the plan name output it was using was empty.
In the plan job, the plan blob name was being set in pwsh with an echo statement. When I changed that echo statement to the pwsh syntax the plan name output was populated and the apply job was able to download the plan blob.

There wasn't an issue using the echo statements with pwsh to set outputs before but GitHub may have made a change (or maybe our self-hosted runners changed) so that it no longer works.

echo "tf_plan_name=$terraformPlanName" >> $GITHUB_OUTPUT # No longer works
"tf_plan_name=$terraformPlanName" | Out-File -FilePath $env:GITHUB_OUTPUT -Append # This syntax works

@danielle-casella-adams danielle-casella-adams requested a review from a team as a code owner January 23, 2024 17:51
Copy link
Contributor

@hpractv hpractv left a comment

Choose a reason for hiding this comment

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

👍🏽. I'm sad that the syntax has gotten harder to use. But at least you found a reliable workaround.

@danielle-casella-adams danielle-casella-adams merged commit 84731ef into main Feb 2, 2024
@danielle-casella-adams danielle-casella-adams deleted the pwsh-outputs branch February 2, 2024 16:12
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.

2 participants