github.com/mysteriumnetwork/node@v0.0.0-20240516044423-365054f76801/bin/release_docker (about)

     1  #!/bin/bash
     2  
     3  ###########################################################################
     4  # Uploads all created Docker images to Docker Hub
     5  # - https://hub.docker.com/r/mysteriumnetwork/myst/
     6  #
     7  # Usage:
     8  #> bin/release_docker <version>..
     9  #
    10  # Release image (specific version):
    11  #> bin/release_docker 0.0.1
    12  #
    13  # Release image (several versions):
    14  #> bin/release_docker 0.0.1 latest
    15  #
    16  # Create image (with personal Docker Hub account):
    17  #> DOCKER_USERNAME=john.developer DOCKER_PASSWORD=**** bin/release_docker 0.0.1
    18  
    19  set -e
    20  
    21  source bin/helpers/output.sh
    22  source bin/helpers/docker.sh
    23  
    24  if [ -z "$1" ]; then
    25      print_error "Missing version!"
    26      exit 1
    27  fi
    28  
    29  echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin
    30  
    31  while test $# -gt 0; do
    32      VERSION_TAG=$1; shift;
    33      BUILD_VERSION=${BUILD_VERSION:-latest}
    34      printf "Creating Docker Hub release '$VERSION_TAG' ..\n" \
    35  
    36      docker_release_image myst:alpine mysteriumnetwork/myst:${VERSION_TAG}
    37      docker_release_image myst:alpine mysteriumnetwork/myst:${VERSION_TAG}-alpine
    38      docker_release_image myst:ubuntu mysteriumnetwork/myst:${VERSION_TAG}-ubuntu
    39      docker_release_image tequilapi:${BUILD_VERSION} mysteriumnetwork/documentation:${VERSION_TAG}
    40  done
    41  
    42  print_success "Docker Hub releases created!"
    43  exit 0