register-runner 670 Bytes
Newer Older
1 2
#!/bin/sh

3 4
echo "-> Registering runner $ARCH"

5 6 7
gitlab-runner register \
  --non-interactive \
  --url "https://gitlab.alpinelinux.org/" \
8
  --registration-token "$GITLAB_REGISTRATION_TOKEN" \
9 10 11 12 13 14
  --executor "docker" \
  --docker-image alpine:latest \
  --description "docker-runner ($ARCH)" \
  --tag-list "docker-alpine,$ARCH" \
  --run-untagged="true" \
  --locked="false" \
15 16 17
  --access-level="not_protected" \
  --docker-helper-image alpinelinux/gitlab-runner-helper:latest \
  --docker-volumes /var/run/docker.sock:/var/run/docker.sock
18 19 20 21 22 23 24 25

status=$?
if [ $status -eq 0 ]; then
    echo "-> Registration success"
else
    echo "-> Something went wrong"
    exit $status
fi