Skip to content

Commit

Permalink
chore(NA): disables FORCE_COLOR temporarily when executing node inter…
Browse files Browse the repository at this point in the history
…preter on the cloud artifacts deployment scripts (elastic#162742)

Closes elastic#162756

This PR fixes a problem introduced after the merge of
elastic#160289

Looks like the behaviour of node regarding the use of the `FORCE_COLOR`
flag is now propagated differently when cashing the output of a given
node interpreter run in a bash variable which was affecting the script
and making it to fail when casting a number string to a number.

---------

Co-authored-by: kibanamachine <[email protected]>
  • Loading branch information
mistic and kibanamachine authored Jul 31, 2023
1 parent 96e6eb9 commit f981722
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .buildkite/scripts/steps/artifacts/cloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ export CLOUD_DEPLOYMENT_ELASTICSEARCH_URL=$(ecctl deployment show "$CLOUD_DEPLOY
echo "Kibana: $CLOUD_DEPLOYMENT_KIBANA_URL"
echo "ES: $CLOUD_DEPLOYMENT_ELASTICSEARCH_URL"

# Disable ansi color output for Node.js as we want to get plain values when executing node as a script runner below
export FORCE_COLOR=0

export TEST_KIBANA_PROTOCOL=$(node -e "console.log(new URL(process.env.CLOUD_DEPLOYMENT_KIBANA_URL).protocol.replace(':', ''))")
export TEST_KIBANA_HOSTNAME=$(node -e "console.log(new URL(process.env.CLOUD_DEPLOYMENT_KIBANA_URL).hostname)")
export TEST_KIBANA_PORT=$(node -e "console.log(new URL(process.env.CLOUD_DEPLOYMENT_KIBANA_URL).port || 443)")
Expand All @@ -81,6 +84,9 @@ export TEST_ES_PORT=$(node -e "console.log(new URL(process.env.CLOUD_DEPLOYMENT_
export TEST_ES_USERNAME="$CLOUD_DEPLOYMENT_USERNAME"
export TEST_ES_PASSWORD="$CLOUD_DEPLOYMENT_PASSWORD"

# Enabling ansi color output for Node.js again as we don't need to use it as a script interpreter anymore
export FORCE_COLOR=1

export TEST_BROWSER_HEADLESS=1

# Error: attempted to use the "es" service to fetch Elasticsearch version info but the request failed: ConnectionError: self signed certificate in certificate chain
Expand Down

0 comments on commit f981722

Please sign in to comment.