Commit b061a63c authored by Daniel Scheffler's avatar Daniel Scheffler

Revised build_testsuite_image.sh.

Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent b68d1454
Pipeline #12018 failed with stage
in 5 seconds
......@@ -7,25 +7,37 @@ gitlab_runner="py_tools_ds_gitlab_CI_runner"
echo "#### Build runner docker image"
docker rmi ${tag}
docker build -f ${context_dir}/${dockerfile} -m 20G -t ${tag} ${context_dir}
docker build ${context_dir} \
-f ${context_dir}/${dockerfile} \
-m 20G \
-t ${tag}
echo "#### Create gitlab-runner (daemon) container with tag; ${tag}"
docker stop ${gitlab_runner}
docker rm ${gitlab_runner}
docker run -d --name ${gitlab_runner} --restart always \
-v /var/run/docker.sock:/var/run/docker.sock gitlab/gitlab-runner:latest
docker run gitlab/gitlab-runner:latest \
-d \
--name ${gitlab_runner} \
--restart always \
-v /var/run/docker.sock:/var/run/docker.sock \
echo "#### Register container at gitlab, get token here https://gitext.gfz-potsdam.de/danschef/py_tools_ds/settings/ci_cd"
read -p "Please enter gitlab token: " token
echo ""
read -p "Please enter gitlab runner name: " runner_name
echo "New gitlab runner image will named ${gitlab_runner}"
docker exec -it ${gitlab_runner} /bin/bash -c "export RUNNER_EXECUTOR=docker && gitlab-ci-multi-runner register -n \
docker exec -it ${gitlab_runner} /bin/bash -c "\
export RUNNER_EXECUTOR=docker && \
gitlab-ci-multi-runner register \
-n \
--non-interactive \
--executor 'docker' \
--docker-image '${tag}' \
--url 'https://gitext.gfz-potsdam.de/' \
--registration-token '${token}' \
--run-untagged=true \
--locked=true \
--tag-list py_tools_ds_ci_client \
--description '${runner_name}' \
--docker-image '${tag}' "
--tag-list py_tools_ds_ci_client \
--run-untagged='true' \
--locked='false' \
--access-level='not_protected'"
ls
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment