From 4bfb26e10536e86847f249dd66b8a64bf3bcbfaf Mon Sep 17 00:00:00 2001 From: Oliver Chang Date: Fri, 10 Mar 2017 14:33:15 -0800 Subject: [PATCH] blah --- infra/jenkins-cluster/Dockerfile | 17 +++++++++++++++++ infra/jenkins-cluster/deployment-jenkins.yaml | 11 ++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 infra/jenkins-cluster/Dockerfile diff --git a/infra/jenkins-cluster/Dockerfile b/infra/jenkins-cluster/Dockerfile new file mode 100644 index 000000000..e58745c1b --- /dev/null +++ b/infra/jenkins-cluster/Dockerfile @@ -0,0 +1,17 @@ +FROM jenkinsci/jenkins +USER root + +RUN mkdir /var/secrets +RUN apt-get -y update && apt-get -y upgrade +RUN apt-get -y install python-dev virtualenv python-pip build-essential + +WORKDIR / +RUN wget https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.zip +RUN unzip google-cloud-sdk.zip + +RUN /google-cloud-sdk/install.sh --usage-reporting=false --bash-completion=false --disable-installation-options +RUN /google-cloud-sdk/bin/gcloud -q components install alpha beta +RUN /google-cloud-sdk/bin/gcloud -q components update + +RUN chown -R jenkins /google-cloud-sdk +ENV PATH=$PATH:/google-cloud-sdk/bin diff --git a/infra/jenkins-cluster/deployment-jenkins.yaml b/infra/jenkins-cluster/deployment-jenkins.yaml index 009b315c6..4616e25b4 100644 --- a/infra/jenkins-cluster/deployment-jenkins.yaml +++ b/infra/jenkins-cluster/deployment-jenkins.yaml @@ -12,7 +12,7 @@ spec: spec: containers: - name: jenkins - image: jenkinsci/jenkins + image: gcr.io/clusterfuzz-external/jenkins:latest env: - name: JAVA_OPTS value: "-Duser.timezone=America/Los_Angeles -Dhudson.security.csrf.requestfield=Jenkins-Crumb" @@ -22,6 +22,9 @@ spec: volumeMounts: - name: jenkins-home mountPath: "/var/jenkins_home" + - name: secrets + mountPath: "/var/secrets" + readOnly: true livenessProbe: httpGet: path: "/login" @@ -43,3 +46,9 @@ spec: gcePersistentDisk: pdName: jenkins-home fsType: ext4 + - name: secrets + secret: + secretName: builder-service-account + items: + - key: build-service-account.json + path: build-service-account.json