github.com/snowflakedb/gosnowflake@v1.9.0/ci/scripts/login_internal_docker.sh (about)

     1  #!/bin/bash -e
     2  #
     3  # Login the Internal Docker Registry
     4  #
     5  if [[ -z "$GITHUB_ACTIONS" ]]; then
     6      echo "[INFO] Login the internal Docker Resistry"
     7      NEXUS_USER=${USERNAME:-jenkins}
     8      if [[ -z "$NEXUS_PASSWORD" ]]; then
     9          echo "[ERROR] Set NEXUS_PASSWORD to your LDAP password to access the internal repository!"
    10          exit 1
    11      fi
    12      if ! docker login --username "$NEXUS_USER" --password "$NEXUS_PASSWORD" $INTERNAL_REPO; then
    13          echo "[ERROR] Failed to connect to the nexus server. Verify the environment variable NEXUS_PASSWORD is set correctly for NEXUS_USER: $NEXUS_USER"
    14          exit 1
    15      fi
    16  else
    17      echo "[INFO] No login the internal Docker Registry"
    18  fi