You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by el...@apache.org on 2019/11/20 10:35:54 UTC
[hadoop-ozone] 01/01: enable sonar cloud integration (other tests
are disabled temporary)
This is an automated email from the ASF dual-hosted git repository.
elek pushed a commit to branch HDDS-2587
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git
commit 03baab038282c8896c3dd89fe08396c406ab7490
Author: Márton Elek <el...@apache.org>
AuthorDate: Wed Nov 20 11:33:56 2019 +0100
enable sonar cloud integration (other tests are disabled temporary)
---
.github/workflows/main.yml | 171 ++++++++++++++++---------------
hadoop-ozone/dev-support/checks/sonar.sh | 23 +++++
pom.xml | 5 +
3 files changed, 116 insertions(+), 83 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index c64ac69..d82e32d 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -17,40 +17,40 @@ on:
- push
- pull_request
jobs:
- build:
- name: compile
- runs-on: ubuntu-18.04
- steps:
- - uses: actions/checkout@master
- - uses: ./.github/buildenv
- with:
- args: ./hadoop-ozone/dev-support/checks/build.sh
- rat:
- name: rat
- runs-on: ubuntu-18.04
- steps:
- - uses: actions/checkout@master
- - uses: ./.github/buildenv
- with:
- args: ./hadoop-ozone/dev-support/checks/rat.sh
- - uses: actions/upload-artifact@master
- if: always()
- with:
- name: rat
- path: target/rat
- author:
- name: author
- runs-on: ubuntu-18.04
- steps:
- - uses: actions/checkout@master
- - uses: ./.github/buildenv
- with:
- args: ./hadoop-ozone/dev-support/checks/author.sh
- - uses: actions/upload-artifact@master
- if: always()
- with:
- name: author
- path: target/author
+# build:
+# name: compile
+# runs-on: ubuntu-18.04
+# steps:
+# - uses: actions/checkout@master
+# - uses: ./.github/buildenv
+# with:
+# args: ./hadoop-ozone/dev-support/checks/build.sh
+# rat:
+# name: rat
+# runs-on: ubuntu-18.04
+# steps:
+# - uses: actions/checkout@master
+# - uses: ./.github/buildenv
+# with:
+# args: ./hadoop-ozone/dev-support/checks/rat.sh
+# - uses: actions/upload-artifact@master
+# if: always()
+# with:
+# name: rat
+# path: target/rat
+# author:
+# name: author
+# runs-on: ubuntu-18.04
+# steps:
+# - uses: actions/checkout@master
+# - uses: ./.github/buildenv
+# with:
+# args: ./hadoop-ozone/dev-support/checks/author.sh
+# - uses: actions/upload-artifact@master
+# if: always()
+# with:
+# name: author
+# path: target/author
unit:
name: unit
runs-on: ubuntu-18.04
@@ -59,57 +59,62 @@ jobs:
- uses: ./.github/buildenv
with:
args: ./hadoop-ozone/dev-support/checks/unit.sh
- - uses: actions/upload-artifact@master
- if: always()
- with:
- name: unit
- path: target/unit
- checkstyle:
- name: checkstyle
- runs-on: ubuntu-18.04
- steps:
- - uses: actions/checkout@master
- uses: ./.github/buildenv
with:
- args: ./hadoop-ozone/dev-support/checks/checkstyle.sh
+ args: ./hadoop-ozone/dev-support/checks/sonar.sh
+ env:
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- uses: actions/upload-artifact@master
if: always()
with:
- name: checkstyle
- path: target/checkstyle
- findbugs:
- name: findbugs
- runs-on: ubuntu-18.04
- steps:
- - uses: actions/checkout@master
- - uses: ./.github/buildenv
- with:
- args: ./hadoop-ozone/dev-support/checks/findbugs.sh
- - uses: actions/upload-artifact@master
- if: always()
- with:
- name: findbugs
- path: target/findbugs
- acceptance:
- name: acceptance
- runs-on: ubuntu-18.04
- needs:
- - build
- - rat
- - checkstyle
- - unit
- - findbugs
- steps:
- - uses: actions/checkout@master
- - uses: ./.github/buildenv
- with:
- args: ./hadoop-ozone/dev-support/checks/build.sh
- - run: sudo pip install robotframework
- - run: sudo chown runner -R .
- - run: cd ./hadoop-ozone/dist/target/ozone-*-SNAPSHOT/ && mkdir .aws && sudo chown 1000 .aws
- - run: ./hadoop-ozone/dev-support/checks/acceptance.sh
- - uses: actions/upload-artifact@master
- if: always()
- with:
- name: acceptance
- path: target/acceptance
+ name: unit
+ path: target/unit
+# checkstyle:
+# name: checkstyle
+# runs-on: ubuntu-18.04
+# steps:
+# - uses: actions/checkout@master
+# - uses: ./.github/buildenv
+# with:
+# args: ./hadoop-ozone/dev-support/checks/checkstyle.sh
+# - uses: actions/upload-artifact@master
+# if: always()
+# with:
+# name: checkstyle
+# path: target/checkstyle
+# findbugs:
+# name: findbugs
+# runs-on: ubuntu-18.04
+# steps:
+# - uses: actions/checkout@master
+# - uses: ./.github/buildenv
+# with:
+# args: ./hadoop-ozone/dev-support/checks/findbugs.sh
+# - uses: actions/upload-artifact@master
+# if: always()
+# with:
+# name: findbugs
+# path: target/findbugs
+# acceptance:
+# name: acceptance
+# runs-on: ubuntu-18.04
+# needs:
+# - build
+# - rat
+# - checkstyle
+# - unit
+# - findbugs
+# steps:
+# - uses: actions/checkout@master
+# - uses: ./.github/buildenv
+# with:
+# args: ./hadoop-ozone/dev-support/checks/build.sh
+# - run: sudo pip install robotframework
+# - run: sudo chown runner -R .
+# - run: cd ./hadoop-ozone/dist/target/ozone-*-SNAPSHOT/ && mkdir .aws && sudo chown 1000 .aws
+# - run: ./hadoop-ozone/dev-support/checks/acceptance.sh
+# - uses: actions/upload-artifact@master
+# if: always()
+# with:
+# name: acceptance
+# path: target/acceptance
diff --git a/hadoop-ozone/dev-support/checks/sonar.sh b/hadoop-ozone/dev-support/checks/sonar.sh
new file mode 100755
index 0000000..74d909c
--- /dev/null
+++ b/hadoop-ozone/dev-support/checks/sonar.sh
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+# 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.
+DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
+cd "$DIR/../../.." || exit 1
+
+if [ ! "$SONAR_TOKEN" ]; then
+ echo "SONAR_TOKEN environment variable should be set"
+ exit 1
+fi
+mvn org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar
diff --git a/pom.xml b/pom.xml
index 4c03e2b..a818cb9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -229,6 +229,11 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<snakeyaml.version>1.16</snakeyaml.version>
<hbase.one.version>1.2.6</hbase.one.version>
<hbase.two.version>2.0.0-beta-1</hbase.two.version>
+
+ <!-- sonar cloud integration. Token can be set with using SONAR_TOKEN
+ environment variable.-->
+ <sonar.host.url>https://sonarcloud.io</sonar.host.url>
+ <sonar.organization>apache</sonar.organization>
</properties>
---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-commits-help@hadoop.apache.org