Skip to content

Commit

Permalink
Merge remote-tracking branch 'github/master' into HEAD
Browse files Browse the repository at this point in the history
* github/master: (198 commits)
  Merge pull request apache#16369 from [BEAM-13558] [Playground] Hide the Graph tab and SCIO from SDK options
  Merge pull request apache#16546 from [BEAM-13661] [BEAM-13704] [Playground] Update tags for examples/katas/unit-tests
  Merge pull request apache#16540 from [BEAM-13678][Playground]Update Github Action To Deploy Examples
  [BEAM-13430] Re-add provided configuration (apache#16552)
  [BEAM-10206] Remove Fatalf calls in non-test goroutines for tests/benchmarks (apache#16575)
  [BEAM-13693] Bump beam_PostCommit_Java_ValidatesRunner_Dataflow_Streaming timeout to 12 hours (apache#16576)
  [BEAM-13699] Replace fnv with maphash. (apache#16573)
  Update Java FnAPI beam master (apache#16572)
  Merge pull request apache#16371 from [BEAM-13518][Playground] Beam Playground quickstart page on the Beam website
  Merge pull request apache#16373 from [BEAM-13515] [Playground] Hiding lines in an example that are not necessary
  Merge pull request apache#16472: [BEAM-13697] Add SchemaFieldNumber annotation
  [BEAM-13689] Output token elements when BQ batch writes complete.
  Disable logging for memoization test. (apache#16556)
  BEAM-13611 reactivating jdbcio xlang test
  Revert "Merge pull request apache#15863 from [BEAM-13184] Autosharding for JdbcIO.write* transforms"
  Remove obsolete commands from Inventory job. (apache#16564)
  [BEAM-13688] fixed type in BPG 4.5.3 window section (apache#16560)
  [BEAM-13683] Make cross-language SQL example pipeline (apache#16567)
  Merge pull request apache#16243 from darshan-sj/feature/support-priority-spannerio - Making rpcPriority a ValueProvider in SpannerConfig
  edited README and comments in Python multi-lang pipes examples
  Merge pull request apache#16518 from [BEAM-13619] [Playground] Add loading animation to the catalog
  Merge pull request apache#16519 from [BEAM-13639] [Playground] Add notification to Log/Output tabs about cached example
  Merge pull request apache#16533 from [BEAM-13548] [Playground] Add example description popover
  Merge pull request apache#16531 from [BEAM-13567] [playground] Handle run code validation and preparation errors
  Merge pull request apache#16370 from [BEAM-13556] playground - color and scroll tabs with new content
  [BEAM-13611] Skip test_xlang_jdbc_write (apache#16554)
  [BEAM-13015] Provide caching statistics in the status client. (apache#16495)
  Merge pull request apache#16309: [BEAM-13503] Set a default value to throwWriteErrors in BulkIO constructor
  [BEAM-13015] Add state caching capability to be used as hint for runners to not duplicate cached data if the SDK can do it for user state and side inputs. (apache#16525)
  [BEAM-13665] Make SpannerIO projectID optional again (apache#16547)
  Merge pull request apache#16322 from [BEAM-13407] [Playground] Preload fonts for the web application
  Merge pull request apache#16506 from [BEAM-13652][Playground] Send examples' links to the frontend
  [BEAM-11808][BEAM-9879] Support aggregate functions with two arguments (apache#16200)
  Update walkthrough.md (apache#16512)
  [BEAM-13683] Correct SQL transform schema, fix expansion address override bug (apache#16551)
  Merge pull request apache#16486 from [BEAM-13544][Playground] Add logs to examples CI/CD to see the progress
  [BEAM-13616][BEAM-13646] Upgrade vendored calcite to 1.28.0:0.2 (apache#16544)
  [BEAM-13616][BEAM-13645] Switch to vendored grpc 1.43.2 (apache#16543)
  Also bump FnAPI container.
  [BEAM-13680] Fixed code_repository (added pipelineUuid to RunCodeResult when status is "Finished")
  [BEAM-13616] Update com.google.cloud:libraries-bom to 24.2.0 (apache#16509)
  [BEAM-13430] Remove jcenter which will no longer contain any updates. (apache#16536)
  Update GH Actions to use proper variables names and proper triggers
  Remove jcenter repositories from gradle configuration. (apache#16532)
  Merge pull request apache#16507: [BEAM-13137] Fixes ES utest size flakiness with _flush api and index.store.stats_refresh_interval=0
  [BEAM-13664] Fix Primitives hashing benchmark (apache#16523)
  Bump beam container version.
  [BEAM-12621] - Update Jenkins VMs to modern Ubuntu version (apache#16457)
  doc tweaks (apache#16498)
  Redirecting cross-language transforms content (apache#16504)
  Remove tab from source.
  Remove unnecessary fmt call in universal.go
  Clean up string cast of bytes in vet.go and corresponding tests
  fix capitalized error strings in expansionx
  Remove unnecessary blank identifier assignment in harness.go
  Replace string(buf.Bytes()) with buf.String() in coder_test.go
  Replace bytes.Compare() with bytes.Equal() in test cases
  Remove unnecessary fmt.Sprintf() in partition.go
  Fix staticcheck errors in transforms directory
  [BEAM-13590] Fix  abc imports from collections (apache#15850)
  Merge pull request apache#16482 from [BEAM-13429][Playground] Add builder for preparers
  [BEAM-10206] Resolve go vet errors in protox package
  [BEAM-12572] Run java examples on multiple runners (apache#16450)
  [BEAM-13400] JDBC IO does not support UUID and JSONB PostgreSQL types and OTHER JDBC types in general
  [BEAM-13577] Beam Select's uniquifyNames function loses nullability of Complex types while inferring schema
  [BEAM-12164]: Add SDF for reading change stream records
  [BEAM-13455] Remove duplicated artifacts when using multiple environments with Dataflow Java
  Merge pull request apache#16485 from [BEAM-13486] [Playground] For unit tests (java) if one of tests fails the output goes to stdOutput
  Merge pull request apache#16385 from [BEAM-13535] [Playground] add cancel execution button
  [BEAM-12558] Fix doc typo.
  Merge pull request apache#16467 from [BEAM-12164]: SpannerIO DetectNewPartitions SDF
  Introduce the notion of a JoinIndex for fewer shuffles. (apache#16101)
  [BEAM-12464] Change ProtoSchemaTranslator beam schema creation to match the order for protobufs containing Oneof fields (apache#14974)
  Stronger typing inference for CoGBK. (apache#16465)
  [BEAM-13480] Increase pipeline timeout for PubSubIntegrationTest.test_streaming_data_only (apache#16496)
  Provide API to check whether a hint is known.
  [BEAM-8806] Integration test for SqsIO using Localstack
  Split builder into several builder for each step of pipeline execution
  [BEAM-13399] Move service liveness polling to Runner type (apache#16487)
  Merge pull request apache#16325 from [BEAM-13471] [Playground] Tag existing unit-tests
  Adds several example multi-language Python pipelines
  [BEAM-13616][BEAM-13646] Update vendored calcite 1.28.0 with protobuf 3.19.2 (apache#16473)
  Merge pull request apache#16374 from [BEAM-13398][Playground] Split LifeCycle to DTO and business logic
  Merge pull request apache#16363 from [BEAM-13557] [Playground] show code execution time
  Merge pull request apache#16149 from [BEAM-13113] [Playground] playground frontend documentation
  Merge pull request apache#16469 from [BEAM-13623][Playground] [Bugfix] During unit tests failing there is no any output
  [BEAM-13641][Playground] Add SCIO SDK support on the CI/CD step
  [BEAM-13638] Datatype of timestamp fields in SqsMessage for AWS IOs for SDK v2 was changed from String to long, visibility of all fields was fixed from package private to public
  [BEAM-13616] Initial files for vendored gRPC 1.43.2 (apache#16460)
  [BEAM-13432] Skip ExpansionService creation in Job Server (apache#16222)
  [BEAM-13628] Update SideInputCache to use full Transform and SideInputIDs as token information (apache#16483)
  [BEAM-13631] Add deterministic SQS message coder to fix reading from SQS in batch mode
  [BEAM-8806] Integration test for SqsIO
  [adhoc] Run spotlessApply on java examples to fix master
  Merge pull request apache#16156 from [BEAM-13391] Fix temporary file format in WriteToBigQuery
  Optional args and kwargs for named external transforms.
  [BEAM-13614] Add OnWindowExpiration support to the Java SDK harness and proto translation. (apache#16458)
  [BEAM-3221] Improve documentation in model pipeline protos (apache#16474)
  Merge pull request apache#16147 from [BEAM-13359] [Playground] Tag existing examples
  [BEAM-13626] Remap expanded outputs after merging. (apache#16471)
  ...
  • Loading branch information
kennknowles committed Jan 21, 2022
2 parents d5d0bc3 + a75ccc8 commit dfb439c
Show file tree
Hide file tree
Showing 934 changed files with 23,675 additions and 6,669 deletions.
52 changes: 31 additions & 21 deletions .github/workflows/build_playground_backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,35 +57,45 @@ jobs:
- uses: hashicorp/setup-terraform@v1
with:
terraform_version: ${{ env.TERRAFORM_VERSION }}
if: startsWith(github.ref, 'ref/tags/')
if: startsWith(github.ref, 'refs/tags/')
- name: Set Docker Tag
run: echo "DOCKERTAG=${GITHUB_SHA}" >> $GITHUB_ENV
- name: Set Docker Tag If Github Tag was trigger
run: echo "DOCKERTAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
if: startsWith(github.ref, 'refs/tags/')
- name: Setup GCP account
run: echo ${{ secrets.GCP_ACCESS_KEY }} | base64 -d > /tmp/gcp_access.json
if: startsWith(github.ref, 'ref/tags/')
run: |
echo "${{ secrets.PLAYGROUND_GCP_ACCESS_KEY }}" | base64 -d > /tmp/gcp_access.json
if: startsWith(github.ref, 'refs/tags/')
- name: Login to Docker Registry
run: cat /tmp/gcp_access.json | docker login -u _json_key --password-stdin https://${{ secrets.REGISTRY_NAME }}
if: startsWith(github.ref, 'ref/tags/')
run: cat /tmp/gcp_access.json | docker login -u _json_key --password-stdin https://${{ secrets.PLAYGROUND_REGISTRY_NAME }}
if: startsWith(github.ref, 'refs/tags/')
- name: Preapre Build Java
run: ./gradlew playground:backend:containers:java:dockerPush -Pdocker-repository-root='${{ secrets.REGISTRY_NAME}}/${{ secrets.PROJECT_ID }}/playground-repository' -Pbase-image='apache/beam_java8_sdk:${{ env.BEAM_VERSION }}'
if: startsWith(github.ref, 'ref/tags/')
run: |
export
./gradlew playground:backend:containers:java:dockerTagPush -Pdocker-repository-root='${{ secrets.PLAYGROUND_REGISTRY_NAME}}/${{ secrets.PLAYGROUND_PROJECT_ID }}/playground-repository' -Pbase-image='apache/beam_java8_sdk:${{ env.BEAM_VERSION }}' -Pdocker-tag=${{ env.DOCKERTAG }}
if: startsWith(github.ref, 'refs/tags/')
- name: Preapre Build Python
run: ./gradlew playground:backend:containers:python:dockerPush -Pdocker-repository-root='${{ secrets.REGISTRY_NAME}}/${{ secrets.PROJECT_ID }}/playground-repository' -Pbase-image='apache/beam_java8_sdk:${{ env.BEAM_VERSION }}'
- name: Preapre Build Go
run: ./gradlew playground:backend:containers:go:dockerPush -Pdocker-repository-root='${{ secrets.REGISTRY_NAME}}/${{ secrets.PROJECT_ID }}/playground-repository' -Pbase-image='apache/beam_java8_sdk:${{ env.BEAM_VERSION }}'
if: startsWith(github.ref, 'ref/tags/')
run: ./gradlew playground:backend:containers:python:dockerTagPush -Pdocker-repository-root='${{ secrets.PLAYGROUND_REGISTRY_NAME}}/${{ secrets.PLAYGROUND_PROJECT_ID }}/playground-repository' -Pdocker-tag=${{ env.DOCKERTAG }}
if: startsWith(github.ref, 'refs/tags/')
- name: Preapre Build Go
run: ./gradlew playground:backend:containers:go:dockerTagPush -Pdocker-repository-root='${{ secrets.PLAYGROUND_REGISTRY_NAME}}/${{ secrets.PLAYGROUND_PROJECT_ID }}/playground-repository' -Pdocker-tag=${{ env.DOCKERTAG }}
if: startsWith(github.ref, 'refs/tags/')
- name: Deploy Backend Application Java
env:
GOOGLE_APPLICATION_CREDENTIALS: /tmp/gcp_access.json
run: terraform init && terraform apply -auto-approve -var="project_id=${{ secrets.PROJECT_ID }}" -var="docker_registry_address=${{ secrets.REGISTRY_NAME}}/${{ secrets.PROJECT_ID }}/playground-repository"
working-directory: playground/terraform/applications/backend
if: startsWith(github.ref, 'ref/tags/')
- name: Deploy Backend Application Python
env:
GOOGLE_APPLICATION_CREDENTIALS: /tmp/gcp_access.json
run: terraform init && terraform apply -auto-approve -var="project_id=${{ secrets.PROJECT_ID }}" -var="docker_registry_address=${{ secrets.REGISTRY_NAME}}/${{ secrets.PROJECT_ID }}/playground-repository"
working-directory: playground/terraform/applications/backend-python
run: terraform init && terraform apply -auto-approve -var="project_id=${{ secrets.PLAYGROUND_PROJECT_ID }}" -var="docker_registry_address=${{ secrets.PLAYGROUND_REGISTRY_NAME}}/${{ secrets.PLAYGROUND_PROJECT_ID }}/playground-repository" -var="docker_image_tag=${{ env.DOCKERTAG }}" -var="service_name=backend-java-beta"
working-directory: playground/terraform/applications/backend-java
if: startsWith(github.ref, 'refs/tags/')
- name: Deploy Backend Application Go
env:
GOOGLE_APPLICATION_CREDENTIALS: /tmp/gcp_access.json
run: terraform init && terraform apply -auto-approve -var="project_id=${{ secrets.PROJECT_ID }}" -var="docker_registry_address=${{ secrets.REGISTRY_NAME}}/${{ secrets.PROJECT_ID }}/playground-repository"
run: terraform init && terraform apply -auto-approve -var="project_id=${{ secrets.PLAYGROUND_PROJECT_ID }}" -var="docker_registry_address=${{ secrets.PLAYGROUND_REGISTRY_NAME}}/${{ secrets.PLAYGROUND_PROJECT_ID }}/playground-repository" -var="docker_image_tag=${{ env.DOCKERTAG }}" -var="service_name=backend-go-beta"
working-directory: playground/terraform/applications/backend-go
if: startsWith(github.ref, 'ref/tags/')
if: startsWith(github.ref, 'refs/tags/')
- name: Deploy Backend Application Python
env:
GOOGLE_APPLICATION_CREDENTIALS: /tmp/gcp_access.json
run: terraform init && terraform apply -auto-approve -var="project_id=${{ secrets.PLAYGROUND_PROJECT_ID }}" -var="docker_registry_address=${{ secrets.PLAYGROUND_REGISTRY_NAME}}/${{ secrets.PLAYGROUND_PROJECT_ID }}/playground-repository" -var="docker_image_tag=${{ env.DOCKERTAG }}" -var="service_name=backend-python-beta"
working-directory: playground/terraform/applications/backend-python
if: startsWith(github.ref, 'refs/tags/')
23 changes: 16 additions & 7 deletions .github/workflows/build_playground_frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,27 @@ jobs:
with:
terraform_version: ${{ env.TERRAFORM_VERSION }}
if: startsWith(github.ref, 'ref/tags/')
- name: Set Docker Tag
run: echo "DOCKERTAG=${GITHUB_SHA}" >> $GITHUB_ENV
- name: Set Docker Tag If Github Tag was trigger
run: echo "DOCKERTAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
if: startsWith(github.ref, 'refs/tags/')
- name: Setup GCP account
run: echo ${{ secrets.GCP_ACCESS_KEY }} | base64 -d > /tmp/gcp_access.json
run: |
echo "${{ secrets.PLAYGROUND_GCP_ACCESS_KEY }}" | base64 -d > /tmp/gcp_access.json
if: startsWith(github.ref, 'ref/tags/')
- name: Login to Docker Registry
run: cat /tmp/gcp_access.json | docker login -u _json_key --password-stdin https://${{ secrets.REGISTRY_NAME }}
run: cat /tmp/gcp_access.json | docker login -u _json_key --password-stdin https://${{ secrets.PLAYGROUND_REGISTRY_NAME }}
if: startsWith(github.ref, 'ref/tags/')
- name: Create config
run: ./gradlew playground:frontend:createConfig -PplaygroundBackendJavaRouteUrl="https://backend-java-beta-dot-apache-beam-testing.appspot.com/" -PplaygroundBackendGoRouteUrl="https://backend-go-beta-dot-apache-beam-testing.appspot.com/" -PplaygroundBackendPythonRouteUrl="${https://backend-python-beta-dot-apache-beam-testing.appspot.com/}" -PplaygroundBackendUrl="https://backend-router-beta-dot-apache-beam-testing.appspot.com/"
if: startsWith(github.ref, 'refs/tags/')
- name: Preapre Build
run: ./gradlew --debug playground:frontend:dockerPush -Pdocker-repository-root='${{ secrets.REGISTRY_NAME}}/${{ secrets.PROJECT_ID }}/playground-repository'
if: startsWith(github.ref, 'ref/tags/')
run: ./gradlew playground:frontend:dockerTagPush -Pdocker-repository-root='${{ secrets.PLAYGROUND_REGISTRY_NAME}}/${{ secrets.PLAYGROUND_PROJECT_ID }}/playground-repository' -Pdocker-tag=${{env.DOCKERTAG}}
if: startsWith(github.ref, 'refs/tags/')
- name: Deploy Backend Application
env:
GOOGLE_APPLICATION_CREDENTIALS: /tmp/gcp_access.json
run: terraform init && terraform apply -auto-approve -var="project_id=${{ secrets.PROJECT_ID }}" -var="docker_registry_address=${{ secrets.REGISTRY_NAME}}/${{ secrets.PROJECT_ID }}/playground-repository"
working-directory: playground/terraform/applications/backend
if: startsWith(github.ref, 'ref/tags/')
run: terraform init && terraform apply -auto-approve -var="project_id=${{ secrets.PLAYGROUND_PROJECT_ID }}" -var="docker_registry_address=${{ secrets.PLAYGROUND_REGISTRY_NAME}}/${{ secrets.PLAYGROUND_PROJECT_ID }}/playground-repository" -var="docker_image_tag=${{ env.DOCKERTAG }}"
working-directory: playground/terraform/applications/frontend
if: startsWith(github.ref, 'refs/tags/')
9 changes: 9 additions & 0 deletions .github/workflows/java_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ on:


jobs:
setup-go:
runs-on: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.16.12'

check_gcp_variables:
timeout-minutes: 5
Expand Down Expand Up @@ -108,6 +115,7 @@ jobs:
path: runners/core-java/build/reports/tests/test

java_wordcount_direct_runner:
needs: setup-go
name: 'Java Wordcount Direct Runner'
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -137,6 +145,7 @@ jobs:
name: 'Java Wordcount Dataflow'
needs:
- check_gcp_variables
- setup-go
runs-on: ${{ matrix.os }}
if: |
needs.check_gcp_variables.outputs.gcp-variables-set == 'true' && (
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/local_env_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ jobs:
timeout-minutes: 25
name: "Ubuntu run local environment shell script"
runs-on: ubuntu-latest
steps:steps:
- uses: actions/checkout@v2
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
Expand Down
140 changes: 140 additions & 0 deletions .github/workflows/playground_deploy_examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.

name: Collect And Deploy Playground Examples

on:
push:
tags: 'v*'
branch: 'beta-version'
workflow_dispatch:

jobs:
deploy_examples:
name: Deploy examples
runs-on: ubuntu-latest
env:
BEAM_ROOT_DIR: ../../
BEAM_EXAMPLE_CATEGORIES: ../categories.yaml
BEAM_VERSION: 2.33.0
K8S_NAMESPACE: playground-backend
HELM_APP_NAME: playground-backend
steps:
- name: Check out the repo
uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '8'
- name: Install kubectl
run: |
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" &&\
chmod +x kubectl &&\
mv kubectl /usr/local/bin/
- name: Install helm
run: |
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 &&\
chmod 700 get_helm.sh &&\
./get_helm.sh
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v0.3.0
- name: install deps
run: pip install -r requirements.txt
working-directory: playground/infrastructure
- name: Remove default github maven configuration
# This step is a workaround to avoid a decryption issue
run: rm ~/.m2/settings.xml
- name: Setup GCP account
run: |
echo "${{ secrets.PLAYGROUND_GCP_ACCESS_KEY }}" | base64 -d > /tmp/gcp_access.json
which gcloud
gcloud auth activate-service-account --project=apache-beam-testing --key-file=/tmp/gcp_access.json
- name: Set Docker Tag
run: echo "DOCKERTAG=${GITHUB_SHA}" >> $GITHUB_ENV
- name: Set Docker Tag If Github Tag was trigger
run: echo "DOCKERTAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
if: startsWith(github.ref, 'refs/tags/')
- name: Get K8s Config
run: gcloud container clusters get-credentials --region us-central1-a playground-examples
- name: Login to Docker Registry
run: cat /tmp/gcp_access.json | docker login -u _json_key --password-stdin https://${{ secrets.PLAYGROUND_REGISTRY_NAME }}
- name: Build And Push Java Backend
run: |
./gradlew playground:backend:containers:java:dockerTagPush -Pdocker-repository-root='${{ secrets.PLAYGROUND_REGISTRY_NAME}}/${{ secrets.PLAYGROUND_PROJECT_ID }}/playground-repository' -Pbase-image='apache/beam_java8_sdk:${{ env.BEAM_VERSION }}' -Pdocker-tag=${{ env.DOCKERTAG }}
- name: Build And Push Go Backend
run: ./gradlew playground:backend:containers:go:dockerTagPush -Pdocker-repository-root='${{ secrets.PLAYGROUND_REGISTRY_NAME}}/${{ secrets.PLAYGROUND_PROJECT_ID }}/playground-repository' -Pdocker-tag=${{ env.DOCKERTAG }}
- name: Build And Push Python Backend
run: ./gradlew playground:backend:containers:python:dockerTagPush -Pdocker-repository-root='${{ secrets.PLAYGROUND_REGISTRY_NAME}}/${{ secrets.PLAYGROUND_PROJECT_ID }}/playground-repository' -Pdocker-tag=${{ env.DOCKERTAG }}
- name: Install helm chart
run: |
kubectl create namespace $K8S_NAMESPACE --dry-run=client -o yaml | kubectl apply -f - &&\
helm install --namespace $K8S_NAMESPACE $HELM_APP_NAME . --set global.registry="${{ secrets.PLAYGROUND_REGISTRY_NAME }}/${{ secrets.PLAYGROUND_PROJECT_ID }}/playground-repository" --set global.tag=${{ env.DOCKERTAG }} &&\
sleep 120
working-directory: playground/infrastructure/helm
- name: Run Python Examples CI
run: |
K8S_SERVER_ADDRESS=$(kubectl get svc -n $K8S_NAMESPACE -l "app=service-python" -o jsonpath='{.items[0].status.loadBalancer.ingress[0].ip}')
BEAM_ROOT_DIR="../../"
BEAM_EXAMPLE_CATEGORIES="../../playground/categories.yaml"
echo $K8S_SERVER_ADDRESS
export SERVER_ADDRESS="$K8S_SERVER_ADDRESS:8081" && python3 ci_cd.py --step CI --sdk SDK_PYTHON
working-directory: playground/infrastructure
- name: Run Python Examples CD
run: |
K8S_SERVER_ADDRESS=$(kubectl get svc -n $K8S_NAMESPACE -l "app=service-python" -o jsonpath='{.items[0].status.loadBalancer.ingress[0].ip}')
BEAM_ROOT_DIR="../../"
BEAM_EXAMPLE_CATEGORIES="../../playground/categories.yaml"
export SERVER_ADDRESS="$K8S_SERVER_ADDRESS:8081" && python3 ci_cd.py --step CD --sdk SDK_PYTHON
working-directory: playground/infrastructure
env:
GOOGLE_APPLICATION_CREDENTIALS: /tmp/gcp_access.json
- name: Run Go Examples CI
run: |
K8S_SERVER_ADDRESS=$(kubectl get svc -n $K8S_NAMESPACE -l "app=service-go" -o jsonpath='{.items[0].status.loadBalancer.ingress[0].ip}')
BEAM_ROOT_DIR="../../"
BEAM_EXAMPLE_CATEGORIES="../../playground/categories.yaml"
export SERVER_ADDRESS="$K8S_SERVER_ADDRESS:8082" && python3 ci_cd.py --step CI --sdk SDK_GO
working-directory: playground/infrastructure
- name: Run Go Examples CD
run: |
K8S_SERVER_ADDRESS=$(kubectl get svc -n $K8S_NAMESPACE -l "app=service-go" -o jsonpath='{.items[0].status.loadBalancer.ingress[0].ip}')
BEAM_ROOT_DIR="../../"
BEAM_EXAMPLE_CATEGORIES="../../playground/categories.yaml"
export SERVER_ADDRESS="$K8S_SERVER_ADDRESS:8082" && python3 ci_cd.py --step CD --sdk SDK_GO
working-directory: playground/infrastructure
env:
GOOGLE_APPLICATION_CREDENTIALS: /tmp/gcp_access.json
- name: Run Java Examples CI
run: |
K8S_SERVER_ADDRESS=$(kubectl get svc -n $K8S_NAMESPACE -l "app=service-java" -o jsonpath='{.items[0].status.loadBalancer.ingress[0].ip}')
BEAM_ROOT_DIR="../../"
BEAM_EXAMPLE_CATEGORIES="../../playground/categories.yaml"
export SERVER_ADDRESS="$K8S_SERVER_ADDRESS:8080" && python3 ci_cd.py --step CI --sdk SDK_JAVA
working-directory: playground/infrastructure
- name: Run Java Examples CD
run: |
K8S_SERVER_ADDRESS=$(kubectl get svc -n $K8S_NAMESPACE -l "app=service-java" -o jsonpath='{.items[0].status.loadBalancer.ingress[0].ip}')
BEAM_ROOT_DIR="../../"
BEAM_EXAMPLE_CATEGORIES="../../playground/categories.yaml"
export SERVER_ADDRESS="$K8S_SERVER_ADDRESS:8080" && python3 ci_cd.py --step CD --sdk SDK_JAVA
working-directory: playground/infrastructure
env:
GOOGLE_APPLICATION_CREDENTIALS: /tmp/gcp_access.json
- name: Delete Helm Chart
run: |
helm del --namespace $K8S_NAMESPACE $HELM_APP_NAME
9 changes: 9 additions & 0 deletions .github/workflows/python_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ on:

jobs:

setup-go:
runs-on: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.16.12'

check_gcp_variables:
timeout-minutes: 5
name: "Check GCP variables"
Expand Down Expand Up @@ -168,6 +176,7 @@ jobs:
name: 'Python Wordcount Dataflow'
needs:
- build_python_sdk_source
- setup-go
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down
2 changes: 0 additions & 2 deletions .test-infra/jenkins/job_Inventory.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ nums.each {
ALL_SUPPORTED_VERSIONS.each { version ->
shell("python${version} --version || echo \"python${version} not found\"")
}
shell('/home/jenkins/tools/maven/latest/mvn -v || echo "mvn not found"')
shell('/home/jenkins/tools/gradle4.3/gradle -v || echo "gradle not found"')
shell('gcloud -v || echo "gcloud not found"')
shell('kubectl version || echo "kubectl not found"')
ALL_SUPPORTED_VERSIONS.each { version ->
Expand Down
46 changes: 46 additions & 0 deletions .test-infra/jenkins/job_PostCommit_Java_Examples_Direct.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/

import CommonJobProperties as commonJobProperties

// This job runs the Java examples tests with DirectRunner.
job('beam_PostCommit_Java_Examples_Direct') {
description('Run Java Examples on Direct Runner')

// Set common parameters.
commonJobProperties.setTopLevelMainJobProperties(delegate, 'master', 120)

// Allows triggering this build against pull requests.
commonJobProperties.enablePhraseTriggeringFromPullRequest(
delegate,
'Java Direct Runner Examples',
'Run Java Examples_Direct')

publishers {
archiveJunit('**/build/test-results/**/*.xml')
}

// Execute shell command to run examples.
steps {
gradle {
rootBuildScriptDir(commonJobProperties.checkoutDir)
tasks(':runners:direct:examplesIntegrationTest')
commonJobProperties.setGradleSwitches(delegate)
}
}
}
Loading

0 comments on commit dfb439c

Please sign in to comment.