From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 25911158094 for ; Wed, 5 Oct 2022 09:06:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4C198E0863; Wed, 5 Oct 2022 09:06:38 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 335DDE0863 for ; Wed, 5 Oct 2022 09:06:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0E678341001 for ; Wed, 5 Oct 2022 09:06:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6A894602 for ; Wed, 5 Oct 2022 09:06:35 +0000 (UTC) From: "Magnus Granberg" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Magnus Granberg" Message-ID: <1664960769.5feaf00fc4770fbf3088244faa129996d1b08b8c.zorry@gentoo> Subject: [gentoo-commits] proj/tinderbox-cluster:master commit in: docker/ X-VCS-Repository: proj/tinderbox-cluster X-VCS-Files: docker/GentooBuildbotWorker.Dockerfile docker/GentooBuildbotWorkerBuild.Dockerfile docker/GentooBuildbotWorkerDefault.Dockerfile docker/GentooBuildbotWorkerLog.Dockerfile X-VCS-Directories: docker/ X-VCS-Committer: zorry X-VCS-Committer-Name: Magnus Granberg X-VCS-Revision: 5feaf00fc4770fbf3088244faa129996d1b08b8c X-VCS-Branch: master Date: Wed, 5 Oct 2022 09:06:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 543feb91-6b78-4d6a-adca-47b96dc3b654 X-Archives-Hash: f6ffd4b87d7a62fab7014883e6227c30 commit: 5feaf00fc4770fbf3088244faa129996d1b08b8c Author: Magnus Granberg gentoo org> AuthorDate: Wed Oct 5 09:06:09 2022 +0000 Commit: Magnus Granberg gentoo org> CommitDate: Wed Oct 5 09:06:09 2022 +0000 URL: https://gitweb.gentoo.org/proj/tinderbox-cluster.git/commit/?id=5feaf00f Fix the Log and Build dockerfiles Signed-off-by: Magnus Granberg gentoo.org> docker/GentooBuildbotWorker.Dockerfile | 14 ---- docker/GentooBuildbotWorkerBuild.Dockerfile | 79 ++++++++++++++++++++++ ...ckerfile => GentooBuildbotWorkerLog.Dockerfile} | 0 3 files changed, 79 insertions(+), 14 deletions(-) diff --git a/docker/GentooBuildbotWorker.Dockerfile b/docker/GentooBuildbotWorker.Dockerfile deleted file mode 100644 index db5e398..0000000 --- a/docker/GentooBuildbotWorker.Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -# This Dockerfile creates a gentoo buildbot worker container image -# from a gentoo project stage4 docker image. - -ARG PROJECTUUID - -FROM stage4-${PROJECTUUID} -RUN echo "Building Gentoo Buildbot worker Container image for ${PROJECTUUID}" \ - && ( sed -i -e 's/#rc_sys=""/rc_sys="docker"/g' etc/rc.conf 2>/dev/null || true ) \ - && echo 'UTC' > etc/timezone \ - && echo 'docker' >> /var/lib/buildbot_worker/info/host \ - && echo 'bb-worker-${PROJECTUUID}:latest' >> /var/lib/buildbot_worker/info/host -WORKDIR /var/lib/buildbot_worker -ENTRYPOINT ["/usr/bin/buildbot-worker"] -CMD ["start", "--nodaemon"] diff --git a/docker/GentooBuildbotWorkerBuild.Dockerfile b/docker/GentooBuildbotWorkerBuild.Dockerfile new file mode 100644 index 0000000..bd357dc --- /dev/null +++ b/docker/GentooBuildbotWorkerBuild.Dockerfile @@ -0,0 +1,79 @@ +# This Dockerfile creates a gentoo stage4 container image with buildbot worker installed. + +ARG TAG=latest + +FROM gentoo/portage:latest as portage + +FROM gentoo/stage3:$TAG + +ARG KEYWORDS +ARG PROJECTUUID +ARG BINHOSTURL +ARG ARCH +ARG TAG=latest +ARG NODE + +# copy the entire portage volume in +COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo + +# Setup portage for git install +RUN echo 'FEATURES="-ipc-sandbox -pid-sandbox -network-sandbox -usersandbox -mount-sandbox sandbox"' | cat >> /etc/portage/make.conf\ + && echo 'MAKEOPTS="-j8"' | cat >> /etc/portage/make.conf + +# Install git +RUN emerge -qv dev-vcs/git + +# Setup portage for the rest of the build +RUN echo -e "[binhost]\npriority = 9999\nsync-uri = ${BINHOSTURL}/${PROJECTUUID}/packages/\n" | cat >> /etc/portage/binrepos.conf\ + && echo 'EMERGE_DEFAULT_OPTS="--buildpkg=y --rebuild-if-new-rev=y --rebuilt-binaries=y --usepkg=y --binpkg-respect-use=n --binpkg-changed-deps=y --nospinner --color=n --ask=n"' | cat >> /etc/portage/make.conf\ + && echo 'FEATURES="${FEATURES} parallel-fetch -merge-sync "' | cat >> /etc/portage/make.conf\ + && echo 'FEATURES="${FEATURES} getbinpkg"' | cat >> /etc/portage/make.conf\ + && echo 'COMMON_FLAGS="${COMMON_FLAGS} -fno-diagnostics-color -march=native"' | >> /etc/portage/make.conf\ + && echo 'USE="X elogind"' | >> /etc/portage/make.conf\ + && echo 'PYTHON_TARGETS="python3_10 python3_9 python3_8 python3_11"' | >> /etc/portage/make.conf\ + && echo 'ACCEPT_LICENSE="*"'\ + && ( sed -i -e 's/#rc_sys=""/rc_sys="docker"/g' /etc/rc.conf 2>/dev/null || true ) \ + && echo 'UTC' > /etc/timezone + +# Setup LANG +RUN echo 'en_US.UTF-8 UTF-8' | cat >> /etc/locale.gen\ + && echo 'en_US ISO-8859-1' | cat >> /etc/locale.gen\ + && echo 'C.UTF8 UTF-8' | cat >> /etc/locale.gen\ + && echo 'LANG="en_US.utf8"' | cat >> /etc/locale.conf\ + && locale-gen + +# clone gentoo repo use github https for +# gitlab.gentoo.org do timeout on https +RUN rm -R /var/db/repos/gentoo\ + && git clone --depth=1 https://github.com/gentoo/gentoo.git /var/db/repos/gentoo + +# set accept_keywords +RUN echo 'ACCEPT_KEYWORDS="'"${KEYWORDS}"'"' | cat >> /etc/portage/make.conf + +# Setup world file +RUN echo 'app-text/ansifilter' | cat >> /var/lib/portage/world\ + && echo 'dev-util/pkgcheck' | cat >> /var/lib/portage/world\ + && echo 'dev-lang/rust-bin' | cat >> /var/lib/portage/world\ + && echo 'app-admin/eclean-kernel' | cat >> /var/lib/portage/world\ + && echo 'app-portage/gentoolkit' | cat >> /var/lib/portage/world\ + && echo 'app-editors/nano' | cat >> /var/lib/portage/world + +# Run emerge update and install buildbot-worker +RUN emerge -1qv perl\ + && perl-cleaner --all\ + && emerge -qv --update --deep --newuse @world\ + && emerge -qv gentoo-kernel-bin\ + && emerge -qv buildbot-worker + +# Rm the gentoo repo +RUN rm -R /var/db/repos/gentoo + +# Setup the buildbot-worker +WORKDIR /var/lib/buildbot_worker +RUN wget https://raw.githubusercontent.com/buildbot/buildbot/master/worker/docker/buildbot.tac\ + && ( sed -i -e 's/umask = None/umask = 0o22/g' buildbot.tac 2>/dev/null || true ) \ + && mkdir info\ + && echo "${PROJECTUUID} ${ARCH} stage3:${TAG} ${NODE}" | cat > info/host +ENTRYPOINT ["/usr/bin/buildbot-worker"] +CMD ["start", "--nodaemon"] +#CMD ["/bin/bash"] diff --git a/docker/GentooBuildbotWorkerDefault.Dockerfile b/docker/GentooBuildbotWorkerLog.Dockerfile similarity index 100% rename from docker/GentooBuildbotWorkerDefault.Dockerfile rename to docker/GentooBuildbotWorkerLog.Dockerfile