2020 filters : |
2121 library:
2222 - 'sdk-platform-java/**'
23+ - '.github/workflows/sdk-platform-java-sonar.yaml'
2324 build :
2425 needs : filter
2526 if : needs.filter.outputs.library == 'true' && (github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request')
@@ -46,13 +47,18 @@ jobs:
4647 path : ~/.m2
4748 key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
4849 restore-keys : ${{ runner.os }}-m2
49- - name : Install modules to local maven
50- run : |
51- mvn install -T 1C -DskipTests -ntp -B
52- cd java-showcase
53- mvn install -T 1C -DskipTests -ntp -B
50+ - name : Install sdk-platform-modules
51+ shell : bash
52+ run : .kokoro/build.sh
53+ env :
54+ BUILD_SUBDIR : sdk-platform-java
55+ JOB_TYPE : install
56+ - name : Install java-showcase
57+ shell : bash
58+ run : mvn install -T 1C -DskipTests -ntp -B
59+ working-directory : sdk-platform-java/java-showcase
5460 - name : Parse showcase version
55- working-directory : java-showcase/gapic-showcase
61+ working-directory : sdk-platform-java/ java-showcase/gapic-showcase
5662 run : echo "SHOWCASE_VERSION=$(mvn help:evaluate -Dexpression=gapic-showcase.version -q -DforceStdout)" >> "$GITHUB_ENV"
5763 - name : Install showcase server
5864 run : |
@@ -68,28 +74,29 @@ jobs:
6874 # step for a few tests (env var tests) may be overkill and should be better covered
6975 # when we can upgrade to JUnit 5 (https://github.com/googleapis/sdk-platform-java/issues/1611#issuecomment-1970079325)
7076 - name : Build and analyze for full test coverage
77+ working-directory : sdk-platform-java
7178 env :
7279 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
73- SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
80+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN_FOR_GENERATOR }}
7481 run : |
7582 mvn -B verify -Pquick-build \
7683 -DenableFullTestCoverage \
7784 -Penable-integration-tests \
7885 org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
79- -Dsonar.projectKey=googleapis_gapic-generator-java \
86+ -Dsonar.projectKey=googleapis_google-cloud-java_generator \
8087 -Dsonar.organization=googleapis \
8188 -Dsonar.host.url=https://sonarcloud.io
8289 - name : Build and analyze Showcase Integration Tests Coverage
90+ working-directory : sdk-platform-java
8391 env :
8492 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
85- SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
93+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN_FOR_SHOWCASE }}
8694 run : |
8795 mvn -B clean verify -Pquick-build \
8896 -DskipUnitTests \
8997 -Penable-integration-tests \
9098 -DenableShowcaseTestCoverage \
9199 org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
92- -Dsonar.projectKey=googleapis_gapic-generator-java_integration_tests \
100+ -Dsonar.projectKey=googleapis_google-cloud-java_showcase \
93101 -Dsonar.organization=googleapis \
94- -Dsonar.host.url=https://sonarcloud.io \
95- -Dsonar.projectName=java_showcase_integration_tests
102+ -Dsonar.host.url=https://sonarcloud.io
0 commit comments