From 6a9e7b117ba9b378429d5d5434c65d4872f99b35 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Tue, 2 Mar 2021 12:44:43 -0500 Subject: [PATCH] [libc++] Remove the Docker files for BuildBot We don't use them anymore since we're using the BuildKite setup. Differential Revision: https://reviews.llvm.org/D97779 --- libcxx/utils/docker/README.txt | 0 libcxx/utils/docker/debian9/buildbot/Dockerfile | 39 -------- .../docker/debian9/buildbot/buildbot-auth.json | 4 - .../docker/debian9/buildbot/docker-compose.yml | 19 ---- .../debian9/buildbot/install-gcloud-agents.sh | 11 -- .../docker/debian9/buildbot/install-packages.sh | 40 -------- .../utils/docker/debian9/buildbot/run_buildbot.sh | 111 --------------------- 7 files changed, 224 deletions(-) delete mode 100644 libcxx/utils/docker/README.txt delete mode 100644 libcxx/utils/docker/debian9/buildbot/Dockerfile delete mode 100644 libcxx/utils/docker/debian9/buildbot/buildbot-auth.json delete mode 100644 libcxx/utils/docker/debian9/buildbot/docker-compose.yml delete mode 100755 libcxx/utils/docker/debian9/buildbot/install-gcloud-agents.sh delete mode 100755 libcxx/utils/docker/debian9/buildbot/install-packages.sh delete mode 100755 libcxx/utils/docker/debian9/buildbot/run_buildbot.sh diff --git a/libcxx/utils/docker/README.txt b/libcxx/utils/docker/README.txt deleted file mode 100644 index e69de29..0000000 diff --git a/libcxx/utils/docker/debian9/buildbot/Dockerfile b/libcxx/utils/docker/debian9/buildbot/Dockerfile deleted file mode 100644 index 7da5068..0000000 --- a/libcxx/utils/docker/debian9/buildbot/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ - -#===-------------------------------------------------------------------------------------------===// -# buildslave -#===-------------------------------------------------------------------------------------------===// -ARG gcc_tot -ARG llvm_tot - -FROM ${gcc_tot} AS gcc-tot -FROM ${llvm_tot} AS llvm-tot - -FROM debian:stretch AS base-image - -ADD install-packages.sh /tmp/ -RUN /tmp/install-packages.sh && rm /tmp/install-packages.sh - -COPY --from=ericwf/gcc:5.5.0 /compiler /opt/gcc-5 - -FROM base-image as worker-image - -COPY --from=gcc-tot /compiler /opt/gcc-tot -COPY --from=llvm-tot /compiler /opt/llvm-tot - -ENV PATH /opt/llvm-tot/bin:$PATH - -RUN clang++ --version && echo hello -RUN g++ --version - - -RUN /opt/gcc-tot/bin/g++ --version -RUN /opt/llvm-tot/bin/clang++ --version -RUN /opt/llvm-tot/bin/clang --version - -# FIXME(EricWF): remove this once the buildbot's config doesn't clobber the path. -RUN ln -s /opt/llvm-tot/bin/clang /usr/local/bin/clang -RUN ln -s /opt/llvm-tot/bin/clang++ /usr/local/bin/clang++ - - -ADD run_buildbot.sh / -CMD /run_buildbot.sh /run/secrets/buildbot-auth diff --git a/libcxx/utils/docker/debian9/buildbot/buildbot-auth.json b/libcxx/utils/docker/debian9/buildbot/buildbot-auth.json deleted file mode 100644 index 5e91e2d..0000000 --- a/libcxx/utils/docker/debian9/buildbot/buildbot-auth.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "login": "", - "password": "" -} diff --git a/libcxx/utils/docker/debian9/buildbot/docker-compose.yml b/libcxx/utils/docker/debian9/buildbot/docker-compose.yml deleted file mode 100644 index bd61dea..0000000 --- a/libcxx/utils/docker/debian9/buildbot/docker-compose.yml +++ /dev/null @@ -1,19 +0,0 @@ -version: '3.7' -services: - llvm-buildbot-worker: - build: - context: https://github.com/llvm/llvm-project.git#master:libcxx/utils/docker/debian9/buildbot - args: - gcc_tot: "ericwf/gcc:9.2.0" - llvm_tot: "ericwf/llvm:11.x" - image: llvm-buildbot-worker - volumes: - - /var/run/docker.sock:/var/run/docker.sock - secrets: - - buildbot-auth - logging: - driver: gcplogs - -secrets: - buildbot-auth: - file: buildbot-auth.json diff --git a/libcxx/utils/docker/debian9/buildbot/install-gcloud-agents.sh b/libcxx/utils/docker/debian9/buildbot/install-gcloud-agents.sh deleted file mode 100755 index d2656ca..0000000 --- a/libcxx/utils/docker/debian9/buildbot/install-gcloud-agents.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -cd /tmp/ - -curl -sSO https://dl.google.com/cloudagents/install-monitoring-agent.sh -sudo bash install-monitoring-agent.sh -rm install-monitoring-agent.sh - -curl -sSO https://dl.google.com/cloudagents/install-logging-agent.sh -sudo bash install-logging-agent.sh -rm install-logging-agent.sh diff --git a/libcxx/utils/docker/debian9/buildbot/install-packages.sh b/libcxx/utils/docker/debian9/buildbot/install-packages.sh deleted file mode 100755 index 56e7c00..0000000 --- a/libcxx/utils/docker/debian9/buildbot/install-packages.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash - -set -x -set -e - -apt-get update && \ - apt-get install -y --no-install-recommends \ - buildbot-slave \ - ca-certificates \ - gnupg \ - build-essential \ - wget \ - unzip \ - python \ - ninja-build \ - curl \ - git \ - gcc-multilib \ - g++-multilib \ - libc6-dev \ - libtool \ - locales-all \ - binutils-dev \ - binutils-gold \ - software-properties-common \ - gnupg \ - apt-transport-https \ - sudo \ - bash-completion \ - vim \ - jq \ - systemd \ - sysvinit-utils \ - systemd-sysv && \ - rm -rf /var/lib/apt/lists/* - -# Install a recent CMake -yes | apt-get purge cmake -wget https://github.com/Kitware/CMake/releases/download/v3.18.2/cmake-3.18.2-Linux-x86_64.sh -O /tmp/install-cmake.sh -bash /tmp/install-cmake.sh --prefix=/usr --exclude-subdir --skip-license diff --git a/libcxx/utils/docker/debian9/buildbot/run_buildbot.sh b/libcxx/utils/docker/debian9/buildbot/run_buildbot.sh deleted file mode 100755 index e008a30..0000000 --- a/libcxx/utils/docker/debian9/buildbot/run_buildbot.sh +++ /dev/null @@ -1,111 +0,0 @@ -#!/usr/bin/env bash -set -x - -readonly BOT_ROOT=/b -readonly AUTH_FILE=$1 -readonly BOT_ROOT_NAME=$(jq -r ".login" $AUTH_FILE) - -systemctl daemon-reload -service buildslave stop -mkdir -p /b -rm -rf /b/* -service buildslave stop - -pushd /tmp/ - -curl -sSO https://dl.google.com/cloudagents/install-monitoring-agent.sh -sudo bash install-monitoring-agent.sh -rm install-monitoring-agent.sh - -curl -sSO https://dl.google.com/cloudagents/install-logging-agent.sh -sudo bash install-logging-agent.sh -rm install-logging-agent.sh - -popd - - -systemctl set-property buildslave.service TasksMax=100000 - -function setup_numbered_bot() { - local BOT_NAME=$1 - local BOT_DIR=$2 - mkdir -p $BOT_DIR - - buildslave stop $BOT_DIR - chown buildbot $BOT_DIR - rm -rf $BOT_DIR/* - - buildslave create-slave --allow-shutdown=signal "$BOT_DIR" "lab.llvm.org:9990" "$BOT_NAME" $(jq -r ".password" $AUTH_FILE) - - echo "Eric Fiselier " > $BOT_DIR/info/admin - - echo "Connecting as $1" - { - uname -a | head -n1 - cmake --version | head -n1 - g++ --version | head -n1 - clang++ --version | head -n1 - ld --version | head -n1 - date - lscpu - } > $BOT_DIR/info/host - - -#echo "SLAVE_RUNNER=/usr/bin/buildslave -#SLAVE_ENABLED[1]=\"1\" -#SLAVE_NAME[1]=\"$BOT_NAME\" -#SLAVE_USER[1]=\"buildbot\" -#SLAVE_BASEDIR[1]=\"$BOT_DIR\" -#SLAVE_OPTIONS[1]=\"\" -#SLAVE_PREFIXCMD[1]=\"\"" > $BOT_DIR/buildslave.cfg - - ls $BOT_DIR/ - cat $BOT_DIR/buildbot.tac -} - -function try_start_builder { - local N=$1 - local BOT_DIR="$BOT_ROOT/b$N" - local BOT_NAME="$BOT_ROOT_NAME$N" - - systemctl daemon-reload - service buildslave restart - setup_numbered_bot "$BOT_NAME" "$BOT_DIR" - - systemctl daemon-reload - service buildslave restart - - chown -R buildbot $BOT_DIR/ - sudo -u buildbot /usr/bin/buildslave start $BOT_DIR/ - - sleep 30 - cat $BOT_DIR/twistd.log - if grep --quiet "slave is ready" $BOT_DIR/twistd.log; then - return 0 - fi - if grep --quiet "configuration update complete" $BOT_DIR/twistd.log; then - return 0 - fi - if grep "rejecting duplicate slave" $BOT_DIR/twistd.log; then - return 1 - fi - echo "Unknown error" - cat $BOT_DIR/twistd.log - exit 1 -} - -for N in `shuf -i 1-5` -do - if try_start_builder $N; then - break - fi - echo "failed to start any buildbot" - shutdown now -done - -# GCE can restart instance after 24h in the middle of the build. -# Gracefully restart before that happen. -sleep 72000 -while pkill -SIGHUP buildslave; do sleep 5; done; -shutdown now - -- 2.7.4