Moving SonarCloud to GitHub Actions
This commit is contained in:
committed by
Aleksandar Vidakovic
parent
6fcf8ad861
commit
a9feedbdf0
@@ -1,4 +1,4 @@
|
||||
name: Fineract Docker build for PostgreSQL
|
||||
name: Fineract Docker build - PostgreSQL
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Fineract Docker build
|
||||
name: Fineract Docker build - MariaDB
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Fineract Gradle build - basicauth - PostgreSQL
|
||||
name: Fineract Gradle build - PostgreSQL
|
||||
on: [push, pull_request]
|
||||
|
||||
permissions:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Fineract Gradle build - basicauth
|
||||
name: Fineract Gradle build - MariaDB
|
||||
on: [push, pull_request]
|
||||
|
||||
permissions:
|
||||
|
||||
@@ -12,8 +12,8 @@ jobs:
|
||||
SONAR_ORGANIZATION: ${{ secrets.SONAR_ORGANIZATION }}
|
||||
SONAR_PROJECT_KEY: ${{ secrets.SONAR_PROJECT_KEY }}
|
||||
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
|
||||
steps:
|
||||
- name: Set up cache
|
||||
uses: actions/cache@v3
|
||||
@@ -34,4 +34,4 @@ jobs:
|
||||
- name: Validate Gradle wrapper
|
||||
uses: gradle/wrapper-validation-action@859c33240bd026ce8d5f711f5adcc65c2f8eafc1
|
||||
- name: Sonarqube
|
||||
run: ./gradlew --no-daemon --console=plain -Dsonar.verbose=true -Dsonar.login=$SONAR_TOKEN -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.organization=$SONAR_ORGANIZATION -Dsonar.projectKey=$SONAR_PROJECT_KEY --info -x rat -x test -x spotbugsMain -x spotbugsTest -x spotbugsGenerated -x licenseMain -x licenseTest -x checkstyleMain -x checkstyleTest --info --stacktrace build sonarqube
|
||||
run: ./gradlew --no-daemon --console=plain -Dsonar.verbose=true -Dsonar.login=$SONAR_TOKEN -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.organization=$SONAR_ORGANIZATION -Dsonar.projectKey=$SONAR_PROJECT_KEY --info --stacktrace sonarqube
|
||||
|
||||
-80
@@ -1,80 +0,0 @@
|
||||
# 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.
|
||||
#
|
||||
|
||||
# https://docs.travis-ci.com/user/reference/linux/
|
||||
# Must use a fixed distribution (and remember to occassionally upgrade..)
|
||||
# to avoid surprise changes such as https://issues.apache.org/jira/browse/FINERACT-763
|
||||
dist: bionic
|
||||
|
||||
language: generic
|
||||
|
||||
addons:
|
||||
sonarcloud:
|
||||
organization: "apache"
|
||||
token:
|
||||
secure: "Q2E9ijK+9+R6nkb9o2FQrKUiAozp0325mlGfM25rGV3mCRPyWR/lU8o48r2eaBEX8SEvMvXIO3XXD9SPyUX2+svLz0MOMdfZfNveg6jmcHNRjkzzBK0bMIIGbEH/YqJ+psl4nDmlDd6IK4685/1JSRUJLqeKKK2ulixm6PXcmwZWeKD6TjyXsW50zz3yYIOuROHzys/M6H05h1dZD3j6ztnRsjbr7SmqFEVWSRgEd/aAs+HZB9Fv1xN66csRoQUQKgzoBO9egAQcel65Av0Bf+pOQuzVDVyXNohZEYia02MCGlC6OFvtL7xIXGf/vo02RdnlN4Jnma6P37TaNrmpk2e+EGJaZHmL9cb98+Zc39uPb7qEZkMfDdKrW6QVRtScSuCJzpY58WRgTS0jLCxsDBAMfsrIvWbHntFZL9q5aEkFgecj0pg9u6WHxgA8cuPUY5QzHQo9fEUxNJHGJHQ2FkafLniqJp7DVbsyQHmEggaTrGGrketeYvCbSR1oOnBgImUwzjIV9/zOdd10Wzi8x9HsmzrGBPSBaO4fBxjC1LZwdyue2a2+oKvBqpAGcLpGaCRfHTh2yPXhZW4bw11rOmQxgtOQVBXhveciWAUQuVXIak+RZnu/zRvnul9sZ6bb1hEUPkpUypk+FDeLm8T7y2A++u/jBam2vLc0iff5xtA="
|
||||
|
||||
# See https://issues.apache.org/jira/browse/FINERACT-937 for background re. what below is all about..
|
||||
# We basically remove the outdated OpenJDK 11.0.2 which Travis image grabbed from java.net in
|
||||
# https://github.com/travis-ci/travis-cookbooks/blob/master/cookbooks/travis_jdk/files/install-jdk.sh#L200
|
||||
# (which has 11.0.2 hard-coded!), and instead replace it with the latest Azul Zulu Debian package.
|
||||
# NB /usr/local/lib/jvm/openjdk11/bin is also on the PATH, but there's no need to change it (because we rm -rf anyway)
|
||||
# Installing Azul Zulu as per official instructions https://docs.azul.com/core/zulu-openjdk/install/debian
|
||||
before_install:
|
||||
- echo $JAVA_HOME
|
||||
- which java
|
||||
- sudo rm -rf /usr/local/lib/jvm/
|
||||
|
||||
install:
|
||||
- unset _JAVA_OPTIONS
|
||||
- sudo apt-get -q update
|
||||
- sudo apt-get -yq install gnupg curl dirmngr
|
||||
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9
|
||||
- curl -O https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb
|
||||
- sudo apt-get -yq install ./zulu-repo_1.0.0-3_all.deb
|
||||
- sudo apt-get -q update
|
||||
- sudo apt-get -yq install zulu17-jdk
|
||||
- export JAVA_HOME=/usr/lib/jvm/zulu17
|
||||
|
||||
# https://docs.travis-ci.com/user/languages/java/#caching
|
||||
before_cache:
|
||||
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
|
||||
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.gradle/caches/
|
||||
- $HOME/.gradle/wrapper/
|
||||
- $HOME/.m2
|
||||
|
||||
# Check Java environment variables
|
||||
before_script:
|
||||
- echo $JDK_JAVA_OPTIONS
|
||||
- echo $JAVA_OPTIONS
|
||||
- echo $JAVA_HOME
|
||||
- which java
|
||||
- java -version
|
||||
- which javac
|
||||
- javac -version
|
||||
- $JAVA_HOME/bin/java -version
|
||||
|
||||
script:
|
||||
- date
|
||||
# Using travis_wait for a proccess that could take longer than 20 minutes, in this case the SonaQube analysis
|
||||
# https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received
|
||||
- travis_wait 30 ./gradlew -q --no-daemon --console=plain -Dsonar.projectKey=apache_fineract -x rat -x test sonarqube -Pcoverage=true
|
||||
- date
|
||||
Reference in New Issue
Block a user