e04ed9c211
CF: Deploy Dev Docs / deploy (push) Waiting to run
Sync Labels / build (push) Waiting to run
tests / unit tests (macos-latest) (push) Waiting to run
tests / unit tests (ubuntu-latest) (push) Waiting to run
tests / unit tests (windows-latest) (push) Waiting to run
58 lines
1.9 KiB
YAML
58 lines
1.9 KiB
YAML
# Copyright 2026 Google LLC
|
|
#
|
|
# Licensed 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.
|
|
|
|
steps:
|
|
- name: "${_IMAGE}"
|
|
id: "go-pre-post-processing-test"
|
|
entrypoint: "bash"
|
|
args:
|
|
- -c
|
|
- |
|
|
set -ex
|
|
chmod +x .ci/sample_tests/run_tests.sh
|
|
.ci/sample_tests/run_tests.sh
|
|
env:
|
|
- "CLOUD_SQL_INSTANCE=${_CLOUD_SQL_INSTANCE}"
|
|
- "GCP_PROJECT=${_GCP_PROJECT}"
|
|
- "DATABASE_NAME=${_DATABASE_NAME}"
|
|
- "DB_USER=${_DB_USER}"
|
|
- "TARGET_ROOT=${_TARGET_ROOT}"
|
|
- "TARGET_LANG=${_TARGET_LANG}"
|
|
- "TABLE_NAME=${_TABLE_NAME}"
|
|
- "SQL_FILE=${_SQL_FILE}"
|
|
- "AGENT_FILE_PATTERN=${_AGENT_FILE_PATTERN}"
|
|
secretEnv: ["TOOLS_YAML_CONTENT", "GOOGLE_API_KEY", "DB_PASSWORD"]
|
|
|
|
availableSecrets:
|
|
secretManager:
|
|
- versionName: projects/${_GCP_PROJECT}/secrets/${_TOOLS_YAML_SECRET}/versions/8
|
|
env: "TOOLS_YAML_CONTENT"
|
|
- versionName: projects/${_GCP_PROJECT_NUMBER}/secrets/${_API_KEY_SECRET}/versions/latest
|
|
env: "GOOGLE_API_KEY"
|
|
- versionName: projects/${_GCP_PROJECT}/secrets/${_DB_PASS_SECRET}/versions/latest
|
|
env: "DB_PASSWORD"
|
|
|
|
timeout: 1200s
|
|
|
|
substitutions:
|
|
_TARGET_LANG: "go"
|
|
_IMAGE: "golang:1.25.7"
|
|
_TARGET_ROOT: "docs/en/documentation/configuration/pre-post-processing/go"
|
|
_TABLE_NAME: "hotels_go_pre_post_processing"
|
|
_SQL_FILE: ".ci/sample_tests/setup_hotels.sql"
|
|
_AGENT_FILE_PATTERN: "agent.go"
|
|
|
|
options:
|
|
logging: CLOUD_LOGGING_ONLY
|