Skip to content

chore(ci): wrap bash scripts in curly brackets #554

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

Merged
merged 1 commit into from
Jan 15, 2021
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
15 changes: 15 additions & 0 deletions .evergreen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ variables:
shell: bash
script: |
set -e
{ # curly brackets to work around EVG-13667
cd $(pwd)
export NODE_JS_VERSION=${node_js_version}
source .evergreen/.setup_env
Expand Down Expand Up @@ -39,6 +40,7 @@ variables:
echo "$MONGOSH_TEST_EXECUTABLE_PATH"
npm run test-e2e-ci
tar cvzf dist.tgz dist
}

- &package_and_upload_artifact
command: shell.exec
Expand All @@ -47,6 +49,7 @@ variables:
shell: bash
script: |
set -e
{
cat <<RELEASE_MONGOSH > ~/release_mongosh.sh
set -e
cd $(pwd)
Expand Down Expand Up @@ -79,6 +82,7 @@ variables:
else
bash ~/release_mongosh.sh
fi
}

- &test_linux_artifact
command: shell.exec
Expand All @@ -87,13 +91,15 @@ variables:
shell: bash
script: |
set -e
{
export NODE_JS_VERSION=${node_js_version}
source .evergreen/.setup_env
node scripts/download-linux-artifact
dist/mongosh --version
export MONGOSH_TEST_EXECUTABLE_PATH="$(pwd)/dist/mongosh"
echo "$MONGOSH_TEST_EXECUTABLE_PATH"
npm run test-e2e-ci
}

# Functions are any command that can be run.
#
Expand Down Expand Up @@ -129,9 +135,12 @@ functions:
working_dir: src
shell: bash
script: |
set -e
{
export NODE_JS_VERSION=${node_js_version}
source .evergreen/.setup_env
npm run check-ci
}
test:
- command: expansions.write
params:
Expand Down Expand Up @@ -166,10 +175,12 @@ functions:
shell: bash
script: |
set -e
{
(cd scripts/docker && docker build -t ubuntu18.04-xvfb -f ubuntu18.04-xvfb.Dockerfile .)
docker run \
--rm -v $PWD:/tmp/build ubuntu18.04-xvfb \
-c 'cd /tmp/build && ./testing/test-vscode.sh'
}
test_connectivity:
- command: expansions.write
params:
Expand All @@ -181,9 +192,11 @@ functions:
shell: bash
script: |
set -e
{
export NODE_JS_VERSION=${node_js_version}
source .evergreen/.setup_env
npm run test-connectivity
}
compile_artifact:
- command: expansions.write
params:
Expand Down Expand Up @@ -229,11 +242,13 @@ functions:
shell: bash
script: |
set -e
{
export NODE_JS_VERSION=${node_js_version}
source .evergreen/.setup_env
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"
echo "//registry.npmjs.org/:_authToken=${DEVTOOLSBOT_NPM_TOKEN}" > .npmrc
npm run evergreen-release publish
}

# Tasks will show up as the individual blocks in the Evergreen UI that can
# pass or fail.
Expand Down