entrypoint 322 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
#!/bin/sh

if [ ! -f /etc/gitlab-runner/config.toml ]; then
    if [ -z "$GITLAB_REGISTRATION_TOKEN" ] || [ "$GITLAB_REGISTRATION_TOKEN" = '<token>' ]; then
        echo "Runner is not configured. Please provide 'GITLAB_REGISTRATION_TOKEN'"
        exit 1
    fi
    register-runner || exit $?
fi

exec gitlab-runner "$@"