mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[packer_cache] make packer_cache idempotent
When issues arise while building the packer_cache, like the ongoing es snapshot download errors, the cache scripts are retried (up to 5 attempts). In order for this to work the script needs to be idempotent, but `mkdir` is failing if the .chromedriver or .geckodriver directory already exists because they were not using the -p option.
This commit is contained in:
parent
7202398c01
commit
d7b2889b28
1 changed files with 2 additions and 3 deletions
|
@ -21,8 +21,7 @@ if [ -z "$chromedriverDistVersion" ] || [ -z "$chromedriverPkgVersion" ]; then
|
|||
echo "UNABLE TO DETERMINE CHROMEDRIVER VERSIONS"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir ".chromedriver"
|
||||
mkdir -p .chromedriver
|
||||
curl "https://chromedriver.storage.googleapis.com/$chromedriverDistVersion/chromedriver_linux64.zip" > .chromedriver/chromedriver.zip
|
||||
echo "$chromedriverPkgVersion" > .chromedriver/pkgVersion
|
||||
|
||||
|
@ -32,7 +31,7 @@ if [ -z "$geckodriverPkgVersion" ]; then
|
|||
echo "UNABLE TO DETERMINE geckodriver VERSIONS"
|
||||
exit 1
|
||||
fi
|
||||
mkdir ".geckodriver"
|
||||
mkdir -p ".geckodriver"
|
||||
cp "node_modules/geckodriver/geckodriver.tar.gz" .geckodriver/geckodriver.tar.gz
|
||||
echo "$geckodriverPkgVersion" > .geckodriver/pkgVersion
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue