stellargraph/stellargraph

View on GitHub
.buildkite/hooks/pre-command

Summary

Maintainability
Test Coverage
#!/bin/bash

echo "~~~ setting docker image tag"
case "${BUILDKITE_BRANCH}" in
  develop)
    IMAGE_TAG="latest"
    ;;
  *)
    if [ "$BUILDKITE_PULL_REQUEST" != "false" ]; then
      IMAGE_TAG="PR-$BUILDKITE_PULL_REQUEST"
    else
      # match the existing temporary tag generated by the docker-compose buildkite plugin
      IMAGE_TAG="stellargraph-public-stellargraph-build-${BUILDKITE_BUILD_NUMBER}"
    fi
    ;;
esac

echo "IMAGE_TAG=$IMAGE_TAG"

export IMAGE_TAG

# these are exported to avoid timeout when pushing images
export COMPOSE_HTTP_TIMEOUT="720"
export DOCKER_CLIENT_TIMEOUT="720"