|
| 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 | +# https://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 | +steps: |
| 16 | + # Build function source zip with vendored wheels of packages in this monorepo |
| 17 | + - name: python:3.11-slim |
| 18 | + id: build |
| 19 | + script: | |
| 20 | + set -xe |
| 21 | + apt-get update |
| 22 | + apt-get install -y zip |
| 23 | +
|
| 24 | + cd e2e-test-server/ |
| 25 | + # package monorepo libraries into wheels in local wheels/ directory |
| 26 | + pip wheel \ |
| 27 | + --no-deps \ |
| 28 | + --wheel-dir wheels \ |
| 29 | + ../opentelemetry-exporter-gcp-trace/ \ |
| 30 | + ../opentelemetry-resourcedetector-gcp/ \ |
| 31 | + ../opentelemetry-propagator-gcp |
| 32 | +
|
| 33 | + zip -qr function-source.zip . |
| 34 | +
|
| 35 | + # Run the test |
| 36 | + - name: $_TEST_RUNNER_IMAGE |
| 37 | + id: run-tests-cloud-run |
| 38 | + dir: / |
| 39 | + env: ["PROJECT_ID=$PROJECT_ID"] |
| 40 | + args: |
| 41 | + - cloud-functions-gen2 |
| 42 | + - --functionsource=/workspace/e2e-test-server/function-source.zip |
| 43 | + - --runtime=python311 |
| 44 | + - --entrypoint=cloud_functions_handler |
| 45 | + |
| 46 | +logsBucket: gs://opentelemetry-ops-e2e-cloud-build-logs |
| 47 | +substitutions: |
| 48 | + _TEST_RUNNER_IMAGE: us-central1-docker.pkg.dev/${PROJECT_ID}/e2e-testing/opentelemetry-operations-e2e-testing:0.20.1 |
0 commit comments