Skip to content
Snippets Groups Projects
Commit fac255a3 authored by Georges Racinet's avatar Georges Racinet
Browse files

Grafted workhorse build from default branch, not using it

At this point we'd be ready to ship backports such as
heptapod-workhorse#2.

We've always presented Heptapod Workhorse as a tech preview
for Heptapod 0.12. That was not only because we weren't ready
to package it at the time.

For Heptapod 0.12, it would be incompatible with a configuration
option that we can't tweak in the Docker image, so we don't
COPY it to the final image, but we could do for a suitable
backport branch.
parent afae8691
No related branches found
No related tags found
No related merge requests found
......@@ -75,5 +75,6 @@
pull_opts.extend(('-b', pull_branch))
if pull_revision:
pull_opts.extend(('-r', pull_revision))
remote = revision['remote']
if os.path.isdir(repo_path):
......@@ -78,8 +79,8 @@
if os.path.isdir(repo_path):
cmd = ['hg', 'pull', '-R', repo_path]
cmd = ['hg', 'pull', '-R', repo_path, remote]
cmd.extend(pull_opts)
print("Pull for existing repository: %r" % cmd)
else:
cmd = ['hg']
if shares_dir is None:
......@@ -81,8 +82,8 @@
cmd.extend(pull_opts)
print("Pull for existing repository: %r" % cmd)
else:
cmd = ['hg']
if shares_dir is None:
cmd.extend(('clone', revision['remote'], '--noupdate'))
cmd.extend(('clone', remote, '--noupdate'))
cmd.extend(pull_opts)
else:
......@@ -87,6 +88,6 @@
cmd.extend(pull_opts)
else:
cmd.extend(('share', os.path.join(shares_dir, slug)))
cmd.extend(('share', '--noupdate', os.path.join(shares_dir, slug)))
cmd.append(repo_path)
print("Initializing repository: %r" % cmd)
if not simulate:
......@@ -110,7 +111,10 @@
print("Remove existing tarball: %r" % tarball)
if not simulate:
os.unlink(tarball)
cmd = ['hg', '-R', src_path, 'archive', '-t', 'tar', tarball,
cmd = ['hg', '-R', src_path, 'archive',
'-t', 'tar',
'-p', '.',
tarball,
'-r', revision['revision']]
print("Prepare sources for %s: %r" % (component, cmd))
if not simulate:
......
FROM golang:1.12 AS workhorse
ADD heptapod-workhorse.tar /go/src/heptapod-workhorse
# I won't miss an opportunity not to run as root
RUN adduser --system gobuild --home /go --no-create-home && \
chown -R gobuild:nogroup /go
USER gobuild
# renaming for esthetical reasons, and also, were this image to be
# used independently at some point, would make it clear it's not the
# upstream GitLab Workhorse
RUN make -C /go/src/heptapod-workhorse && \
mv /go/src/heptapod-workhorse/gitlab-workhorse /go/bin/heptapod-workhorse
FROM gitlab/gitlab-ce:12.2.12-ce.0
MAINTAINER <contact@octobus.net>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment