|
| 1 | +# Copyright 2025 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 | +# TODO(https://github.com/googleapis/google-cloud-python/issues/14142): |
| 16 | +# Reduce this timeout by moving the installation of Python runtimes to a separate base image |
| 17 | +timeout: 7200s # 2 hours for the first uncached run, can be lowered later. |
| 18 | +steps: |
| 19 | + # A single step using the Kaniko executor to build and cache |
| 20 | + - name: 'gcr.io/kaniko-project/executor:latest' |
| 21 | + args: |
| 22 | + # Specifies the Dockerfile path |
| 23 | + - '--dockerfile=.generator/Dockerfile' |
| 24 | + # Specifies the build context directory |
| 25 | + - '--context=.' |
| 26 | + # The final destination for the image |
| 27 | + - '--destination=gcr.io/$PROJECT_ID/python-librarian-generator:latest' |
| 28 | + # Enables Kaniko's remote registry caching |
| 29 | + - '--cache=true' |
| 30 | + # (Optional but recommended) Sets a time-to-live for cache layers |
| 31 | + - '--cache-ttl=24h' |
| 32 | + |
| 33 | +# The 'images' section is no longer needed because Kaniko pushes the image itself. |
| 34 | + |
| 35 | +options: |
| 36 | + default_logs_bucket_behavior: REGIONAL_USER_OWNED_BUCKET |
| 37 | + machineType: E2_HIGHCPU_32 |
0 commit comments