Skip to content

Commit dc31b7f

Browse files
Merge branch 'master' into patch-2
2 parents 41f2a26 + d671543 commit dc31b7f

File tree

118 files changed

+1484
-434
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+1484
-434
lines changed

.kokoro/docker/Dockerfile

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ RUN rm /tmp/get-pip.py
150150
RUN pip install --no-cache-dir virtualenv
151151

152152
# Setup Cloud SDK
153-
ENV CLOUD_SDK_VERSION 272.0.0
153+
ENV CLOUD_SDK_VERSION 293.0.0
154154
# Use system python for cloud sdk.
155155
ENV CLOUDSDK_PYTHON python3.6
156156
RUN wget https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-$CLOUD_SDK_VERSION-linux-x86_64.tar.gz
@@ -161,4 +161,19 @@ ENV PATH /google-cloud-sdk/bin:$PATH
161161
# Enable redis-server on boot.
162162
RUN sudo systemctl enable redis-server.service
163163

164+
# Create a user and allow sudo
165+
166+
# kbuilder uid on the default Kokoro image
167+
ARG UID=1000
168+
ARG USERNAME=kbuilder
169+
170+
# Add a new user to the container image.
171+
# This is needed for ssh and sudo access.
172+
173+
# Add a new user with the caller's uid and the username.
174+
RUN useradd -d /h -u ${UID} ${USERNAME}
175+
176+
# Allow nopasswd sudo
177+
RUN echo "${USERNAME} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
178+
164179
CMD ["python3.6"]

.kokoro/lint/common.cfg

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
# Configure the docker image for kokoro-trampoline.
1818
env_vars: {
1919
key: "TRAMPOLINE_IMAGE"
20-
value: "gcr.io/cloud-devrel-kokoro-resources/python"
20+
value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker"
2121
}
2222

2323
# Download trampoline resources.
2424
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
2525

2626
# Use the trampoline script to run in docker.
27-
build_file: "python-docs-samples/.kokoro/trampoline.sh"
27+
build_file: "python-docs-samples/.kokoro/trampoline_v2.sh"
2828

2929
# Download secrets from Cloud Storage.
3030
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
@@ -41,3 +41,8 @@ env_vars: {
4141
key: "RUN_TESTS_SESSION"
4242
value: "lint"
4343
}
44+
45+
env_vars: {
46+
key: "TRAMPOLINE_DOCKERFILE"
47+
value: ".kokoro/docker/Dockerfile"
48+
}

.kokoro/lint/continuous.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
# Tell the trampoline which build file to use.
1818
env_vars: {
1919
key: "TRAMPOLINE_BUILD_FILE"
20-
value: "github/python-docs-samples/.kokoro/tests/run_tests_diff_head.sh"
20+
value: ".kokoro/tests/run_tests_diff_head.sh"
2121
}

.kokoro/lint/periodic.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
# Tell the trampoline which build file to use.
1818
env_vars: {
1919
key: "TRAMPOLINE_BUILD_FILE"
20-
value: "github/python-docs-samples/.kokoro/tests/run_tests.sh"
20+
value: ".kokoro/tests/run_tests.sh"
2121
}

.kokoro/lint/presubmit.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
# Tell the trampoline which build file to use.
1818
env_vars: {
1919
key: "TRAMPOLINE_BUILD_FILE"
20-
value: "github/python-docs-samples/.kokoro/tests/run_tests_diff_master.sh"
20+
value: ".kokoro/tests/run_tests_diff_master.sh"
2121
}

.kokoro/python2.7/common.cfg

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ env_vars: {
2626
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
2727

2828
# Use the trampoline script to run in docker.
29-
build_file: "python-docs-samples/.kokoro/trampoline.sh"
29+
build_file: "python-docs-samples/.kokoro/trampoline_v2.sh"
3030

3131
# Download secrets from Cloud Storage.
3232
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
@@ -44,9 +44,13 @@ env_vars: {
4444
value: "py-2.7"
4545
}
4646

47-
# Declare build specific Cloud project. It still uses the common one,
48-
# but we'll update the value once we have more Cloud projects.
47+
# Declare build specific Cloud project.
4948
env_vars: {
5049
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
5150
value: "python-docs-samples-tests"
5251
}
52+
53+
env_vars: {
54+
key: "TRAMPOLINE_DOCKERFILE"
55+
value: ".kokoro/docker/Dockerfile"
56+
}

.kokoro/python2.7/continuous.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
# Tell the trampoline which build file to use.
1818
env_vars: {
1919
key: "TRAMPOLINE_BUILD_FILE"
20-
value: "github/python-docs-samples/.kokoro/tests/run_tests_diff_head.sh"
20+
value: ".kokoro/tests/run_tests_diff_head.sh"
2121
}

.kokoro/python2.7/periodic.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
# Tell the trampoline which build file to use.
1818
env_vars: {
1919
key: "TRAMPOLINE_BUILD_FILE"
20-
value: "github/python-docs-samples/.kokoro/tests/run_tests.sh"
20+
value: ".kokoro/tests/run_tests.sh"
2121
}
2222

2323
env_vars: {
2424
key: "REPORT_TO_BUILD_COP_BOT"
25-
value: "True"
25+
value: "true"
2626
}

.kokoro/python2.7/presubmit.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
# Tell the trampoline which build file to use.
1818
env_vars: {
1919
key: "TRAMPOLINE_BUILD_FILE"
20-
value: "github/python-docs-samples/.kokoro/tests/run_tests_diff_master.sh"
20+
value: ".kokoro/tests/run_tests_diff_master.sh"
2121
}

.kokoro/python3.6/common.cfg

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ env_vars: {
2626
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
2727

2828
# Use the trampoline script to run in docker.
29-
build_file: "python-docs-samples/.kokoro/trampoline.sh"
29+
build_file: "python-docs-samples/.kokoro/trampoline_v2.sh"
3030

3131
# Download secrets from Cloud Storage.
3232
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
@@ -50,3 +50,8 @@ env_vars: {
5050
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
5151
value: "python-docs-samples-tests-py36"
5252
}
53+
54+
env_vars: {
55+
key: "TRAMPOLINE_DOCKERFILE"
56+
value: ".kokoro/docker/Dockerfile"
57+
}

0 commit comments

Comments
 (0)