Skip to content

Commit 73f799b

Browse files
authored
build: add GCB config for the generate command (#1624)
Fixes #1568
1 parent e2a6798 commit 73f799b

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

infra/prod/generate-worker.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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+
# This Cloud Build configuration is used by a Louhi flow for the Artifact
15+
# Registry (AR) Exit Gate process (go/cloud-sdk-ar-exit-gate-onboarding).
16+
#
17+
# This runs the `librarian generate` command with a provided repository,
18+
# secret name, and optional library ID
19+
steps:
20+
- name: gcr.io/cloud-builders/git
21+
id: clone-language-repo
22+
waitFor: ['-']
23+
args:
24+
- 'clone'
25+
- '--depth=1'
26+
- https://github.com/googleapis/$_REPOSITORY
27+
- name: gcr.io/cloud-builders/git
28+
id: clone-googleapis
29+
waitFor: ['-']
30+
args:
31+
- 'clone'
32+
- '--single-branch'
33+
- '--branch=master'
34+
- https://github.com/googleapis/googleapis
35+
- name: 'us-central1-docker.pkg.dev/cloud-sdk-production-pipeline/images-prod/librarian@sha256:dac8d6d46eefecde4241c88348315e6162ccd0d39e84db2b98e4da7393f65c29'
36+
id: generate
37+
waitFor: ['clone-language-repo', 'clone-googleapis']
38+
args:
39+
- 'generate'
40+
- '-repo'
41+
- '/workspace/$_REPOSITORY'
42+
- '-library'
43+
- $_LIBRARY_ID
44+
- '-api-source'
45+
- '/workspace/googleapis'
46+
secretEnv: ['LIBRARIAN_GITHUB_TOKEN']
47+
tags: ['generate-$_REPOSITORY']
48+
availableSecrets:
49+
secretManager:
50+
- versionName: projects/$PROJECT_ID/secrets/$_GITHUB_TOKEN_SECRET_NAME/versions/latest
51+
env: 'LIBRARIAN_GITHUB_TOKEN'
52+
options:
53+
logging: CLOUD_LOGGING_ONLY

0 commit comments

Comments
 (0)