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: add /usr/sd-static/bin to PATH #464

Merged
merged 1 commit into from
Oct 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func doRunCommand(guid, path string, emitter screwdriver.Emitter, f *os.File, fR
// Executes teardown commands
func doRunTeardownCommand(cmd screwdriver.CommandDef, emitter screwdriver.Emitter, shellBin, exportFile, sourceDir string, stepExitCode int) (int, error) {
shargs := []string{"-e", "-c"}
cmdStr := "export PATH=${PATH}:/opt/sd:/usr/sd/bin SD_STEP_EXIT_CODE=" + strconv.Itoa(stepExitCode) + " && " +
cmdStr := "export PATH=${PATH}:/opt/sd:/usr/sd/bin:/usr/sd-static/bin SD_STEP_EXIT_CODE=" + strconv.Itoa(stepExitCode) + " && " +
Copy link
Member

Choose a reason for hiding this comment

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

why not reuse existing /usr/sd/bin ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

like what the name implies, need to separate static and dynamic binaries

"START=$(date +'%s'); while ! [ -f " + exportFile + " ] && [ $(($(date +'%s')-$START)) -lt " + strconv.Itoa(WaitTimeout) + " ]; do sleep 1; done; " +
"if [ -f " + exportFile + " ]; then set +e; . " + exportFile + "; set -e; fi; " +
cmd.Cmd
Expand Down Expand Up @@ -281,7 +281,7 @@ func Run(path string, env []string, emitter screwdriver.Emitter, build screwdriv
// Run setup commands
setupCommands := []string{
"set -e",
"export PATH=${PATH}:/opt/sd:/usr/sd/bin",
"export PATH=${PATH}:/opt/sd:/usr/sd/bin:/usr/sd-static/bin",
// trap ABRT(6) and EXIT, echo the last step ID and write ENV to /tmp/buildEnv
"finish() { " +
"EXITCODE=$?; " +
Expand Down