Skip to content

Commit

Permalink
fix: correct checkout directory error (#63)
Browse files Browse the repository at this point in the history
* fix: correct checkout directory error

* Using working dir envar instead of hardcoding

Co-authored-by: Kyle a.k.a. TechSquidTV <[email protected]>

* Try Eric's approach

Co-authored-by: Kyle a.k.a. TechSquidTV <[email protected]>
  • Loading branch information
FelicianoTech and KyleTryon authored Jan 12, 2023
1 parent 5a0f2c8 commit a7eaf7f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ workflows:
vcs-type: << pipeline.project.type >>
requires:
[orb-tools/lint, orb-tools/review, orb-tools/pack, shellcheck/check]
# Use a context to hold your publishing token.
context: orb-publisher
context: image-orbs
github-token: GHI_TOKEN
filters: *filters
# Triggers the next workflow in the Orb Development Kit.
Expand Down
5 changes: 4 additions & 1 deletion .circleci/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ jobs:
- jq/install
- browser-tools/install-chrome:
channel: << parameters.channel >>
- browser-tools/install-chromedriver
# checkout step is added last to satisfy a test
- checkout
int-test-chrome:
parameters:
executor:
Expand Down Expand Up @@ -184,7 +187,7 @@ workflows:
- test-cimg-node-firefox
- test-macos-firefox
- test-linux-firefox
context: orb-publisher
context: image-orbs
filters:
branches:
ignore: /.*/
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/install-chrome.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ else
$SUDO sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
fi
$SUDO apt-get update
$SUDO apt-get install -y google-chrome-${ORB_PARAM_CHANNEL}
DEBIAN_FRONTEND=noninteractive $SUDO apt-get install -y google-chrome-${ORB_PARAM_CHANNEL}
else
# Google does not keep older releases in their PPA, but they can be installed manually. HTTPS should be enough to secure the download.
wget --no-verbose -O /tmp/chrome.deb "https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${ORB_PARAM_CHROME_VERSION}-1_amd64.deb" \
Expand Down
9 changes: 8 additions & 1 deletion src/scripts/install-chromedriver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ if [[ $EUID == 0 ]]; then export SUDO=""; else export SUDO="sudo"; fi
# determine_chrome_version
if uname -a | grep Darwin >/dev/null 2>&1; then
echo "System detected as MacOS"
CHROME_VERSION="$(/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --version)"

if [ -f "/usr/local/bin/google-chrome-stable" ]; then
CHROME_VERSION="$(/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --version)"
else
CHROME_VERSION="$(/Applications/Google\ Chrome\ Beta.app/Contents/MacOS/Google\ Chrome\ Beta --version)"
fi
PLATFORM=mac64

elif grep Alpine /etc/issue >/dev/null 2>&1; then
Expand Down Expand Up @@ -157,6 +162,8 @@ $SUDO chmod +x "$ORB_PARAM_DRIVER_INSTALL_DIR/chromedriver"
# test/verify version
if chromedriver --version | grep "$CHROMEDRIVER_VERSION" >/dev/null 2>&1; then
echo "$(chromedriver --version) has been installed to $(command -v chromedriver)"
readonly base_dir="${CIRCLE_WORKING_DIRECTORY/\~/$HOME}"
rm -f "${base_dir}/LICENSE.chromedriver"
else
echo "Something went wrong; ChromeDriver could not be installed"
exit 1
Expand Down

0 comments on commit a7eaf7f

Please sign in to comment.