mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[CI] Avoid docker login if docker is not running (#183379)
## Summary We've found that the command tries to log in to docker in cases when the `docker` binary is available (installed) but not running on the devices. This can happen, for example, on a device that's set up a bit differently than our normal CI executors (e.g.: [bare metal executors](https://buildkite.com/elastic/kibana-single-user-performance/builds/13383)). This PR makes it sure that we only interact with docker in that step, if it's running.
This commit is contained in:
parent
c4f08c0ce9
commit
9d1a37d2db
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ fi
|
|||
|
||||
KIBANA_DOCKER_USERNAME="$(vault_get container-registry username)"
|
||||
KIBANA_DOCKER_PASSWORD="$(vault_get container-registry password)"
|
||||
if command -v docker &> /dev/null; then
|
||||
if (command -v docker && docker version) &> /dev/null; then
|
||||
echo "$KIBANA_DOCKER_PASSWORD" | docker login -u "$KIBANA_DOCKER_USERNAME" --password-stdin docker.elastic.co
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue