Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
EnPT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EnMAP
GFZ_Tools_EnMAP_BOX
EnPT
Commits
910c28c1
Commit
910c28c1
authored
8 months ago
by
Daniel Scheffler
Browse files
Options
Downloads
Patches
Plain Diff
Adapt CI runner build script to upstream changes in GitLab 17.0.
Signed-off-by:
Daniel Scheffler
<
danschef@gfz-potsdam.de
>
parent
415020ab
Loading
Loading
No related merge requests found
Pipeline
#76961
passed
6 months ago
Stage: test
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
HISTORY.rst
+6
-0
6 additions, 0 deletions
HISTORY.rst
tests/gitlab_CI_docker/build_enpt_testsuite_image.sh
+34
-16
34 additions, 16 deletions
tests/gitlab_CI_docker/build_enpt_testsuite_image.sh
with
40 additions
and
16 deletions
HISTORY.rst
+
6
−
0
View file @
910c28c1
...
...
@@ -2,6 +2,12 @@
History
=======
0.20.3 (coming soon)
--------------------
* Adapted CI runner build script to upstream changes in GitLab 17.0.
0.20.2 (2024-05-30)
-------------------
...
...
This diff is collapsed.
Click to expand it.
tests/gitlab_CI_docker/build_enpt_testsuite_image.sh
+
34
−
16
View file @
910c28c1
#!/usr/bin/env bash
pkgname
=
"enpt"
repourl
=
"https://git.gfz-potsdam.de/EnMAP/GFZ_Tools_EnMAP_BOX/EnPT"
context_dir
=
"./context"
dockerfile
=
"enpt_ci.docker"
tag
=
"enpt_ci:0.14.1"
gitlab_runner
=
"enpt_gitlab_CI_runner"
dockerfile
=
"
${
pkgname
}
_ci.docker"
python_script
=
'
version = {}
with open("../../'
${
pkgname
}
'/version.py") as version_file:
exec(version_file.read(), version)
print(version["__version__"])
'
version
=
`
python
-c
"
$python_script
"
`
tag
=
"
${
pkgname
}
_ci:
$version
"
gitlab_runner
=
"
${
pkgname
}
_gitlab_CI_runner"
runnername_remote
=
"
${
pkgname
}
_ci_runner__v
${
version
}
__
${
HOSTNAME
}
"
taglist
=
"
${
pkgname
}
_ci_client"
echo
"#### Build runner docker image"
docker rmi
${
tag
}
...
...
@@ -28,26 +40,32 @@ docker run \
gitlab/gitlab-runner:latest
# register the runner at the corresponding GitLab repository via a registration-token
echo
"#### Register container at gitlab, get token here https://git.gfz-potsdam.de/EnMAP/GFZ_Tools_EnMAP_BOX/EnPT/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
}
"
echo
"
--------------------------------------------------------------------------
To register the runner at GitLab, go to
${
repourl
}
/-/runners,
click on 'New project runner' and use the following settings:
Tags:
${
taglist
}
Run untagged jobs: Yes
Runner description:
${
runnername_remote
}
Paused: No
Protected: No
Lock to current projects: Yes
Maximum job timeout: 7200
Then click 'Create runner'!
--------------------------------------------------------------------------"
read
-p
"Please enter the GitLab runner authentification token (should start with 'glrt-'): "
token
# NOTE: In case of locally stored images (like here), the docker pull policy 'never' must be used
# (see https://docs.gitlab.com/runner/executors/docker.html#how-pull-policies-work).
docker
exec
-it
${
gitlab_runner
}
/bin/bash
-c
"
\
export RUNNER_EXECUTOR=docker &&
\
gitlab-ci-multi-runner register
\
--non-interactive
\
--executor 'docker'
\
--docker-image '
${
tag
}
'
\
--url 'https://git.gfz-potsdam.de/ci'
\
--registration-token '
${
token
}
'
\
--description '
${
runner_name
}
'
\
--tag-list enpt_ci_client
\
--run-untagged='true'
\
--locked='true'
\
--access-level='not_protected'
\
--url 'https://git.gfz-potsdam.de'
\
--token '
${
token
}
'
\
--description '
${
runnername_remote
}
'
\
--docker-pull-policy='never'
"
ls
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment