build: ensure tunnel identifiers are unique (#14108)

* Currently it can happen that our tunnel identifier conflicts with other tunnel identifiers from other Angular projects. A few PRs reported that their tunnel couldn't be re-opened because it was already used and closed successfully.
This commit is contained in:
Paul Gschwendtner
2018-11-14 23:19:22 +01:00
committed by Andrew Seguin
parent cb57c6c6bf
commit 039ca606c8
3 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ rm ${tunnelFileName}
ARGS=""
if [ ! -z "${CIRCLE_BUILD_NUM}" ]; then
ARGS="${ARGS} --local-identifier ${CIRCLE_BUILD_NUM}-${CIRCLE_NODE_INDEX}"
ARGS="${ARGS} --local-identifier angular-material-${CIRCLE_BUILD_NUM}-${CIRCLE_NODE_INDEX}"
fi
echo "Starting Browserstack Local in the background, logging into: ${tunnelLogFile}"
+1 -1
View File
@@ -31,7 +31,7 @@ rm ${tunnelFileName}
sauceArgs="--readyfile ${tunnelReadyFile} --pidfile ${tunnelPidFile}"
if [ ! -z "${CIRCLE_BUILD_NUM}" ]; then
sauceArgs="${sauceArgs} --tunnel-identifier ${CIRCLE_BUILD_NUM}-${CIRCLE_NODE_INDEX}"
sauceArgs="${sauceArgs} --tunnel-identifier angular-material-${CIRCLE_BUILD_NUM}-${CIRCLE_NODE_INDEX}"
fi
echo "Starting Sauce Connect in the background, logging into: ${tunnelLogFile}"
+3 -2
View File
@@ -95,8 +95,9 @@ module.exports = config => {
if (process.env['CIRCLECI']) {
const instanceIndex = Number(process.env['CIRCLE_NODE_INDEX']);
const maxParallelInstances = Number(process.env['CIRCLE_NODE_TOTAL']);
const tunnelIdentifier = `${process.env['CIRCLE_BUILD_NUM']}-${instanceIndex}`;
const buildIdentifier = `angular-material-${tunnelIdentifier}`;
const tunnelIdentifier =
`angular-material-${process.env['CIRCLE_BUILD_NUM']}-${instanceIndex}`;
const buildIdentifier = `circleci-${tunnelIdentifier}`;
const testPlatform = process.env['TEST_PLATFORM'];
if (testPlatform === 'browserstack') {