chore: fix randomly crashing build-playwright-driver.sh (#4909)
Some googling showed that CI systems might not be capable of handling too much STDOUT that `tar -v` produces. ([source](https://stackoverflow.com/questions/37540792/jenkins-script-tar-write-error)). This patch: - removes verbose flag from tar to reduce output - sets `+x` to get some logging for the script - silences zip output
This commit is contained in:
parent
9bbabaaa74
commit
6b3dcb01aa
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
set +x
|
set -x
|
||||||
|
|
||||||
trap "cd $(pwd -P)" EXIT
|
trap "cd $(pwd -P)" EXIT
|
||||||
SCRIPT_PATH="$(cd "$(dirname "$0")" ; pwd -P)"
|
SCRIPT_PATH="$(cd "$(dirname "$0")" ; pwd -P)"
|
||||||
|
|
@ -25,18 +25,18 @@ function build {
|
||||||
cd ${SCRIPT_PATH}
|
cd ${SCRIPT_PATH}
|
||||||
|
|
||||||
mkdir -p ./output/playwright-${SUFFIX}
|
mkdir -p ./output/playwright-${SUFFIX}
|
||||||
tar -xzvf ./output/playwright.tgz -C ./output/playwright-${SUFFIX}/
|
tar -xzf ./output/playwright.tgz -C ./output/playwright-${SUFFIX}/
|
||||||
|
|
||||||
curl ${NODE_URL} -o ./output/${NODE_DIR}.${ARCHIVE}
|
curl ${NODE_URL} -o ./output/${NODE_DIR}.${ARCHIVE}
|
||||||
NPM_PATH=""
|
NPM_PATH=""
|
||||||
if [[ "${ARCHIVE}" == "zip" ]]; then
|
if [[ "${ARCHIVE}" == "zip" ]]; then
|
||||||
cd ./output
|
cd ./output
|
||||||
unzip ./${NODE_DIR}.zip
|
unzip -q ./${NODE_DIR}.zip
|
||||||
cd ..
|
cd ..
|
||||||
cp ./output/${NODE_DIR}/node.exe ./output/playwright-${SUFFIX}/
|
cp ./output/${NODE_DIR}/node.exe ./output/playwright-${SUFFIX}/
|
||||||
NPM_PATH="node_modules/npm/bin/npm-cli.js"
|
NPM_PATH="node_modules/npm/bin/npm-cli.js"
|
||||||
elif [[ "${ARCHIVE}" == "tar.gz" ]]; then
|
elif [[ "${ARCHIVE}" == "tar.gz" ]]; then
|
||||||
tar -xzvf ./output/${NODE_DIR}.tar.gz -C ./output/
|
tar -xzf ./output/${NODE_DIR}.tar.gz -C ./output/
|
||||||
cp ./output/${NODE_DIR}/bin/node ./output/playwright-${SUFFIX}/
|
cp ./output/${NODE_DIR}/bin/node ./output/playwright-${SUFFIX}/
|
||||||
NPM_PATH="lib/node_modules/npm/bin/npm-cli.js"
|
NPM_PATH="lib/node_modules/npm/bin/npm-cli.js"
|
||||||
else
|
else
|
||||||
|
|
@ -60,7 +60,7 @@ function build {
|
||||||
echo "Unsupported RUN_DRIVER ${RUN_DRIVER}"
|
echo "Unsupported RUN_DRIVER ${RUN_DRIVER}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
zip -r ../playwright-${PACKAGE_VERSION}-${SUFFIX}.zip .
|
zip -q -r ../playwright-${PACKAGE_VERSION}-${SUFFIX}.zip .
|
||||||
}
|
}
|
||||||
|
|
||||||
build "node-v12.20.1-darwin-x64" "mac" "tar.gz" "run-driver-posix.sh"
|
build "node-v12.20.1-darwin-x64" "mac" "tar.gz" "run-driver-posix.sh"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue