[
https://issues.apache.org/jira/browse/BEAM-3954?focusedWorklogId=136269&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-136269
]
ASF GitHub Bot logged work on BEAM-3954:
----------------------------------------
Author: ASF GitHub Bot
Created on: 20/Aug/18 20:29
Start Date: 20/Aug/18 20:29
Worklog Time Spent: 10m
Work Description: yifanzou closed pull request #6243: Do Not Merge
[BEAM-3954] Create reproducible environment for Jenkins build
URL: https://github.com/apache/beam/pull/6243
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/.test-infra/dockerized-jenkins/build-env/Dockerfile
b/.test-infra/dockerized-jenkins/build-env/Dockerfile
new file mode 100644
index 00000000000..c26f1abe6ad
--- /dev/null
+++ b/.test-infra/dockerized-jenkins/build-env/Dockerfile
@@ -0,0 +1,69 @@
+###############################################################################
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+###############################################################################
+
+FROM openjdk:8-jdk
+MAINTAINER Beam [email protected]
+
+# Install dependencies for Jenkins Python tests
+RUN apt-get update && \
+ apt-get install -y \
+ python-pip \
+ python-virtualenv \
+ python-dev \
+ python-tox \
+ maven \
+ rsync \
+ time \
+ && rm -rf /var/lib/apt/lists/*
+
+RUN wget
https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-189.0.0-linux-x86_64.tar.gz
-O gcloud.tar.gz && \
+tar xf gcloud.tar.gz && \
+./google-cloud-sdk/install.sh --quiet
+ENV PATH="/google-cloud-sdk/bin:${PATH}"
+RUN gcloud components update --quiet || echo 'gcloud components update failed'
&& \
+ rm gcloud.tar.gz
+
+# Add the entrypoint script which install gcloud sdk
+#COPY docker-entrypoint.sh /usr/local/bin/
+#RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh
+#ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
+
+# Create beam user to validate the build on user space
+ENV USER=user \
+ UID=1001 \
+ GID=1002 \
+ HOME=/home/user
+RUN groupadd --system --gid=$GID $USER; \
+ useradd --system --uid=$UID --gid $USER $USER;
+RUN mkdir -p $HOME; \
+ chown -R $USER:$USER $HOME; \
+ chmod 777 $HOME;
+USER $USER
+WORKDIR $HOME
+#COPY my-first-project-190318.json $HOME/credentials.json
+#RUN gcloud auth activate-service-account --key-file=credentials.json && \
+# gcloud config set project my-first-project-190318 && \
+# rm credentials.json
+
+
+#ARG URL=https://github.com/apache/beam
+#
+#RUN git clone $URL beam; \
+# cd beam; \
+# git config --local --add remote.origin.fetch
'+refs/pull/*/head:refs/remotes/origin/pr/*'; \
+# git fetch --quiet --all;
diff --git a/.test-infra/jenkins/PrecommitJobBuilder.groovy
b/.test-infra/jenkins/PrecommitJobBuilder.groovy
index 37c46c35728..3580d864340 100644
--- a/.test-infra/jenkins/PrecommitJobBuilder.groovy
+++ b/.test-infra/jenkins/PrecommitJobBuilder.groovy
@@ -97,6 +97,11 @@ class PrecommitJobBuilder {
'master',
timeoutMins,
allowRemotePoll) // needed for included regions PR triggering; see
[JENKINS-23606]
+ wrappers {
+ buildInDocker {
+ dockerfile('src/.test-infra/jenkins/', 'Dockerfile')
+ }
+ }
steps {
gradle {
rootBuildScriptDir(commonJobProperties.checkoutDir)
diff --git a/.test-infra/jenkins/job_docker_test.groovy
b/.test-infra/jenkins/job_docker_test.groovy
new file mode 100644
index 00000000000..1f624e41890
--- /dev/null
+++ b/.test-infra/jenkins/job_docker_test.groovy
@@ -0,0 +1,33 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+job('beam_PostRelease_Python_Candidate') {
+ wrappers {
+ buildInDocker {
+ dockerfile('src/.test-infra/jenkins/', 'Dockerfile')
+ }
+ }
+
+ // Execute shell command to test Python SDK.
+ // ./release/src/main/groovy/run_release_candidate_python_quickstart.sh
+ steps {
+ shell('./gradlew :pythonPreCommit --info --continue')
+ }
+
+}
\ No newline at end of file
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 136269)
Time Spent: 2h 40m (was: 2.5h)
> Get Jenkins agents dockerized
> ------------------------------
>
> Key: BEAM-3954
> URL: https://issues.apache.org/jira/browse/BEAM-3954
> Project: Beam
> Issue Type: Sub-task
> Components: build-system
> Reporter: yifan zou
> Assignee: yifan zou
> Priority: Major
> Time Spent: 2h 40m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)