You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@submarine.apache.org by pi...@apache.org on 2021/08/14 16:59:47 UTC
[submarine] branch master updated: SUBMARINE-963. Add SonarCloud
config in GA
This is an automated email from the ASF dual-hosted git repository.
pingsutw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git
The following commit(s) were added to refs/heads/master by this push:
new dfd6df3 SUBMARINE-963. Add SonarCloud config in GA
dfd6df3 is described below
commit dfd6df3a584b09990e088ff9ec073f369dd4d52a
Author: Kevin Su <pi...@gmail.com>
AuthorDate: Sat Aug 14 09:52:07 2021 -0700
SUBMARINE-963. Add SonarCloud config in GA
### What is this PR for?
<!-- A few sentences describing the overall goals of the pull request's commits.
First time? Check out the contributing guide - https://submarine.apache.org/contribution/contributions.html
-->
we would like to add the Submarine repo to SonarCloud.io, and we need some setups in the Github Action workflow.
Related to https://issues.apache.org/jira/browse/INFRA-22105
### What type of PR is it?
[Improvement]
### Todos
No
### What is the Jira issue?
<!-- * Open an issue on Jira https://issues.apache.org/jira/browse/SUBMARINE/
* Put link here, and add [SUBMARINE-*Jira number*] in PR title, eg. `SUBMARINE-23. PR title`
-->
https://issues.apache.org/jira/browse/SUBMARINE-963
### How should this be tested?
<!--
* First time? Setup Travis CI as described on https://submarine.apache.org/contribution/contributions.html#continuous-integration
* Strongly recommended: add automated unit tests for any new or changed behavior
* Outline any manual steps to test the PR here.
-->
Pass the CIs
### Screenshots (if appropriate)
### Questions:
* Do the license files need updating? No
* Are there breaking changes for older versions? No
* Does this need new documentation? No
Author: Kevin Su <pi...@gmail.com>
Author: Kevin Su <pi...@apache.org>
Signed-off-by: Kevin <pi...@apache.org>
Closes #696 from pingsutw/SUBMARINE-963 and squashes the following commits:
80483f87 [Kevin Su] Update sonarcloud.yml
79b8dd26 [Kevin Su] Update sonarcloud.yml
18a73631 [Kevin Su] Update sonarcloud.yml
e762dc47 [Kevin Su] Update sonarcloud.yml
9e100931 [Kevin Su] Update sonarcloud.yml
0696d7c2 [Kevin Su] Update sonarcloud.yml
00843e55 [Kevin Su] Update sonarcloud.yml
aeb055f1 [Kevin Su] Update sonarcloud.yml
f6ba6f1c [Kevin Su] Update sonarcloud.yml
04c23c80 [Kevin Su] Update sonarcloud.yml
7c41e919 [Kevin Su] Update sonarcloud.yml
d67a5f91 [Kevin Su] Add license
9e5263d1 [Kevin Su] Add license
293712e8 [Kevin Su] SUBMARINE-963. Add SonarCloud config in GA
---
.github/workflows/sonarcloud.yml | 39 +++++++++++++++++++++++++++++++++++++++
sonar-project.properties | 27 +++++++++++++++++++++++++++
2 files changed, 66 insertions(+)
diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml
new file mode 100644
index 0000000..ef9b5fc
--- /dev/null
+++ b/.github/workflows/sonarcloud.yml
@@ -0,0 +1,39 @@
+# 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: SonarCloud
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ types: [opened, synchronize, reopened]
+jobs:
+ sonarcloud:
+ if: github.repository == 'apache/submarine'
+ name: SonarCloud
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
+ - name: print secret
+ run: echo "${{ secrets.SONARCLOUD_TOKEN }}" && echo "${{ secrets.SONAR_TOKEN }}"
+ - name: SonarCloud Scan
+ uses: SonarSource/sonarcloud-github-action@master
+ env:
+ SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
diff --git a/sonar-project.properties b/sonar-project.properties
new file mode 100644
index 0000000..41c1a00
--- /dev/null
+++ b/sonar-project.properties
@@ -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.
+
+sonar.projectKey=apache_submarine
+sonar.organization=apache
+
+# This is the name and version displayed in the SonarCloud UI.
+#sonar.projectName=submarine
+#sonar.projectVersion=1.0
+
+# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
+#sonar.sources=.
+
+# Encoding of the source code. Default is default system encoding
+#sonar.sourceEncoding=UTF-8
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org