You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2022/11/16 09:07:45 UTC
[flink-connector-opensearch] branch main updated: [FLINK-25756][ci] Add workflows
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-connector-opensearch.git
The following commit(s) were added to refs/heads/main by this push:
new 4462866 [FLINK-25756][ci] Add workflows
4462866 is described below
commit 4462866f1ca101d60039ceff3c7b6fc025dd5601
Author: Andriy Redko <dr...@gmail.com>
AuthorDate: Wed Nov 16 04:07:39 2022 -0500
[FLINK-25756][ci] Add workflows
---
.github/boring-cyborg.yml | 87 ++++++++++++++++++++++++++++++++++++
.github/workflows/ci.yml | 101 ++++++++++++++++++++++++++++++++++++++++++
.github/workflows/push_pr.yml | 27 +++++++++++
.github/workflows/weekly.yml | 32 +++++++++++++
4 files changed, 247 insertions(+)
diff --git a/.github/boring-cyborg.yml b/.github/boring-cyborg.yml
new file mode 100644
index 0000000..223cf6b
--- /dev/null
+++ b/.github/boring-cyborg.yml
@@ -0,0 +1,87 @@
+################################################################################
+# 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.
+################################################################################
+
+labelPRBasedOnFilePath:
+ component=BuildSystem:
+ - .github/**/*
+ - tools/maven/*
+
+ component=Documentation:
+ - docs/**/*
+
+ component=Connectors/Opensearch:
+ - flink-connector-opensearch*/**/*
+ - flink-sql-connector-opensearch*/**/*
+
+###### IssueLink Adder #################################################################################################
+# Insert Issue (Jira/Github etc) link in PR description based on the Issue ID in PR title.
+insertIssueLinkInPrDescription:
+ # specify the placeholder for the issue link that should be present in the description
+ descriptionIssuePlaceholderRegexp: "^Issue link: (.*)$"
+ matchers:
+ # you can have several matches - for different types of issues
+ # only the first matching entry is replaced
+ jiraIssueMatch:
+ # specify the regexp of issue id that you can find in the title of the PR
+ # the match groups can be used to build the issue id (${1}, ${2}, etc.).
+ titleIssueIdRegexp: \[(FLINK-[0-9]+)\]
+ # the issue link to be added. ${1}, ${2} ... are replaced with the match groups from the
+ # title match (remember to use quotes)
+ descriptionIssueLink: "[${1}](https://issues.apache.org/jira/browse/${1}/)"
+ docOnlyIssueMatch:
+ titleIssueIdRegexp: \[hotfix\]
+ descriptionIssueLink: "`Documentation only change, no JIRA issue`"
+
+###### Title Validator #################################################################################################
+# Verifies if commit/PR titles match the regexp specified
+verifyTitles:
+ # Regular expression that should be matched by titles of commits or PR
+ titleRegexp: ^\[FLINK-[0-9]+\].*$|^\[FLINK-XXXXX\].*$|^\[hotfix].*$
+ # If set to true, it will always check the PR title (as opposed to the individual commits).
+ alwaysUsePrTitle: false
+ # If set to true, it will only check the commit in case there is a single commit.
+ # In case of multiple commits it will check PR title.
+ # This reflects the standard behaviour of Github that for `Squash & Merge` GitHub
+ # uses the PR title rather than commit messages for the squashed commit ¯\_(ツ)_/¯
+ # For single-commit PRs it takes the squashed commit message from the commit as expected.
+ #
+ # If set to false it will check all commit messages. This is useful when you do not squash commits at merge.
+ validateEitherPrOrSingleCommitTitle: true
+ # The title the GitHub status should appear from.
+ statusTitle: "Title Validator"
+ # A custom message to be displayed when the title passes validation.
+ successMessage: "Validation successful!"
+ # A custom message to be displayed when the title fails validation.
+ # Allows insertion of ${type} (commit/PR), ${title} (the title validated) and ${regex} (the titleRegexp above).
+ failureMessage: "Wrong ${type} title: ${title}"
+
+# Various Flags to control behaviour of the "Labeler"
+labelerFlags:
+ # If this flag is changed to 'false', labels would only be added when the PR is first created
+ # and not when existing PR is updated.
+ # The default is 'true' which means the labels would be added when PR is updated even if they
+ # were removed by the user
+ labelOnPRUpdates: true
+
+# Comment to be posted to welcome users when they open their first PR
+firstPRWelcomeComment: >
+ Thanks for opening this pull request! Please check out our contributing guidelines. (https://flink.apache.org/contributing/how-to-contribute.html)
+
+# Comment to be posted to congratulate user on their first merged PR
+firstPRMergeComment: >
+ Awesome work, congrats on your first merged pull request!
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..b4ad24f
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,101 @@
+################################################################################
+# 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.
+################################################################################
+
+on:
+ workflow_call:
+ inputs:
+ flink_url:
+ description: "Url to Flink binary."
+ required: true
+ type: string
+ flink_version:
+ description: "Flink version to test against."
+ required: true
+ type: string
+ cache_flink_binary:
+ description: "Whether to cache the Flink binary. Should be false for SNAPSHOT URLs, true otherwise."
+ required: true
+ type: boolean
+
+jobs:
+ compile_and_test:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ jdk: [8, 11]
+ timeout-minutes: 40
+ env:
+ MVN_COMMON_OPTIONS: -U -B --no-transfer-progress -Dflink.version=${{ inputs.flink_version }}
+ MVN_CONNECTION_OPTIONS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
+ FLINK_CACHE_DIR: "/tmp/cache/flink"
+ MVN_BUILD_OUTPUT_FILE: "/tmp/mvn_build_output.out"
+ MVN_VALIDATION_DIR: "/tmp/flink-validation-deployment"
+ steps:
+ - run: echo "Running CI pipeline for JDK version ${{ matrix.jdk }}"
+
+ - name: Check out repository code
+ uses: actions/checkout@v2
+
+ - name: Set JDK
+ uses: actions/setup-java@v2
+ with:
+ java-version: ${{ matrix.jdk }}
+ distribution: 'temurin'
+ cache: 'maven'
+
+ - name: Set Maven 3.8.6
+ uses: stCarolas/setup-maven@v4.2
+ with:
+ maven-version: 3.8.6
+
+ - name: Create cache dirs
+ run: mkdir -p ${{ env.FLINK_CACHE_DIR }}
+
+ - name: Cache Flink binary
+ if: ${{ inputs.cache_flink_binary == 'true' }}
+ uses: actions/cache@v3
+ id: cache-flink
+ with:
+ path: ${{ env.FLINK_CACHE_DIR }}
+ key: ${{ inputs.flink_url }}
+
+ - name: Download Flink binary
+ working-directory: ${{ env.FLINK_CACHE_DIR }}
+ if: steps.cache-flink.outputs.cache-hit != 'true'
+ run: wget -q -c ${{ inputs.flink_url }} -O - | tar -xz
+
+ - name: Compile and test flink-connector-opensearch
+ timeout-minutes: 30
+ run: |
+ set -o pipefail
+
+ mvn clean deploy ${MVN_COMMON_OPTIONS} \
+ -DaltDeploymentRepository=validation_repository::default::file:${{ env.MVN_VALIDATION_DIR }} \
+ -Dscala-2.12 \
+ -Prun-end-to-end-tests -DdistDir=${{ env.FLINK_CACHE_DIR }}/flink-${{ inputs.flink_version }} \
+ -Dflink.convergence.phase=install -Pcheck-convergence \
+ ${{ env.MVN_CONNECTION_OPTIONS }} \
+ -Dlog4j.configurationFile=file://$(pwd)/tools/ci/log4j.properties \
+ | tee ${{ env.MVN_BUILD_OUTPUT_FILE }}
+
+ - name: Check licensing
+ run: |
+ mvn ${MVN_COMMON_OPTIONS} exec:java@check-license -N \
+ -Dexec.args="${{ env.MVN_BUILD_OUTPUT_FILE }} $(pwd) ${{ env.MVN_VALIDATION_DIR }}" \
+ ${{ env.MVN_CONNECTION_OPTIONS }} \
+ -Dlog4j.configurationFile=file://$(pwd)/tools/ci/log4j.properties
diff --git a/.github/workflows/push_pr.yml b/.github/workflows/push_pr.yml
new file mode 100644
index 0000000..b3ab749
--- /dev/null
+++ b/.github/workflows/push_pr.yml
@@ -0,0 +1,27 @@
+################################################################################
+# 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: Build flink-connector-opensearch
+on: [push, pull_request]
+jobs:
+ compile_and_test:
+ uses: ./.github/workflows/ci.yml
+ with:
+ flink_version: 1.16.0
+ flink_url: https://dist.apache.org/repos/dist/release/flink/flink-1.16.0/flink-1.16.0-bin-scala_2.12.tgz
+ cache_flink_binary: true
diff --git a/.github/workflows/weekly.yml b/.github/workflows/weekly.yml
new file mode 100644
index 0000000..1f9cecf
--- /dev/null
+++ b/.github/workflows/weekly.yml
@@ -0,0 +1,32 @@
+################################################################################
+# 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: Build flink-connector-opensearch
+on:
+ schedule:
+ - cron: "0 0 * * 0"
+jobs:
+ compile_and_test:
+ strategy:
+ matrix:
+ flink: [1.16-SNAPSHOT, 1.17-SNAPSHOT]
+ uses: ./.github/workflows/ci.yml
+ with:
+ flink_version: ${{ matrix.flink }}
+ flink_url: https://s3.amazonaws.com/flink-nightly/flink-${{ matrix.flink }}-bin-scala_2.12.tgz
+ cache_flink_binary: false