Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
yunqingmoswu committed May 16, 2022
2 parents 52c0c01 + b8bec82 commit 274c03d
Show file tree
Hide file tree
Showing 633 changed files with 7,744 additions and 1,564 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
## GitHub Workflows

This directory contains all InLong CI checks.

- [![InLong Build](https://github.com/apache/incubator-inlong/actions/workflows/ci_build.yml/badge.svg)](https://github.com/apache/incubator-inlong/actions/workflows/ci_build.yml)

Build InLong when pushing changes or opening a pull request.

If it passes, you can download the InLong binary package from the workflow run's URL.

- [![InLong Unit Test](https://github.com/apache/incubator-inlong/actions/workflows/ci_ut.yml/badge.svg)](https://github.com/apache/incubator-inlong/actions/workflows/ci_ut.yml)

Unit testing when pushing changes or opening a pull request.

If it fails, you can check out reports form the workflow run's URL.

- [![InLong Docker Build and Push](https://github.com/apache/incubator-inlong/actions/workflows/ci_docker.yml/badge.svg)](https://github.com/apache/incubator-inlong/actions/workflows/ci_docker.yml)

Build Docker images when pushing changes or opening a pull request.

Only when pushing changes to the `apache/incubator-inlong` repository will the Docker images are pushed to [Docker Hub](https://hub.docker.com/u/inlong).

- [![InLong Helm Charts Lint and Test](https://github.com/apache/incubator-inlong/actions/workflows/ci_chart_test.yml/badge.svg)](https://github.com/apache/incubator-inlong/actions/workflows/ci_chart_test.yml)

Lint and test the InLong Helm Chart when pushing changes or opening a pull request.

In this workflow, firstly, install [Helm](https://helm.sh) using the [azure/setup-helm](https://github.com/Azure/setup-helm) action,
then install [chart-testing](https://github.com/helm/chart-testing) using the [helm/chart-testing-action](https://github.com/helm/chart-testing-action)
and install [Kind](https://github.com/kubernetes-sigs/kind) using the [helm/kind-action](https://github.com/helm/kind-action),
finally, use the chart-testing tool to lint and install the InLong Helm Chart.
And here is the [chart-testing configuration](../ct.yml) and here is the [kind configuration](../kind.yml).

> NOTE: If the charts have not changed, they will not be linted, validated, installed and tested.
- [![InLong Check License Header](https://github.com/apache/incubator-inlong/actions/workflows/ci_check_license.yml/badge.svg)](https://github.com/apache/incubator-inlong/actions/workflows/ci_check_license.yml)

Check licence header when pushing changes or opening a pull request using the [apache/skywalking-eyes](https://github.com/apache/skywalking-eyes) action.
And here is the [configuration](../../.licenserc.yaml).

- [![InLong Pull Request Labeler](https://github.com/apache/incubator-inlong/actions/workflows/ci_labeler.yml/badge.svg)](https://github.com/apache/incubator-inlong/actions/workflows/ci_labeler.yml)

label new pull requests based on the paths of files being changed using the [actions/labeler](https://github.com/actions/labeler) action.
And here is the [labeler configuration](../labeler.yml)

- [![InLong Close Stale Issues and PRs](https://github.com/apache/incubator-inlong/actions/workflows/ci_stale.yml/badge.svg)](https://github.com/apache/incubator-inlong/actions/workflows/ci_stale.yml)

Mark issues and pull requests that have not had recent interaction using the [actions/stale](https://github.com/actions/stale) action.

- [![InLong Greeting](https://github.com/apache/incubator-inlong/actions/workflows/ci_greeting.yml/badge.svg)](https://github.com/apache/incubator-inlong/actions/workflows/ci_greeting.yml)

Interact with newcomers using the [actions/first-interaction](https://github.com/actions/first-interaction) action.

### Troubleshooting

If you have any questions, welcome to contact the maintainers. And feel free to make a [pull request](https://github.com/apache/incubator-inlong/compare)!

### Maintainers

- [dockerzhang](https://github.com/dockerzhang)
- [shink](https://github.com/shink)
4 changes: 2 additions & 2 deletions .github/workflows/ci_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up JDK
uses: actions/setup-java@v3
Expand All @@ -81,7 +81,7 @@ jobs:
env:
CI: false

- name: Get inlong version
- name: Get InLong version
if: ${{ success() }}
run: |
version=`mvn -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive exec:exec -q`
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci_chart_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ jobs:
- 'kindest/node:v1.23.4'
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true

- name: Set up helm
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.5.0

- name: Set up python
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7
Expand All @@ -77,16 +77,16 @@ jobs:
changed=$(ct list-changed --config ${{ env.CT_CONFIG_PATH }} --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
echo -e "\e[96mchanged charts: $changed\e[0m"
echo "Changed charts: $changed"
else
echo -e "\e[91mCharts are not changed, they will not be linted, validated, installed and tested.\e[0m"
echo "Charts are not changed, they will not be linted, validated, installed and tested."
fi
# NOTE: If the charts have not changed, they will not be linted, validated, installed and tested.
- name: Lint and validate charts
run: ct lint --config ${{ env.CT_CONFIG_PATH }}

- name: Create kind cluster
- name: Create Kind cluster
if: ${{ steps.list-changed.outputs.changed == 'true' }}
uses: ./.github/actions/kind-action
with:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ci_check_license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ name: InLong Check License Header
on: [ push, pull_request ]

jobs:
build:
name: Check License Header
check-license:
name: Check license header
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Check License Header
uses: apache/skywalking-eyes@2f5c0bce5575a25916d6b809c4dac84e6c750d47
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check license header
uses: apache/[email protected]
with:
log: info
config: .licenserc.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 5 additions & 5 deletions .github/workflows/ci_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ on:

jobs:
docker:
name: Docker Build and Push
name: Docker build and push
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up JDK
uses: actions/setup-java@v3
Expand All @@ -80,13 +80,13 @@ jobs:
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Build docker image
- name: Build Docker images
run: mvn --batch-mode --update-snapshots -e -V clean package -DskipTests -Pdocker
env:
CI: false

# If the changes are being pushed to the master branch or a branch like 'release-1.0.0', this step will output true.
- name: Match Branch
- name: Match branch
id: match-branch
if: |
success()
Expand All @@ -97,7 +97,7 @@ jobs:
echo "::set-output name=match::true"
fi
- name: Push docker image to Docker Hub
- name: Push Docker images to Docker Hub
if: ${{ success() && steps.match-branch.outputs.match == 'true' }}
working-directory: docker
run: bash +x publish.sh
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/ci_greeting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#
# 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: InLong Greeting

on:
pull_request_target:
types:
- opened
issues:
types:
- opened

jobs:
greet:
name: Greet
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Interact with newcomers
uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: 'Thanks a lot for opening your first issue with us! 🧡 We''ll get back to you shortly! ⏳'
pr-message: 'Thanks a lot for your contribution! 💖 This seems to be your first PR! 🌠 Please be sure to follow our [contribution guidelines](https://inlong.apache.org/community/how-to-contribute/)! 🎁'
3 changes: 2 additions & 1 deletion .github/workflows/ci_labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ jobs:
name: Label
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
- name: Label the PR
uses: actions/labeler@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
configuration-path: .github/labeler.yml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@ on:
schedule:
- cron: '30 1 * * *'

permissions:
issues: write
pull-requests: write

jobs:
stale:
name: Stable
name: Stale
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Mark issues and PRs
uses: actions/stale@v5
Expand All @@ -45,5 +44,5 @@ jobs:
operations-per-run: 500 # max number of operations per run
exempt-issue-labels: 'WIP' # labels on issues exempted from stale
exempt-pr-labels: 'WIP' # labels on PRs exempted from stale
stale-issue-label: 'stable' # label to apply on staled issues
stale-pr-label: 'stable' # label to apply on staled PRs
stale-issue-label: 'stale' # label to apply on staled issues
stale-pr-label: 'stale' # label to apply on staled PRs
4 changes: 2 additions & 2 deletions .github/workflows/ci_ut.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up JDK
uses: actions/setup-java@v3
Expand Down Expand Up @@ -99,4 +99,4 @@ jobs:
with:
name: failsafe-reports
path: ./**/target/failsafe-reports/
if-no-files-found: ignore
if-no-files-found: ignore
Loading

0 comments on commit 274c03d

Please sign in to comment.