Skip to content

Commit 319736d

Browse files
committed
Add centos8 builder
1 parent a95e0e0 commit 319736d

File tree

6 files changed

+93
-6
lines changed

6 files changed

+93
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM centos:8
2+
RUN yum install -y epel-release
3+
RUN yum --exclude=iputils update -y && yum install -y \
4+
git curl wget mock rpm-build \
5+
python36 python3-libs python36-devel python3-pip python3-numpy python3-pillow \
6+
redhat-rpm-config gcc libffi-devel openssl-devel \
7+
&& yum groupinstall -y "Development Tools"
8+
RUN ln -sf /usr/bin/python3.6 /usr/bin/python3 \
9+
&& ln -sf /usr/bin/pip3.6 /usr/bin/pip3
10+
11+
RUN python3 -m pip install "buildbot[bundle]" sphinx
12+
13+
ENV WORKER_NAME diax-centos8-64
14+
ENV WORKER_ADMIN Andrew Chin <[email protected]>
15+
ENV WORKER_INFO CentOS 8 64-bit
16+
COPY worker-start.sh /root/
17+
CMD /root/worker-start.sh
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
cd /root/
4+
if [ ! -d "worker" ]; then
5+
echo "creating worker..."
6+
buildbot-worker create-worker --umask=0o22 --no-logrotate worker bbmaster:9989 $WORKER_NAME $(python3 -c "import hmac, hashlib; print(hmac.new(bytes('$BUILDBOT_SECRET', 'utf-8'), bytes('$WORKER_NAME', 'utf-8'), hashlib.sha512).hexdigest())")
7+
echo $WORKER_ADMIN > worker/info/admin
8+
echo $WORKER_INFO > worker/info/host
9+
uname -a >> worker/info/host
10+
fi
11+
12+
rm -f worker/twistd.pid worker/twistd.log
13+
14+
# make sure /sys is rw (I HAVE NO IDEA but it helps rpm builders)
15+
mount -o remount,rw /sys
16+
17+
# run in a clean env, don't leak secrets
18+
exec env -i -- /bin/bash -c "source /etc/profile; export HOME=`pwd`; exec buildbot-worker start --nodaemon worker"

buildbot/master/master.cfg

+10-5
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,17 @@ class BaseConfig:
5252
DEFAULT_CLIENT_JAR_VER = "1.15"
5353

5454
ALL_BUILDERS = ['src', 'render', 'win32',
55-
'win64', 'deb32', 'deb64', 'centos7-64']
55+
'win64', 'deb32', 'deb64', 'centos7-64', 'centos8-64']
5656
ENABLED_WORKERS = ['diax-stretch-64',
57-
'diax-stretch-32', 'ec2-windows', 'diax-centos7-64']
57+
'diax-stretch-32', 'ec2-windows', 'diax-centos7-64', 'diax-centos8-64']
5858

5959
# high-level worker list
6060
# workers[name] = [... list of builders ...]
6161
WORKERS_TO_BUILDERS = {
6262
'diax-stretch-64': ['src', 'render', 'deb64'],
6363
'diax-stretch-32': ['src', 'render', 'deb32'],
6464
'diax-centos7-64': ['centos7-64'],
65+
'diax-centos8-64': ['centos8-64'],
6566
'ec2-windows': ['win32', 'win64'],
6667
}
6768

@@ -79,8 +80,8 @@ class DevConfig(BaseConfig):
7980
BASE_URL = "http://localhost:8020"
8081
ENABLE_GITHUB_AUTH = os.environ.get("DISABLE_GITHUB_AUTH") is None
8182

82-
ALL_BUILDERS = ['src', 'render', 'deb32', 'deb64', 'centos7-64']
83-
ENABLED_WORKERS = ['diax-stretch-64', 'diax-stretch-32', 'diax-centos7-64']
83+
ALL_BUILDERS = ['src', 'render', 'deb32', 'deb64', 'centos7-64', 'centos8-64']
84+
ENABLED_WORKERS = ['diax-stretch-64', 'diax-stretch-32', 'diax-centos7-64', 'diax-centos8-64']
8485

8586

8687
ENV = os.environ.get("ENV", "production")
@@ -563,7 +564,7 @@ def rpm(rpmbase, mockbase, mockconfig, rpmarch, mockarch):
563564
yield MasterShellCommand(command=["/root/rpmsign.sh", upload_dest(".rpm")], name="sign package", description="signing", descriptionDone="signed")
564565

565566
# link the new rpm into the repo
566-
system_map = {'centos6': '6', 'centos7': '7'}
567+
system_map = {'centos6': '6', 'centos7': '7', 'centos8': '8'}
567568
rpm_package_area = RPM_REPO / system_map[rpmbase] / rpmarch / "packages"
568569

569570
yield MasterShellCommand(command=["ln", "-f", upload_dest(".rpm"), str(rpm_package_area)], name="link into repo", doStepIf=is_release_build, description="linking into repo", descriptionDone="linked into repo")
@@ -584,6 +585,10 @@ def centos6_64():
584585
def centos7_64():
585586
yield rpm('centos7', 'el7', 'epel-7', 'x86_64', 'x86_64')
586587

588+
@builder(locks=[rpm_build_lock.access('exclusive')])
589+
def centos8_64():
590+
yield rpm('centos8', 'el8', 'epel-8', 'x86_64', 'x86_64')
591+
587592

588593
class RenderDirUpload(DirectoryUpload):
589594
def __init__(self, *args, **kwargs):
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Summary: Generates large resolution images of a Minecraft map.
2+
Name: Minecraft-Overviewer
3+
Version: {VERSION}
4+
Release: 1%{?dist}
5+
Source0: %{name}-%{version}.tar.gz
6+
License: GNU General Public License v3
7+
Group: Development/Libraries
8+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
9+
Vendor: Andrew Brown <[email protected]>
10+
Url: http://overviewer.org/
11+
Requires: epel-release python3-pillow python3-numpy
12+
BuildRequires: epel-release git python36-devel python3-numpy
13+
14+
%description
15+
The Minecraft Overviewer is a command-line tool for rendering high-resolution
16+
maps of Minecraft worlds. It generates a set of static html and image files and
17+
uses the Google Maps API to display a nice interactive map.
18+
19+
%prep
20+
git clone https://github.com/python-pillow/Pillow.git %{_tmppath}/Pillow
21+
%setup -n %{name}
22+
23+
%build
24+
env CFLAGS="$RPM_OPT_FLAGS" PIL_INCLUDE_DIR=%{_tmppath}/Pillow/src/libImaging %{__python3} setup.py build
25+
26+
%install
27+
%{__python3} setup.py install -O1 --root=%{buildroot}
28+
rm -rf %{buildroot}%{_defaultdocdir}/minecraft-overviewer
29+
30+
%clean
31+
rm -rf %{buildroot}
32+
33+
%files
34+
%defattr(-,root,root)
35+
%{python3_sitearch}/Minecraft_Overviewer-*-*.egg-info
36+
%{python3_sitearch}/overviewer_core
37+
%{_bindir}/overviewer.py
38+
%doc README.rst COPYING.txt sample_config.py

buildbot/repos/rpm/repo/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
.PHONY : all
33

4-
all : 6/i386.repo 6/x86_64.repo 7/i386.repo 7/x86_64.repo
4+
all : 6/i386.repo 6/x86_64.repo 7/i386.repo 7/x86_64.repo 8/x86_64.repo
55

66
%.repo :
77
createrepo -s sha $*

docker-compose.yml

+9
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,15 @@ services:
6161
- apparmor:unconfined
6262
links:
6363
- bbmaster
64+
bbcentos864:
65+
build: buildbot/docker-builders/centos8-64
66+
env_file: confidential.env
67+
cap_add:
68+
- SYS_ADMIN
69+
security_opt:
70+
- apparmor:unconfined
71+
links:
72+
- bbmaster
6473
bbstretch64:
6574
build: buildbot/docker-builders/stretch-64
6675
env_file: confidential.env

0 commit comments

Comments
 (0)