Line endings, docs
This commit is contained in:
parent
f998580ba2
commit
403973a356
3 changed files with 60 additions and 55 deletions
|
@ -1,53 +1,55 @@
|
||||||
FROM debian:testing
|
FROM debian:testing
|
||||||
|
|
||||||
RUN apt-get update ;\
|
RUN 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 \
|
||||||
clang-tidy clang-format \
|
clang-tidy clang-format \
|
||||||
python3-psutil arcanist zip wget \
|
python3-psutil arcanist zip wget \
|
||||||
openjdk-11-jdk \
|
openjdk-11-jdk \
|
||||||
python3-pip python3-setuptools \
|
python3-pip python3-setuptools \
|
||||||
swig python3-dev libedit-dev libncurses5-dev libxml2-dev liblzma-dev golang rsync jq; \
|
swig python3-dev libedit-dev libncurses5-dev libxml2-dev liblzma-dev golang rsync jq; \
|
||||||
apt-get clean
|
apt-get clean
|
||||||
|
|
||||||
# Make python3 default (needed by git-clang-format and others).
|
# Make python3 default (needed by git-clang-format and others).
|
||||||
RUN rm -f /usr/bin/python && ln -s /usr/bin/python3 /usr/bin/python
|
RUN rm -f /usr/bin/python && ln -s /usr/bin/python3 /usr/bin/python
|
||||||
# required for openssh server
|
# required for openssh server
|
||||||
RUN mkdir -p /run/sshd
|
RUN mkdir -p /run/sshd
|
||||||
|
|
||||||
ARG user=jenkins
|
ARG user=jenkins
|
||||||
ARG group=jenkins
|
ARG group=jenkins
|
||||||
ARG uid=1000
|
ARG uid=1000
|
||||||
ARG gid=1000
|
ARG gid=1000
|
||||||
ARG AGENT_WORKDIR=/home/${user}/agent
|
ARG AGENT_WORKDIR=/home/${user}/agent
|
||||||
|
|
||||||
RUN mkdir -p /scripts
|
RUN mkdir -p /scripts
|
||||||
|
|
||||||
# install the swarm client
|
# install the swarm client
|
||||||
RUN cd /scripts ;\
|
RUN cd /scripts ;\
|
||||||
wget https://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/swarm-client/3.17/swarm-client-3.17.jar ;\
|
wget https://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/swarm-client/3.17/swarm-client-3.17.jar ;\
|
||||||
mv swarm-client-3.17.jar swarm-client.jar
|
mv swarm-client-3.17.jar swarm-client.jar
|
||||||
|
|
||||||
COPY start_agent.sh report_results.sh /scripts/
|
COPY start_agent.sh report_results.sh /scripts/
|
||||||
|
|
||||||
# install python dependencies for the scripts
|
# install python dependencies for the scripts
|
||||||
RUN pip3 install -r https://raw.githubusercontent.com/google/llvm-premerge-checks/master/scripts/phabtalk/requirements.txt
|
# ADD will checks that contentent of a file has changed.
|
||||||
|
ADD "https://raw.githubusercontent.com/google/llvm-premerge-checks/master/scripts/phabtalk/requirements.txt" requirements.txt
|
||||||
RUN groupadd -g ${gid} ${group} ;\
|
RUN pip3 install -r requirements.txt
|
||||||
useradd -c "Jenkins user" -d /home/${user} -u ${uid} -g ${gid} -m ${user} ;\
|
|
||||||
mkdir /home/${user}/ccache
|
RUN groupadd -g ${gid} ${group} ;\
|
||||||
|
useradd -c "Jenkins user" -d /home/${user} -u ${uid} -g ${gid} -m ${user} ;\
|
||||||
RUN chown -R ${user}:${user} /home/${user}
|
mkdir /home/${user}/ccache
|
||||||
|
|
||||||
WORKDIR /home/${user}
|
RUN chown -R ${user}:${user} /home/${user}
|
||||||
ENV CCACHE_PATH=/mnt/disks/ssd0/ccache
|
|
||||||
|
WORKDIR /home/${user}
|
||||||
# configure locale
|
ENV CCACHE_PATH=/mnt/disks/ssd0/ccache
|
||||||
RUN sed --in-place '/en_US.UTF-8/s/^#//' /etc/locale.gen ;\
|
|
||||||
locale-gen
|
# configure locale
|
||||||
ENV LANG en_US.UTF-8
|
RUN sed --in-place '/en_US.UTF-8/s/^#//' /etc/locale.gen ;\
|
||||||
ENV LANGUAGE en_US:en
|
locale-gen
|
||||||
ENV LC_ALL en_US.UTF-8
|
ENV LANG en_US.UTF-8
|
||||||
|
ENV LANGUAGE en_US:en
|
||||||
CMD ["/scripts/start_agent.sh"]
|
ENV LC_ALL en_US.UTF-8
|
||||||
|
|
||||||
|
CMD ["/scripts/start_agent.sh"]
|
||||||
|
|
||||||
|
|
|
@ -27,4 +27,4 @@ QUALIFIED_NAME="${GCR_HOSTNAME}/${GCP_PROJECT}/${IMAGE_NAME}"
|
||||||
cd "${DIR}/${IMAGE_NAME}"
|
cd "${DIR}/${IMAGE_NAME}"
|
||||||
docker build -t ${IMAGE_NAME} .
|
docker build -t ${IMAGE_NAME} .
|
||||||
docker tag ${IMAGE_NAME} ${QUALIFIED_NAME}
|
docker tag ${IMAGE_NAME} ${QUALIFIED_NAME}
|
||||||
docker push ${QUALIFIED_NAME}
|
docker push ${QUALIFIED_NAME}
|
|
@ -6,11 +6,14 @@
|
||||||
General remarks:
|
General remarks:
|
||||||
* GCP does not route any traffic to your services unless the service is "healthy". It might take a few minutes after startup before the services is classified as healthy. Until then you will only see some generic error message.
|
* GCP does not route any traffic to your services unless the service is "healthy". It might take a few minutes after startup before the services is classified as healthy. Until then you will only see some generic error message.
|
||||||
|
|
||||||
These are the steps to set up the build server on a clean infrastructure:
|
These are the steps to set up the build server on a clean infrastructure:
|
||||||
1. Configure the tools on your local machine:
|
1. Configure the tools on your local machine:
|
||||||
```bash
|
```bash
|
||||||
./local_setup.sh
|
./local_setup.sh
|
||||||
```
|
```
|
||||||
|
If you not running docker under your user, you might need to
|
||||||
|
`sudo gcloud auth login --no-launch-browser && gcloud auth configure-docker`
|
||||||
|
before running other commands under sudo.
|
||||||
1. Delete the old cluster, if it still exists:
|
1. Delete the old cluster, if it still exists:
|
||||||
```bash
|
```bash
|
||||||
cd kubernetes/cluster
|
cd kubernetes/cluster
|
||||||
|
|
Loading…
Reference in a new issue