Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Daniel Scheffler
py_tools_ds
Commits
b061a63c
Commit
b061a63c
authored
Aug 28, 2020
by
Daniel Scheffler
Browse files
Revised build_testsuite_image.sh.
Signed-off-by:
Daniel Scheffler
<
danschef@gfz-potsdam.de
>
parent
b68d1454
Pipeline
#12018
failed with stage
in 5 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tests/CI_docker/build_testsuite_image.sh
View file @
b061a63c
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment