Skip to content

Commit

Permalink
[percy] only execute percy setup when necessary (elastic#39043)
Browse files Browse the repository at this point in the history
  • Loading branch information
Spencer authored Jun 16, 2019
1 parent 5d90300 commit 9c1bdb9
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/dev/ci_setup/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,6 @@ else
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
fi

###
### skip chomium download, use the system chrome install
###
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
PUPPETEER_EXECUTABLE_PATH="$(command -v google-chrome-stable)"
export PUPPETEER_EXECUTABLE_PATH

###
### install dependencies
###
Expand All @@ -172,13 +165,6 @@ if [ "$GIT_CHANGES" ]; then
exit 1
fi

###
### Set Percy parallel build support environment vars
###
eval "$(node ./src/dev/ci_setup/get_percy_env)"
echo " -- PERCY_PARALLEL_NONCE='$PERCY_PARALLEL_NONCE'"
echo " -- PERCY_PARALLEL_TOTAL='$PERCY_PARALLEL_TOTAL'"

###
### rebuild kbn-pm distributable to ensure it's not out of date
###
Expand Down
17 changes: 17 additions & 0 deletions src/dev/ci_setup/setup_percy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

set -e

###
### skip chomium download, use the system chrome install
###
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
PUPPETEER_EXECUTABLE_PATH="$(command -v google-chrome-stable)"
export PUPPETEER_EXECUTABLE_PATH

###
### Set Percy parallel build support environment vars
###
eval "$(node ./src/dev/ci_setup/get_percy_env)"
echo " -- PERCY_PARALLEL_NONCE='$PERCY_PARALLEL_NONCE'"
echo " -- PERCY_PARALLEL_TOTAL='$PERCY_PARALLEL_TOTAL'"
2 changes: 2 additions & 0 deletions test/scripts/jenkins_visual_regression.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
set -e
trap 'node "$KIBANA_DIR/src/dev/failed_tests/cli"' EXIT

source "$KIBANA_DIR/src/dev/ci_setup/setup_percy.sh"

node scripts/build --debug --oss;
linuxBuild="$(find "$KIBANA_DIR/target" -name 'kibana-oss-*-linux-x86_64.tar.gz')"
installDir="$PARENT_DIR/install/kibana"
Expand Down
2 changes: 2 additions & 0 deletions test/scripts/jenkins_xpack_visual_regression.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
set -e
trap 'node "$KIBANA_DIR/src/dev/failed_tests/cli"' EXIT

source "$KIBANA_DIR/src/dev/ci_setup/setup_percy.sh"

node scripts/build --debug --no-oss;
linuxBuild="$(find "$KIBANA_DIR/target" -name 'kibana-*-linux-x86_64.tar.gz')"
installDir="$PARENT_DIR/install/kibana"
Expand Down

0 comments on commit 9c1bdb9

Please sign in to comment.