This is an automated email from the ASF dual-hosted git repository.

damccorm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new bbaa7ebd3ee Github Workflow Replacement for Jenkins Job, 
beam_PreCommit_SQL_Java17 (Cron, Commit, Phrase) (#27965)
bbaa7ebd3ee is described below

commit bbaa7ebd3eec614832d76cfc577858638a96a11d
Author: magicgoody <131876064+magicgo...@users.noreply.github.com>
AuthorDate: Tue Aug 15 01:16:09 2023 +0600

    Github Workflow Replacement for Jenkins Job, beam_PreCommit_SQL_Java17 
(Cron, Commit, Phrase) (#27965)
    
    * PreCommit SQL Java17
    
    * comment added, flutter removed
---
 .github/workflows/README.md                     |   1 +
 .github/workflows/beam_PreCommit_SQL_Java17.yml | 111 ++++++++++++++++++++++++
 2 files changed, 112 insertions(+)

diff --git a/.github/workflows/README.md b/.github/workflows/README.md
index d6de6eaed16..ab28ddafacd 100644
--- a/.github/workflows/README.md
+++ b/.github/workflows/README.md
@@ -209,6 +209,7 @@ Please note that jobs with matrix need to have matrix 
element in the comment. Ex
 | [ PreCommit Python Transforms 
](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Python_Transforms.yml)
 | ['3.8','3.9','3.10','3.11'] | `Run Python_Transforms PreCommit 
(matrix_element)`| 
[![.github/workflows/beam_PreCommit_Python_Transforms.yml](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Python_Transforms.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Python_Transforms.yml)
 |
 | [ PreCommit RAT 
](https://github.com/apache/beam/actions/workflows/beam_PreCommit_RAT.yml) | 
N/A | `Run RAT PreCommit` | 
[![.github/workflows/beam_PreCommit_RAT.yml](https://github.com/apache/beam/actions/workflows/beam_PreCommit_RAT.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_RAT.yml)
 |
 | [ PreCommit SQL Java11 
](https://github.com/apache/beam/actions/workflows/beam_PreCommit_SQL_Java11.yml)
 | N/A |`Run SQL_Java11 PreCommit`| 
[![.github/workflows/beam_PreCommit_SQL_Java11.yml](https://github.com/apache/beam/actions/workflows/beam_PreCommit_SQL_Java11.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_SQL_Java11.yml)
 |
+| [ PreCommit SQL Java17 
](https://github.com/apache/beam/actions/workflows/beam_PreCommit_SQL_Java17.yml)
 | N/A |`Run SQL_Java17 PreCommit`| 
[![.github/workflows/beam_PreCommit_SQL_Java17.yml](https://github.com/apache/beam/actions/workflows/beam_PreCommit_SQL_Java17.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_SQL_Java17.yml)
 |
 | [ PreCommit Typescript 
](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Typescript.yml)
 | N/A |`Run Typescript PreCommit`| 
[![.github/workflows/beam_PreCommit_Typescript.yml](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Typescript.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Typescript.yml)
 |
 | [ PreCommit Website 
](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Website.yml) 
| N/A |`Run Website PreCommit`| 
[![.github/workflows/beam_PreCommit_Website.yml](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Website.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Website.yml)
 |
 | [ PreCommit Website Stage GCS 
](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Website_Stage_GCS.yml)
 | N/A |`Run Website_Stage_GCS PreCommit`| [![PreCommit Website Stage 
GCS](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Website_Stage_GCS.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Website_Stage_GCS.yml)
 |
diff --git a/.github/workflows/beam_PreCommit_SQL_Java17.yml 
b/.github/workflows/beam_PreCommit_SQL_Java17.yml
new file mode 100644
index 00000000000..9a1d71a0f74
--- /dev/null
+++ b/.github/workflows/beam_PreCommit_SQL_Java17.yml
@@ -0,0 +1,111 @@
+# 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: PreCommit SQL Java17
+
+on:
+  push:
+    tags: ['v*']
+    branches: ['master', 'release-*']
+    paths: 
['sdks/java/extensions/sql/**','.github/workflows/beam_PreCommit_SQL_Java17.yml']
+  pull_request_target:
+    branches: ['master', 'release-*']
+    paths: [sdks/java/extensions/sql/**]
+  issue_comment:
+    types: [created]
+  schedule:
+    - cron: '0 */6 * * *'
+  workflow_dispatch:
+
+# Setting explicit permissions for the action to avoid the default permissions 
which are `write-all` in case of pull_request_target event
+permissions:
+  actions: write
+  pull-requests: read
+  checks: read
+  contents: read
+  deployments: read
+  id-token: none
+  issues: read
+  discussions: read
+  packages: read
+  pages: read
+  repository-projects: read
+  security-events: read
+  statuses: read
+
+# This allows a subsequently queued workflow run to interrupt previous runs
+concurrency:
+  group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || 
github.sha || github.head_ref || github.ref }}-${{ github.event.sender.login 
}}-${{ github.event.schedule }}'
+  cancel-in-progress: true
+
+jobs:
+  beam_PreCommit_SQL_Java17:
+    name: ${{ matrix.job_name }} (${{ matrix.job_phrase }})
+    strategy:
+      matrix:
+        job_name: ["beam_PreCommit_SQL_Java17"]
+        job_phrase: ["Run SQL_Java17 PreCommit"]
+    timeout-minutes: 120
+    if: |
+      github.event_name == 'push' ||
+      github.event_name == 'pull_request_target' ||
+      github.event_name == 'schedule' ||
+      github.event_name == 'workflow_dispatch' ||
+      github.event.comment.body == 'Run SQL_Java17 PreCommit'
+    runs-on: [self-hosted, ubuntu-20.04, main]
+    steps:
+      - uses: actions/checkout@v3
+      - name: Setup repository
+        uses: ./.github/actions/setup-action
+        with:
+          comment_phrase: ${{ matrix.job_phrase }}
+          github_token: ${{ secrets.GITHUB_TOKEN }}
+          github_job: ${{ matrix.job_name }} (${{ matrix.job_phrase }})
+# The test requires Java 17 and Java 8 versions.
+# Java 8 is installed second because JAVA_HOME needs to point to Java 8.
+      - name: Set up Java 17
+        uses: actions/setup-java@v3.11.0
+        with:
+          distribution: 'temurin'
+          java-version: '17'
+      - name: Set up Java 8
+        uses: actions/setup-java@v3.11.0
+        with:
+          distribution: 'temurin'
+          java-version: '8'
+      - name: Install Python
+        uses: actions/setup-python@v4
+        with:
+          python-version: '3.8'
+      - name: Build and Test
+        uses: ./.github/actions/gradle-command-self-hosted-action
+        with:
+          gradle-command: :sqlPreCommit
+          arguments: |
+            -PdisableSpotlessCheck=true \
+            -PdisableCheckStyle=true \
+            -PcompileAndRunTestsWithJava17 \
+            -PskipCheckerFramework \
+            -Pjava17Home=$JAVA_HOME_17_X64 \
+      - name: Archive JUnit Test Results
+        uses: actions/upload-artifact@v3
+        with:
+          name: JUnit Test Results
+          path: '**/build/test-results/**/*.xml'
+      - name: Archive SpotBugs Results
+        uses: actions/upload-artifact@v2
+        with:
+          name: SpotBugs Results
+          path: '**/build/reports/spotbugs/*.html'
\ No newline at end of file

Reply via email to