From 99fe806891902ba39818e7d0b09d079d8c4ae9c2 Mon Sep 17 00:00:00 2001 From: andoni-guzman Date: Mon, 17 Oct 2022 11:39:33 -0500 Subject: [PATCH 1/3] Create ampq test file --- .github/workflows/job-precommit-java-io-amqp.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .github/workflows/job-precommit-java-io-amqp.yml diff --git a/.github/workflows/job-precommit-java-io-amqp.yml b/.github/workflows/job-precommit-java-io-amqp.yml new file mode 100644 index 000000000000..e69de29bb2d1 From 9ab1e2d49562211aa274cea1ae5e3d1b5d910317 Mon Sep 17 00:00:00 2001 From: andoni-guzman Date: Mon, 17 Oct 2022 17:36:23 -0500 Subject: [PATCH 2/3] Create task for IO amqp and runners spark and samza in Java Precommit --- .../workflows/job-precommit-java-io-amqp.yml | 54 +++++++++++++++++ .../job-precommit-java-runner-samza.yml | 54 +++++++++++++++++ .../job-precommit-java-runner-spark.yml | 58 +++++++++++++++++++ 3 files changed, 166 insertions(+) create mode 100644 .github/workflows/job-precommit-java-runner-samza.yml create mode 100644 .github/workflows/job-precommit-java-runner-spark.yml diff --git a/.github/workflows/job-precommit-java-io-amqp.yml b/.github/workflows/job-precommit-java-io-amqp.yml index e69de29bb2d1..58832adf4d67 100644 --- a/.github/workflows/job-precommit-java-io-amqp.yml +++ b/.github/workflows/job-precommit-java-io-amqp.yml @@ -0,0 +1,54 @@ +# 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. + +# Test for Precommit Java IO AMPQ + +name: Precommit Java IO AMQP + +on: + workflow_dispatch: + schedule: + - cron: '0 */6 * * *' + push: + branches: ['master', 'release-*'] + tags: 'v*' + pull_request_target: + branches: ['master', 'release-*'] + tags: 'v*' + paths: ['sdks/java/io/amqp/**'] +permissions: read-all + +jobs: + run-precommit-java-io-amqp: + name: Run Precommit Java IO AMQP + runs-on: [self-hosted, ubuntu-20.04] + timeout-minutes: 200 + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + persist-credentials: false + - name: Setup environment + uses: ./.github/actions/setup-self-hosted-action + with: + requires-py-37: false + requires-py-38: false + requires-py-39: false + requires-go-18: false + - name: SDKs Java IO AMQP - :sdks:java:io:amqp:test + uses: ./.github/actions/gradle-command-self-hosted-action + with: + gradle-command: :sdks:java:io:amqp:test \ No newline at end of file diff --git a/.github/workflows/job-precommit-java-runner-samza.yml b/.github/workflows/job-precommit-java-runner-samza.yml new file mode 100644 index 000000000000..5c09fdf880fe --- /dev/null +++ b/.github/workflows/job-precommit-java-runner-samza.yml @@ -0,0 +1,54 @@ +# 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. + +# Test for Precommit Java Runner Samza + +name: Precommit Runners Samza + +on: + workflow_dispatch: + schedule: + - cron: '0 */6 * * *' + push: + branches: ['master', 'release-*'] + tags: 'v*' + pull_request_target: + branches: ['master', 'release-*'] + tags: 'v*' + paths: ['runners/samza/**'] +permissions: read-all + +jobs: + run-precommit-runners-samza: + name: Run Precommit Runners Samza + runs-on: [self-hosted, ubuntu-20.04] + timeout-minutes: 200 + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + persist-credentials: false + - name: Setup environment + uses: ./.github/actions/setup-self-hosted-action + with: + requires-py-37: false + requires-py-38: false + requires-py-39: false + requires-go-18: false + - name: Runners Samza - :runners:samza:test + uses: ./.github/actions/gradle-command-self-hosted-action + with: + gradle-command: :runners:samza:test \ No newline at end of file diff --git a/.github/workflows/job-precommit-java-runner-spark.yml b/.github/workflows/job-precommit-java-runner-spark.yml new file mode 100644 index 000000000000..9d730f382810 --- /dev/null +++ b/.github/workflows/job-precommit-java-runner-spark.yml @@ -0,0 +1,58 @@ +# 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. + +# Test for Precommit Java Runner Spark + +name: Precommit Runners Spark + +on: + workflow_dispatch: + schedule: + - cron: '0 */6 * * *' + push: + branches: ['master', 'release-*'] + tags: 'v*' + pull_request_target: + branches: ['master', 'release-*'] + tags: 'v*' + paths: ['runners/spark/**'] +permissions: read-all + +jobs: + run-precommit-runners-spark: + name: Run Precommit Runners Spark + runs-on: [self-hosted, ubuntu-20.04] + timeout-minutes: 200 + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + persist-credentials: false + - name: Setup environment + uses: ./.github/actions/setup-self-hosted-action + with: + requires-py-37: false + requires-py-38: false + requires-py-39: false + requires-go-18: false + - name: Runners Spark 2 - :runners:spark:2:test + uses: ./.github/actions/gradle-command-self-hosted-action + with: + gradle-command: :runners:spark:2:test + - name: Runners Spark 3 - :runners:spark:3:test + uses: ./.github/actions/gradle-command-self-hosted-action + with: + gradle-command: :runners:spark:3:test \ No newline at end of file From 57ecd13e58f02c989a4e8e0711cccb647be5106e Mon Sep 17 00:00:00 2001 From: andoni-guzman Date: Mon, 17 Oct 2022 17:45:33 -0500 Subject: [PATCH 3/3] Modify Ci.md --- CI.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CI.md b/CI.md index ed75a4dd4433..160c4a47c9c6 100644 --- a/CI.md +++ b/CI.md @@ -125,6 +125,14 @@ Service Account shall have following permissions ([IAM roles](https://cloud.goog | Java Wordcount Direct Runner | Runs Java WordCount example with Direct Runner. | Yes | Yes | Yes | - | | Java Wordcount Dataflow | Runs Java WordCount example with DataFlow Runner. | - | Yes | Yes | Yes | +### PreCommit Workflows +| Workflow | Description | Requires GCP Credentials | +|------------------------------------------------------------------------------------------------|-------------------------|---------------------------| +| [job-precommit-placeholder.yml](.github/workflows/job-precommit-placeholder.yml) | Description placeholder | Yes/No | +| [job-precommit-java-io-amqp.yml](.github/workflows/job-precommit-java-io-amqp.yml) | Run Java IO AMQP | No | +| [job-precommit-java-io-hbase.yml](.github/workflows/job-precommit-java-runner-spark.yml) | Run Java Runner Spark | No | +| [job-precommit-java-io-hcatalog.yml](.github/workflows/job-precommit-java-runner-samza.yml) | Run Java Runner Samza | No | + ### GitHub Action Tips * If you introduce changes to the workflow it is possible that your changes will not be present in the check run triggered in Pull Request.