-
Notifications
You must be signed in to change notification settings - Fork 316
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7221 from habitat-sh/dmcneil/fix-e2e-local-scripts
Fix e2e_local scripts
- Loading branch information
Showing
3 changed files
with
45 additions
and
28 deletions.
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
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,39 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
if [[ ${#} == 0 ]]; then | ||
cat <<EOF | ||
You must supply arguments! For example: | ||
${0} test/end-to-end/my_test.sh | ||
EOF | ||
exit 1 | ||
fi | ||
|
||
# These are the commands that will be sequentially run in the | ||
# container. The final one will be the test itself, which is supplied | ||
# as the arguments of the script. | ||
# | ||
# Not every test requires `expect`, but it's not hurting anything to | ||
# install it for everything. | ||
# | ||
# Note that the `ci-studio-common.sh` file is baked into the image we | ||
# use. | ||
commands=(". /opt/ci-studio-common/buildkite-agent-hooks/ci-studio-common.sh" | ||
".expeditor/scripts/end_to_end/setup_environment.sh dev" | ||
"hab pkg install --binlink --channel=stable core/expect" | ||
"${*}") | ||
|
||
# Add a `;` after every command, for feeding into the container. This | ||
# allows them to run in sequence. | ||
docker run \ | ||
--rm \ | ||
--interactive \ | ||
--tty \ | ||
--privileged \ | ||
--env-file="$(pwd)/e2e_env" \ | ||
--volume="$(pwd):/workdir" \ | ||
--workdir=/workdir \ | ||
chefes/buildkite /bin/bash -e -c "${commands[*]/%/;}" |