You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2023/04/26 02:18:56 UTC
[doris] branch master updated: [chore](CI)Regularly check project quality with Sonar (#18998)
This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new ca80617bfe [chore](CI)Regularly check project quality with Sonar (#18998)
ca80617bfe is described below
commit ca80617bfe8682ec4a1698dbe15e90e3d7cd7cef
Author: Calvin Kirs <ki...@apache.org>
AuthorDate: Wed Apr 26 10:18:49 2023 +0800
[chore](CI)Regularly check project quality with Sonar (#18998)
Since the fork warehouse cannot obtain the token (for security reasons),
So set it as a timed check.
---
.github/workflows/sonarcloud.yml | 55 +++++-----------------------------------
1 file changed, 6 insertions(+), 49 deletions(-)
diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml
index 5cad07df68..d0d5340057 100644
--- a/.github/workflows/sonarcloud.yml
+++ b/.github/workflows/sonarcloud.yml
@@ -18,40 +18,24 @@
---
name: Code Quality Analysis
on:
- push:
- branches:
- - master
- types: [closed]
+ schedule:
+ - cron: '0 0 03 * *' # Run at 03:00 UTC every day
jobs:
build:
name: Build
runs-on: ubuntu-latest
- if: ${{ github.event.pull_request.merged }}
env:
- SONAR_SCANNER_VERSION: 4.7.0.2747
- SONAR_SERVER_URL: "https://sonarcloud.io"
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
-
- - name: Changed Java Files
- id: java-changes
- uses: tj-actions/changed-files@a59f800cbb60ed483623848e31be67659a2940f8
- with:
- sha: "${{ github.pull_request.sha }}"
- base_sha: "${{ github.sha }}"
- files: |
- **/*.java
- **/*.xml
-
- name: Set up JDK 11
uses: actions/setup-java@v3
- if: steps.java-changes.outputs.any_changed == 'true'
with:
java-version: 11
+ distribution: 'adopt'
- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
@@ -66,43 +50,16 @@ jobs:
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Setup thrift
- if: steps.java-changes.outputs.any_changed == 'true'
run: |
sudo apt-get update
- sudo DEBIAN_FRONTEND=noninteractive apt-get install -y thrift-compiler=0.13.0-2build2
+ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y thrift-compiler=0.16.0-2
thrift --version
mkdir -p thirdparty/installed/bin/
cd thirdparty/installed/bin/ && ln -s /usr/bin/thrift thrift
- name: Analyze FE
- if: steps.java-changes.outputs.any_changed == 'true'
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
cd fe
- mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=apache_incubator-doris -DskipTests
-# scanner be
-# - name: Download and set up sonar-scanner
-# env:
-# SONAR_SCANNER_DOWNLOAD_URL: https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${{ env.SONAR_SCANNER_VERSION }}-linux.zip
-# run: |
-# mkdir -p $HOME/.sonar
-# curl -sSLo $HOME/.sonar/sonar-scanner.zip ${{ env.SONAR_SCANNER_DOWNLOAD_URL }}
-# unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
-# echo "$HOME/.sonar/sonar-scanner-${{ env.SONAR_SCANNER_VERSION }}-linux/bin" >> $GITHUB_PATH
-# - name: Download and set up build-wrapper
-# env:
-# BUILD_WRAPPER_DOWNLOAD_URL: ${{ env.SONAR_SERVER_URL }}/static/cpp/build-wrapper-linux-x86.zip
-# run: |
-# curl -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip ${{ env.BUILD_WRAPPER_DOWNLOAD_URL }}
-# unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/
-# echo "$HOME/.sonar/build-wrapper-linux-x86" >> $GITHUB_PATH
-# - name: Run build-wrapper
-# run: |
-# build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }}<insert_your_clean_build_command>
-# - name: Analyze BE
-# env:
-# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
-# run: |
-# sonar-scanner --define sonar.host.url="${{ env.SONAR_SERVER_URL }}" --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}"
+ mvn --batch-mode verify sonar:sonar -DskipTests -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=apache -Dsonar.projectKey=apache_incubator-doris -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org