From e13822f0f59f7aad9c2940b29cc5bfd5bc5f18b0 Mon Sep 17 00:00:00 2001 From: Mikhail Goncharov Date: Thu, 23 Jan 2020 16:14:12 +0100 Subject: [PATCH] Use llvm-10 on phabricator agent - removed 'clang8' from the image name; - added --no-cache to ./build_deploy.sh to make sure that image will use most recent packages. Tested locally --- .../Dockerfile | 3 ++- .../report_results.sh | 0 .../start_agent.sh | 0 containers/build_deploy.sh | 2 +- containers/build_run.sh | 2 +- docs/playbooks.md | 2 +- kubernetes/jenkins.yaml | 6 +++--- 7 files changed, 8 insertions(+), 7 deletions(-) rename containers/{agent-debian-testing-clang8-ssd => agent-debian-testing-ssd}/Dockerfile (89%) rename containers/{agent-debian-testing-clang8-ssd => agent-debian-testing-ssd}/report_results.sh (100%) rename containers/{agent-debian-testing-clang8-ssd => agent-debian-testing-ssd}/start_agent.sh (100%) diff --git a/containers/agent-debian-testing-clang8-ssd/Dockerfile b/containers/agent-debian-testing-ssd/Dockerfile similarity index 89% rename from containers/agent-debian-testing-clang8-ssd/Dockerfile rename to containers/agent-debian-testing-ssd/Dockerfile index a4bf8f5..c38bc82 100644 --- a/containers/agent-debian-testing-clang8-ssd/Dockerfile +++ b/containers/agent-debian-testing-ssd/Dockerfile @@ -1,6 +1,7 @@ FROM debian:testing -RUN apt-get update ;\ +RUN echo "deb [trusted=yes] http://apt.llvm.org/buster/ llvm-toolchain-buster main\n$(cat /etc/apt/sources.list)" > /etc/apt/sources.list;\ # add LLVM 10 deb pkg to sources + apt-get update ;\ apt-get install -y --no-install-recommends locales \ cmake ninja-build git ca-certificates clang lld ccache python3 build-essential \ clang-tidy clang-format \ diff --git a/containers/agent-debian-testing-clang8-ssd/report_results.sh b/containers/agent-debian-testing-ssd/report_results.sh similarity index 100% rename from containers/agent-debian-testing-clang8-ssd/report_results.sh rename to containers/agent-debian-testing-ssd/report_results.sh diff --git a/containers/agent-debian-testing-clang8-ssd/start_agent.sh b/containers/agent-debian-testing-ssd/start_agent.sh similarity index 100% rename from containers/agent-debian-testing-clang8-ssd/start_agent.sh rename to containers/agent-debian-testing-ssd/start_agent.sh diff --git a/containers/build_deploy.sh b/containers/build_deploy.sh index 93bd09c..70167ad 100755 --- a/containers/build_deploy.sh +++ b/containers/build_deploy.sh @@ -25,6 +25,6 @@ IMAGE_NAME="${1%/}" QUALIFIED_NAME="${GCR_HOSTNAME}/${GCP_PROJECT}/${IMAGE_NAME}" cd "${DIR}/${IMAGE_NAME}" -docker build -t ${IMAGE_NAME} . +docker build -t --no-cache ${IMAGE_NAME} . docker tag ${IMAGE_NAME} ${QUALIFIED_NAME} docker push ${QUALIFIED_NAME} \ No newline at end of file diff --git a/containers/build_run.sh b/containers/build_run.sh index 36e8f9b..4ae154f 100755 --- a/containers/build_run.sh +++ b/containers/build_run.sh @@ -14,7 +14,7 @@ # limitations under the License. # Starts a new instances of a docker image. Example: -# sudo build_run.sh agent-debian-testing-clang8-ssd /bin/bash +# sudo build_run.sh agent-debian-testing-ssd /bin/bash set -eux DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" diff --git a/docs/playbooks.md b/docs/playbooks.md index bf23b77..bdfb9e9 100644 --- a/docs/playbooks.md +++ b/docs/playbooks.md @@ -137,7 +137,7 @@ Invoke-WebRequest -uri 'https://raw.githubusercontent.com/google/llvm-premerge-c ## Testing scripts locally -Build and run agent docker image `sudo ./containers/build_run.sh agent-debian-testing-clang8-ssd /bin/bash`. +Build and run agent docker image `sudo ./containers/build_run.sh agent-debian-testing-ssd /bin/bash`. Within a container set environment variables similar to [pipeline](https://github.com/google/llvm-premerge-checks/blob/master/Jenkins/Phabricator-pipeline/Jenkinsfile). diff --git a/kubernetes/jenkins.yaml b/kubernetes/jenkins.yaml index 65f62cd..ba2b9be 100644 --- a/kubernetes/jenkins.yaml +++ b/kubernetes/jenkins.yaml @@ -151,18 +151,18 @@ spec: apiVersion: extensions/v1beta1 kind: Deployment metadata: - name: agent-debian-testing-clang8-ssd + name: agent-debian-testing-ssd namespace: jenkins spec: replicas: 2 template: metadata: labels: - app: agent-debian-testing-clang8-ssd + app: agent-debian-testing-ssd spec: containers: - name: agent-debian-testing-clang8 - image: gcr.io/llvm-premerge-checks/agent-debian-testing-clang8-ssd + image: gcr.io/llvm-premerge-checks/agent-debian-testing-ssd ports: - containerPort: 22 resources: