Skip to content

Commit

Permalink
[ci/docker] Only run commands if docker bin exists (elastic#183310)
Browse files Browse the repository at this point in the history
Fixes specific cases, like static agents used for updating caches
without the docker binary, from running docker commands.
  • Loading branch information
jbudz authored May 13, 2024
1 parent b4084b6 commit 931b587
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .buildkite/scripts/common/setup_job_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ fi

KIBANA_DOCKER_USERNAME="$(vault_get container-registry username)"
KIBANA_DOCKER_PASSWORD="$(vault_get container-registry password)"
echo "$KIBANA_DOCKER_PASSWORD" | docker login -u "$KIBANA_DOCKER_USERNAME" --password-stdin docker.elastic.co
if command -v docker &> /dev/null; then
echo "$KIBANA_DOCKER_PASSWORD" | docker login -u "$KIBANA_DOCKER_USERNAME" --password-stdin docker.elastic.co
fi
}

# Set up a custom ES Snapshot Manifest if one has been specified for this build
Expand Down

0 comments on commit 931b587

Please sign in to comment.