-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci-base-image: entrypoint hackery to make sure PATH gets set
- Loading branch information
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# According to | ||
# https://docs.gitlab.com/runner/shells/#shell-profile-loading | ||
# Gitlab runner's docker executor does not load shell startup files, | ||
# because that's a great idea. | ||
cmd=() | ||
for i in "$@"; do | ||
cmd+=("$(echo "$i"| sed "/exec/s/bash/bash --login/g")") | ||
done | ||
echo "Using rewritten shell invocation received from executor." | ||
echo "${cmd[@]}" | ||
"${cmd[@]}" | ||
retcode="$?" | ||
echo "return code from command: $retcode" | ||
exit "$retcode" | ||
|