github.com/ssube/gitlab-ci-multi-runner@v1.2.1-0.20160607142738-b8d1285632e6/dockerfiles/ubuntu/entrypoint (about)

     1  #!/bin/bash
     2  
     3  # gitlab-ci-multi-runner data directory
     4  DATA_DIR="/etc/gitlab-runner"
     5  CONFIG_FILE=${CONFIG_FILE:-$DATA_DIR/config.toml}
     6  # custom certificate authority path
     7  CA_CERTIFICATES_PATH=${CA_CERTIFICATES_PATH:-$DATA_DIR/certs/ca.crt}
     8  LOCAL_CA_PATH="/usr/local/share/ca-certificates/ca.crt"
     9  
    10  update_ca() {
    11    echo "Updating CA certificates..."
    12    cp "${CA_CERTIFICATES_PATH}" "${LOCAL_CA_PATH}"
    13    update-ca-certificates --fresh >/dev/null
    14  }
    15  
    16  if [ -f "${CA_CERTIFICATES_PATH}" ]; then
    17    # update the ca if the custom ca is different than the current
    18    cmp --silent "${CA_CERTIFICATES_PATH}" "${LOCAL_CA_PATH}" || update_ca
    19  fi
    20  
    21  # launch gitlab-ci-multi-runner passing all arguments
    22  exec gitlab-ci-multi-runner "$@"