1+ # Copyright 2024 Google LLC
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+
15+ # Add required env vars here.
16+ required_envvars+=(
17+ )
18+
19+ # Add env vars which are passed down into the container here.
20+ pass_down_envvars+=(
21+ "NOX_SESSION"
22+ ###############
23+ # Docs builds
24+ ###############
25+ "STAGING_BUCKET"
26+ "V2_STAGING_BUCKET"
27+ ##################
28+ # Samples builds
29+ ##################
30+ "INSTALL_LIBRARY_FROM_SOURCE"
31+ "RUN_TESTS_SESSION"
32+ "BUILD_SPECIFIC_GCLOUD_PROJECT"
33+ # Target directories.
34+ "RUN_TESTS_DIRS"
35+ # The nox session to run.
36+ "RUN_TESTS_SESSION"
37+ )
38+
39+ # Prevent unintentional override on the default image.
40+ if [[ "${TRAMPOLINE_IMAGE_UPLOAD:-false}" == "true" ]] && \
41+ [[ -z "${TRAMPOLINE_IMAGE:-}" ]]; then
42+ echo "Please set TRAMPOLINE_IMAGE if you want to upload the Docker image."
43+ exit 1
44+ fi
45+
46+ # Define the default value if it makes sense.
47+ if [[ -z "${TRAMPOLINE_IMAGE_UPLOAD:-}" ]]; then
48+ TRAMPOLINE_IMAGE_UPLOAD=""
49+ fi
50+
51+ if [[ -z "${TRAMPOLINE_IMAGE:-}" ]]; then
52+ TRAMPOLINE_IMAGE=""
53+ fi
54+
55+ if [[ -z "${TRAMPOLINE_DOCKERFILE:-}" ]]; then
56+ TRAMPOLINE_DOCKERFILE=""
57+ fi
58+
59+ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then
60+ TRAMPOLINE_BUILD_FILE=""
61+ fi
0 commit comments