From 268aef129925a1c032309d25ab8a0d438b085c63 Mon Sep 17 00:00:00 2001 From: Juraj Piar Date: Mon, 13 May 2024 09:55:50 +0100 Subject: [PATCH] feat(ci): uses rsksmart docker images --- .github/workflows/build_and_test.yml | 18 ++++++++++-------- build.gradle | 16 ++++++++++++++++ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 8940a6412b8..d9d4c137b66 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -65,6 +65,8 @@ jobs: steps: - uses: actions/checkout@v2 - name: Run SonarQube analysis + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: | echo "Installing git" apt-get update && apt-get install -yqq git @@ -92,8 +94,8 @@ jobs: echo "Running SonarQube analysis" ./configure.sh - ./gradlew sonarqube --no-daemon -x build -x test $extra_flags \ - -Dsonar.organization=rsksmart -Dsonar.host.url="$sonar_url" -Dsonar.login="$sonar_token" + ./gradlew sonarqube --no-daemon -x build -x test $extra_flags + tests: needs: build @@ -164,10 +166,10 @@ jobs: - name: Build and push Docker images run: | - docker build -t jurajpiar/bitcoind1:latest -f bitcoind1.Dockerfile . - docker push jurajpiar/bitcoind1:latest - docker build -t jurajpiar/bitcoind2:latest -f bitcoind2.Dockerfile . - docker push jurajpiar/bitcoind2:latest + docker build -t rsksmart/mit_bitcoind1:latest -f bitcoind1.Dockerfile . + docker push rsksmart/mit_bitcoind1:latest + docker build -t rsksmart/mit_bitcoind2:latest -f bitcoind2.Dockerfile . + docker push rsksmart/mit_bitcoind2:latest mining-tests: @@ -177,14 +179,14 @@ jobs: runs-on: ubuntu-latest services: bitcoind1: - image: jurajpiar/bitcoind1:latest + image: rsksmart/mit_bitcoind1:latest ports: - 8331:8331 - 31591:31591 - 32591:32591 options: --name bitcoind1 bitcoind2: - image: jurajpiar/bitcoind2:latest + image: rsksmart/mit_bitcoind2:latest ports: - 8332:8332 - 31592:31592 diff --git a/build.gradle b/build.gradle index e26d0acfee6..f852ec14192 100644 --- a/build.gradle +++ b/build.gradle @@ -7,3 +7,19 @@ subprojects { group = 'co.rsk' version = config.modifier?.trim() ? config.versionNumber + "-" + config.modifier : config.versionNumber } + +sonarqube { + properties { + property "sonar.organisation", "rsksmart" + property "sonar.scm.provider", "git" + property "sonar.sources", "src/main/java" + property "sonar.java.binaries", "rsksmart/build/classes/java/main" + property "sonar.java.libraries", "rsksmart/build/libs" + property "sonar.login", System.getenv('SONAR_TOKEN') + property "sonar.host.url", "https://sonarcloud.io" + property "sonar.java.source", "1.8" + property "sonar.java.target", "1.17" + property "sonar.junit.reportsPath", "rsksmart/build/test-results/test" + property "sonar.jacoco.reportPaths", "rsksmart/build/jacoco/test.exec" + } +} \ No newline at end of file