1
0
Fork 0

updated buildkite to llvm-10

This commit is contained in:
Mikhail Goncharov 2020-01-24 10:06:42 +01:00
parent 563a115006
commit ed0fb93e67
3 changed files with 62 additions and 58 deletions

View file

@ -1,57 +1,61 @@
FROM debian:testing FROM debian:testing
RUN apt-get update ;\ RUN echo "deb [trusted=yes] http://apt.llvm.org/buster/ llvm-toolchain-buster-10 main\n$(cat /etc/apt/sources.list)" > /etc/apt/sources.list ;\
apt-get install -y --no-install-recommends locales \ apt-get update ;\
cmake ninja-build git ca-certificates clang lld ccache python3 build-essential \ apt-get install -y --no-install-recommends locales \
clang-tidy clang-format \ cmake ninja-build git ca-certificates clang lld ccache python3 build-essential \
python3-psutil zip wget \ clang-tidy clang-format \
openjdk-11-jdk \ python3-psutil zip wget \
python3-pip python3-setuptools \ openjdk-11-jdk \
swig python3-dev libedit-dev libncurses5-dev libxml2-dev liblzma-dev golang rsync jq; \ python3-pip python3-setuptools \
apt-get clean swig python3-dev libedit-dev libncurses5-dev libxml2-dev liblzma-dev golang rsync jq; \
apt-get clean
# Make python3 default (needed by git-clang-format and others).
RUN rm -f /usr/bin/python && ln -s /usr/bin/python3 /usr/bin/python # Make python3 default (needed by git-clang-format and others).
# required for openssh server RUN rm -f /usr/bin/python && ln -s /usr/bin/python3 /usr/bin/python
RUN mkdir -p /run/sshd RUN ls /usr/bin
# required for openssh server
ARG user=buildkite RUN mkdir -p /run/sshd
ARG group=buildkite
ARG uid=1000 ARG user=buildkite
ARG gid=1000 ARG group=buildkite
ARG AGENT_WORKDIR=/home/${user}/agent ARG uid=1000
ARG gid=1000
RUN mkdir -p /scripts ARG AGENT_WORKDIR=/home/${user}/agent
COPY start_agent.sh /scripts/ RUN mkdir -p /scripts
# install python dependencies for the scripts COPY start_agent.sh /scripts/
RUN pip3 install -r https://raw.githubusercontent.com/google/llvm-premerge-checks/master/scripts/phabtalk/requirements.txt
# install python dependencies for the scripts
RUN groupadd -g ${gid} ${group} ;\ # ADD will checks that contentent of a file has changed.
useradd -c "buildkite user" -d /home/${user} -u ${uid} -g ${gid} -m ${user} ;\ ADD "https://raw.githubusercontent.com/google/llvm-premerge-checks/master/scripts/phabtalk/requirements.txt" requirements.txt
mkdir /home/${user}/ccache RUN pip3 install -r requirements.txt
RUN chown -R ${user}:${user} /home/${user} RUN groupadd -g ${gid} ${group} ;\
useradd -c "buildkite user" -d /home/${user} -u ${uid} -g ${gid} -m ${user} ;\
WORKDIR /home/${user} mkdir /home/${user}/ccache
ENV CCACHE_PATH=/mnt/disks/ssd0/ccache
RUN chown -R ${user}:${user} /home/${user}
# configure locale
RUN sed --in-place '/en_US.UTF-8/s/^#//' /etc/locale.gen ;\ WORKDIR /home/${user}
locale-gen ENV CCACHE_PATH=/mnt/disks/ssd0/ccache
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en # configure locale
ENV LC_ALL en_US.UTF-8 RUN sed --in-place '/en_US.UTF-8/s/^#//' /etc/locale.gen ;\
locale-gen
# buildkite ENV LANG en_US.UTF-8
RUN apt-get install -y apt-transport-https gnupg;\ ENV LANGUAGE en_US:en
sh -c 'echo deb https://apt.buildkite.com/buildkite-agent stable main > /etc/apt/sources.list.d/buildkite-agent.list' ;\ ENV LC_ALL en_US.UTF-8
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 32A37959C2FA5C3C99EFBC32A79206696452D198 ;\
apt-get update ;\ # buildkite
apt-get install -y buildkite-agent RUN apt-get install -y apt-transport-https gnupg;\
sh -c 'echo deb https://apt.buildkite.com/buildkite-agent stable main > /etc/apt/sources.list.d/buildkite-agent.list' ;\
VOLUME /credentials apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 32A37959C2FA5C3C99EFBC32A79206696452D198 ;\
apt-get update ;\
CMD ["/scripts/start_agent.sh"] apt-get install -y buildkite-agent
VOLUME /credentials
CMD ["/scripts/start_agent.sh"]

View file

@ -1,6 +1,6 @@
FROM debian:testing FROM debian:testing
RUN echo "deb [trusted=yes] http://apt.llvm.org/buster/ llvm-toolchain-buster main\n$(cat /etc/apt/sources.list)" > /etc/apt/sources.list;\ RUN echo "deb [trusted=yes] http://apt.llvm.org/buster/ llvm-toolchain-buster-10 main\n$(cat /etc/apt/sources.list)" > /etc/apt/sources.list;\
apt-get update ;\ apt-get update ;\
apt-get install -y --no-install-recommends locales \ apt-get install -y --no-install-recommends locales \
cmake ninja-build git ca-certificates clang lld ccache python3 build-essential \ cmake ninja-build git ca-certificates clang lld ccache python3 build-essential \