Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Openstack Gitlab Executor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
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
Pi-Lab
Infrastructure
Openstack Gitlab Executor
Commits
7a6fe7c9
Commit
7a6fe7c9
authored
2 years ago
by
istmxrein
Browse files
Options
Downloads
Patches
Plain Diff
refactor Dockerfile
- use python docker image - download gitlab-runner from binary
parent
c401ffa6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+28
-0
28 additions, 0 deletions
Dockerfile
entrypoint.sh
+5
-5
5 additions, 5 deletions
entrypoint.sh
with
33 additions
and
5 deletions
Dockerfile
0 → 100644
+
28
−
0
View file @
7a6fe7c9
FROM
python:3-slim
ARG
GITLAB_RUNNER_VERSION=v15.2.1
ENV
GITLAB_RUNNER_URL="https://gitlab-runner-downloads.s3.amazonaws.com/${GITLAB_RUNNER_VERSION}/binaries/gitlab-runner-linux-amd64"
LABEL
maintainer="Max Reinheimer <max@reinheimer.dev>" \
io.openshift.tags="gitlab,ci,runner" \
name="openstack-gitlab-runner" \
io.k8s.display-name="GitLab runner" \
summary="GitLab runner" \
description="A GitLab runner image with openstack custom executor." \
io.k8s.description="A GitLab runner image with openstack custom executor."
COPY
cleanup.py env.py config.sh prepare.py run.py requirements.txt /data/
COPY
entrypoint.sh /usr/bin/entrypoint
RUN
apt-get update
&&
apt-get
-y
install
curl dumb-init gcc libffi-dev
&&
\
curl
-L
--output
/usr/bin/gitlab-runner
"
${
GITLAB_RUNNER_URL
}
"
&&
\
pip3
install
-r
/data/requirements.txt
&&
\
chmod
+x /data/
*
/usr/bin/entrypoint /usr/bin/gitlab-runner
&&
\
useradd
--comment
'GitLab Runner'
--create-home
gitlab-runner
--shell
/bin/bash
&&
\
apt-get remove
-y
gcc curl
&&
apt autoremove
&&
apt-get clean
USER
gitlab-runner
WORKDIR
/data
ENTRYPOINT
["dumb-init", "--"]
CMD
["entrypoint"]
This diff is collapsed.
Click to expand it.
star
t.sh
→
entrypoin
t.sh
+
5
−
5
View file @
7a6fe7c9
...
...
@@ -16,13 +16,13 @@ echo "$PRIVATE_KEY" > "$HOME"/priv_key
gitlab-runner register
--non-interactive
\
--executor
=
custom
\
--custom-config-exec
=
"
$HOME
"
/config.sh
\
--custom-prepare-exec
=
"
$HOME
"
/prepare.py
\
--custom-run-exec
=
"
$HOME
"
/run.py
\
--custom-cleanup-exec
=
"
$HOME
"
/cleanup.py
--custom-config-exec
=
/data
/config.sh
\
--custom-prepare-exec
=
/data
/prepare.py
\
--custom-run-exec
=
/data
/run.py
\
--custom-cleanup-exec
=
/data
/cleanup.py
if
[[
"
$CONCURRENT
"
]]
;
then
sed
-i
"s/concurrent = .*/concurrent =
$CONCURRENT
/g"
"
$HOME
"
/.gitlab-runner/config.toml
sed
-i
"s/concurrent = .*/concurrent =
$CONCURRENT
/g"
$HOME
/.gitlab-runner/config.toml
fi
gitlab-runner run
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