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

fix: refix sd-local display bug #467

Merged
merged 3 commits into from
Nov 20, 2023

Conversation

yakanechi
Copy link
Contributor

@yakanechi yakanechi commented Nov 16, 2023

Context

#465 was insufficient so the sd-local user step still included the output of the sd-setup-launcher step.

The reason is that the output of the sd-setup-laucher command changes depending on the job image.
In some images, the output of echo ; was not empty and contained a prompt characters such as $ and #, which could cause the loop to be stuck.

Objective

The goal is that the sd-local user step does not include the output of the sd-setup-launcher step.

As a result of the fixes, it now works as follows.

Before

sd-setup-launcher: set -e && export PATH=${PATH}:/opt/sd:/usr/sd/bin:/usr/sd-static/bin && finish() { EXITCODE=$?; tmpfile=/tmp/env_tmp; exportfile=/tmp/env_export; export -p | grep -vi "PS1=" > $tmpfile && mv -f $tmpfile $exportfile; echo $SD_STEP_ID $EXITCODE; } && trap finish ABRT EXIT;
sd-setup-launcher: 
echo: $ echo "Hello world"
echo: <port; export -p | grep -vi "PS1=" > $tmpfile && mv -f $tmpfile $exportfile; echo $SD_STEP_ID $EXITCODE; } && trap finish ABRT EXIT;
echo: 
echo: Hello world
echo: 

After

sd-setup-launcher: set -e && export PATH=${PATH}:/opt/sd:/usr/sd/bin:/usr/sd-static/bin && finish() { EXITCODE=$?; tmpfile=/tmp/env_tmp; exportfile=/tmp/env_export; export -p | grep -vi "PS1=" > $tmpfile && mv -f $tmpfile $exportfile; echo $SD_STEP_ID $EXITCODE; } && trap finish ABRT EXIT;
sd-setup-launcher: echo ;
sd-setup-launcher: <port; export -p | grep -vi "PS1=" > $tmpfile && mv -f $tmpfile $exportfile; echo $SD_STEP_ID $EXITCODE; } && trap finish ABRT EXIT;
sd-setup-launcher: echo ;
sd-setup-launcher: 
echo: $ echo "Hello world"
echo: Hello world
echo: 

References

License

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@yakanechi yakanechi marked this pull request as ready for review November 20, 2023 09:43
@tkyi tkyi merged commit 947fa5f into screwdriver-cd:master Nov 20, 2023
1 check passed
@yakanechi yakanechi deleted the fix-sd-local-output branch November 21, 2023 00:23
@adong adong mentioned this pull request Mar 4, 2024
8 tasks
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