This repository was archived by the owner on Sep 27, 2023. It is now read-only.
Repository navigation
chore: downstream check for all libraries in single job #322
Merged
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
b1d58a8
[DO_NOT_MERGE]chore: downstream check for all libraries in single job
Neenu1995 3ada5bc
chore: move to java-core directory
Neenu1995 832f154
chore: fix api-common version
Neenu1995 d42ee8a
chore: change publish command
Neenu1995 ceac517
chore: make java version 11
Neenu1995 3c82f16
chore: make java version 8
Neenu1995 609304c
chore: clone core with https
Neenu1995 d8d16c6
chore: test more libraries
Neenu1995 770d687
chore: check all libraries
Neenu1995 dba8ff1
chore: check all libraries
Neenu1995 dffef78
chore: trigger job with label
Neenu1995 355e3a0
chore: trigger on pull request with label
Neenu1995 730d781
chore: trigger on pull request target with label
Neenu1995 fa1c070
chore: run on pull-request
Neenu1995 b62824c
chore: run on pull-request labeled
Neenu1995 41fc717
chore: run on pull-request labeled
Neenu1995 8831fa3
chore: only run on pull request label
Neenu1995 2c7976b
chore: generalize script
Neenu1995 b0dae0f
chore: add correct parameters
Neenu1995 8e826d6
Merge branch 'main' into single-script-downstream-check
Neenu1995 86a2c38
chore: minor fixes
Neenu1995 96ebfbe
chore: add retry
Neenu1995 3630165
Merge branch 'main' into single-script-downstream-check
Neenu1995 784ac2d
fix typo
Neenu1995 010a16e
remove timeout
Neenu1995 fef4565
Update downstream.yaml
Neenu1995 f48691c
chore: fix typo
Neenu1995 20fded4
chore: debug
Neenu1995 cad8f08
chore: debug 2
Neenu1995 d8902fc
chore: debug 3
Neenu1995 3124366
chore: try cloning in separate directories
Neenu1995 9fad986
chore: fix folder path
Neenu1995 4819345
chore: remove retry
Neenu1995 334716d
chore: try all librraies
Neenu1995 72be1ee
Merge branch 'main' into single-script-downstream-check
Neenu1995 8e97019
chore: fix maven build command
Neenu1995 e483ff4
Merge branch 'main' into single-script-downstream-check
Neenu1995 58ebf6e
Update downstream-client-library-check.sh
Neenu1995 4e95e3e
Update downstream-client-library-check.sh
Neenu1995 245a375
Update downstream.yaml
Neenu1995 ca68c37
Update downstream-client-library-check.sh
Neenu1995 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,142 @@ | ||
| on: | ||
| pull_request: | ||
| types: [ labeled ] | ||
| branches: | ||
| - main | ||
| name: downstream | ||
| jobs: | ||
| dependencies: | ||
| if: ${{ github.event.label.name == 'downstream-check:run' }} | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| java: [8] | ||
| repo: | ||
| # This list needs to be updated manually until an automated solution is in place. | ||
| - accessapproval | ||
|
lesv marked this conversation as resolved.
Resolved
|
||
| - accesscontextmanager | ||
| - aiplatform | ||
| - analytics-admin | ||
| - analytics-data | ||
| - api-gateway | ||
| - apigee-connect | ||
| - appengine-admin | ||
| - area120-tables | ||
| - artifact-registry | ||
| - asset | ||
| - assured-workloads | ||
| - automl | ||
| - bigquery | ||
| - bigqueryconnection | ||
| - bigquerydatatransfer | ||
| - bigquerymigration | ||
| - bigqueryreservation | ||
| - bigtable | ||
| - billing | ||
| - billingbudgets | ||
| - binary-authorization | ||
| - channel | ||
| - cloudbuild | ||
| - compute | ||
| - contact-center-insights | ||
| - container | ||
| - containeranalysis | ||
| - data-fusion | ||
| - datacatalog | ||
| - dataflow | ||
| - datalabeling | ||
| - dataproc | ||
| - dataproc-metastore | ||
| - datastore | ||
| - datastream | ||
| - debugger-client | ||
| - deploy | ||
| - dialogflow | ||
| - dialogflow-cx | ||
| - dlp | ||
| - dms | ||
| - dns | ||
| - document-ai | ||
| - domains | ||
| - errorreporting | ||
| - essential-contacts | ||
| - eventarc | ||
| - filestore | ||
| - firestore | ||
| - functions | ||
| - game-servers | ||
| - gke-connect-gateway | ||
| - gkehub | ||
| - gsuite-addons | ||
| - iam-admin | ||
| - iamcredentials | ||
| - iot | ||
| - kms | ||
| - language | ||
| - life-sciences | ||
| - logging | ||
| - logging-logback | ||
| - managed-identities | ||
| - mediatranslation | ||
| - memcache | ||
| - monitoring | ||
| - monitoring-dashboards | ||
| - network-management | ||
| - network-security | ||
| - networkconnectivity | ||
| - notebooks | ||
| - orchestration-airflow | ||
| - orgpolicy | ||
| - os-config | ||
| - os-login | ||
| - phishingprotection | ||
| - policy-troubleshooter | ||
| - private-catalog | ||
| - profiler | ||
| - pubsublite | ||
| - recaptchaenterprise | ||
| - recommendations-ai | ||
| - recommender | ||
| - redis | ||
| - resource-settings | ||
| - resourcemanager | ||
| - retail | ||
| - scheduler | ||
| - secretmanager | ||
| - security-private-ca | ||
| - securitycenter | ||
| - securitycenter-settings | ||
| - service-control | ||
| - service-management | ||
| - service-usage | ||
| - servicedirectory | ||
| - shell | ||
| - spanner | ||
| - spanner-jdbc | ||
| - speech | ||
| - storage | ||
| - storage-nio | ||
| - storage-transfer | ||
| - talent | ||
| - tasks | ||
| - texttospeech | ||
| - tpu | ||
| - trace | ||
| - translate | ||
| - video-intelligence | ||
| - video-transcoder | ||
| - vision | ||
| - vpcaccess | ||
| - webrisk | ||
| - websecurityscanner | ||
| - workflow-executions | ||
| - workflows | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - uses: actions/setup-java@v1 | ||
| with: | ||
| java-version: ${{matrix.java}} | ||
| - run: java -version | ||
| - run: sudo apt-get install libxml2-utils | ||
| - run: .kokoro/downstream-client-library-check.sh api-common ${{matrix.repo}} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| #!/bin/bash | ||
| # Copyright 2020 Google LLC | ||
| # | ||
| # Licensed 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. | ||
|
|
||
| # Presubmit to ensure the dependencies of the Google Libraries BOM, with the modification of change | ||
| # in the PR, pick up the highest versions among transitive dependencies. | ||
| # https://maven.apache.org/enforcer/enforcer-rules/requireUpperBoundDeps.html | ||
| set -eo pipefail | ||
| # Display commands being run. | ||
| set -x | ||
|
|
||
| CORE_LIBRARY_ARTIFACT=$1 | ||
| CLIENT_LIBRARY=$2 | ||
| ## Get the directory of the build script | ||
| scriptDir="$(realpath "$(dirname "${BASH_SOURCE[0]}")")" | ||
| ## cd to the parent directory, i.e. the root of the git repo | ||
| cd "${scriptDir}"/.. | ||
|
|
||
| CORE_VERSION=$( ./gradlew -q properties | grep '^version: ' | cut -d' ' -f2 ) | ||
| echo "$CORE_VERSION" | ||
|
|
||
| # Publish api-common to local maven to make it available for downstream libraries | ||
| ./gradlew publishToMavenLocal | ||
|
|
||
| # Round 1 | ||
| # Check this java core library against HEAD of java-shared dependencies | ||
|
|
||
| git clone "https://github.com/googleapis/java-shared-dependencies.git" --depth=1 | ||
| pushd java-shared-dependencies/first-party-dependencies | ||
|
|
||
| # replace version | ||
| xmllint --shell pom.xml << EOF | ||
| setns x=http://maven.apache.org/POM/4.0.0 | ||
| cd .//x:artifactId[text()="${CORE_LIBRARY_ARTIFACT}"] | ||
| cd ../x:version | ||
| set ${CORE_VERSION} | ||
| save pom.xml | ||
| EOF | ||
|
|
||
| cd .. | ||
| mvn verify install -B -V -ntp -fae \ | ||
| -DskipTests=true \ | ||
| -Dmaven.javadoc.skip=true \ | ||
| -Dgcloud.download.skip=true \ | ||
| -Denforcer.skip=true | ||
|
|
||
| SHARED_DEPS_VERSION_POM=pom.xml | ||
| # Namespace (xmlns) prevents xmllint from specifying tag names in XPath | ||
| SHARED_DEPS_VERSION=$(sed -e 's/xmlns=".*"//' ${SHARED_DEPS_VERSION_POM} | xmllint --xpath '/project/version/text()' -) | ||
|
|
||
| if [ -z "${SHARED_DEPS_VERSION}" ]; then | ||
| echo "Version is not found in ${SHARED_DEPS_VERSION_POM}" | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Round 2 | ||
| # Check this BOM against java client libraries | ||
| git clone "https://github.com/googleapis/java-${CLIENT_LIBRARY}.git" --depth=1 | ||
| pushd java-"${CLIENT_LIBRARY}" | ||
|
|
||
| if [[ $CLIENT_LIBRARY == "bigtable" ]]; then | ||
| pushd google-cloud-bigtable-deps-bom | ||
| fi | ||
|
|
||
| # replace version | ||
| xmllint --shell pom.xml << EOF | ||
| setns x=http://maven.apache.org/POM/4.0.0 | ||
| cd .//x:artifactId[text()="google-cloud-shared-dependencies"] | ||
| cd ../x:version | ||
| set ${SHARED_DEPS_VERSION} | ||
| save pom.xml | ||
| EOF | ||
|
|
||
| if [[ $CLIENT_LIBRARY == "bigtable" ]]; then | ||
| popd | ||
| fi | ||
|
|
||
| mvn verify install -B -V -ntp -fae \ | ||
| -Dmaven.javadoc.skip=true \ | ||
| -Dgcloud.download.skip=true \ | ||
| -Denforcer.skip=true |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.