Skip to content
Snippets Groups Projects
Commit 0906062e authored by Langer, Jacek's avatar Langer, Jacek
Browse files

chore: added token and host url to runscript

parent 5f4af46c
No related branches found
No related tags found
No related merge requests found
Pipeline #142540 passed
......@@ -5,7 +5,7 @@ docker-build:
image:
# An alpine-based image with the `docker` CLI installed.
name: docker:stable
name: docker:19.03.12
# This will run a Docker daemon in a container (Docker-In-Docker), which will
# be available at thedockerhost:2375. If you make e.g. port 5000 public in Docker
......@@ -30,7 +30,7 @@ docker-build:
#
# CHANGEME: You can use some other Docker registry though by changing the
# login and image name.
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
- echo $CI_BUILD_TOKEN | docker login -u "$CI_REGISTRY_USER" --password-stdin "$CI_REGISTRY"
- docker build -t "$CI_REGISTRY_IMAGE" .
- docker push "$CI_REGISTRY_IMAGE"
......
#!/bin/bash
# --restart always
docker run -d --name gitlab-runner --restart unless-stopped -v /srv/gitlab-runner/config:/etc/gitlab-runner -v /var/run/docker.sock:/var/run/docker.sock gitlab/gitlab-runner:latest
# #System volume
# docker run --rm -it -v /srv/gitlab-runner/config:/etc/gitlab-runner gitlab/gitlab-runner register
# #Docker volume
# #docker run --rm -it -v gitlab-runner-config:/etc/gitlab-runner gitlab/gitlab-runner:latest register
sudo gitlab-runner register \
--url "https://git-ce.rwth-aachen.de/" \
--registration-token "GR1348941g1nyq5UHChraBCy7SsxU" \
--description "docker-ruby:2.6" \
--executor "docker" \
--template-config /tmp/test-config.template.toml \
--docker-image ruby:2.6
\ No newline at end of file
docker run --rm -it -v gitlab-runner-config:/etc/gitlab-runner gitlab/gitlab-runner:latest register
token=https://git-ce.rwth-aachen.de/
token=GR1348941g1nyq5UHChraBCy7SsxU
docker run -d --name gitlab-runner --restart always \
-v /srv/gitlab-runner/config:/etc/gitlab-runner \
-v /var/run/docker.sock:/var/run/docker.sock \
gitlab/gitlab-runner:latest
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment