Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

chore: downstream check for all libraries in single job #1581

Merged
merged 32 commits into from
Feb 11, 2022
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
521075f
chore: check downstream libraries in gax
Neenu1995 Dec 10, 2021
efbae3c
Merge branch 'main' into single-script-downstream-check
Neenu1995 Dec 10, 2021
792b27f
chore: fix typo
Neenu1995 Dec 10, 2021
f80ca41
chore: run check on all libraries
Neenu1995 Dec 10, 2021
6706d87
chore: check all libaries
Neenu1995 Dec 16, 2021
5026346
chore: fix tab space
Neenu1995 Dec 29, 2021
581772d
chore: only run if checks if labelled
Neenu1995 Dec 29, 2021
7a94098
chore: fix comments
Neenu1995 Jan 19, 2022
7c2b057
Merge branch 'main' into single-script-downstream-check
Neenu1995 Jan 19, 2022
a8b6687
Update .kokoro/downstream-client-library-check.sh
Neenu1995 Jan 19, 2022
3b3a820
Update .kokoro/downstream-client-library-check.sh
Neenu1995 Jan 19, 2022
1fbd6f6
Update .kokoro/downstream-client-library-check.sh
Neenu1995 Jan 19, 2022
7b08448
Update .kokoro/downstream-client-library-check.sh
Neenu1995 Jan 19, 2022
9cfa3f2
Update .kokoro/downstream-client-library-check.sh
Neenu1995 Jan 19, 2022
b843bfa
Update .kokoro/downstream-client-library-check.sh
Neenu1995 Jan 19, 2022
12d1038
Update build.gradle
Neenu1995 Jan 19, 2022
b06b48e
chore: update comments
Neenu1995 Jan 19, 2022
c40f165
chore: fix license year
Neenu1995 Jan 19, 2022
8b57ee9
chore: add retry
Neenu1995 Jan 20, 2022
ad0db4a
Merge branch 'main' into single-script-downstream-check
Neenu1995 Jan 20, 2022
17e5905
change timeout to 15 minutes.
Neenu1995 Jan 20, 2022
31e0fd8
chore: revert display commands
Neenu1995 Jan 20, 2022
6dc9ae2
chore: update timeout to 100
Neenu1995 Jan 20, 2022
06736be
chore: remove retry
Neenu1995 Jan 20, 2022
fedd749
Merge branch 'main' into single-script-downstream-check
Neenu1995 Jan 20, 2022
85c60f0
Merge branch 'main' into single-script-downstream-check
Neenu1995 Feb 9, 2022
e160c8c
Merge branch 'main' into single-script-downstream-check
Neenu1995 Feb 9, 2022
43aa98f
Update downstream-client-library-check.sh
Neenu1995 Feb 9, 2022
b4486f2
Update downstream-client-library-check.sh
Neenu1995 Feb 9, 2022
6ea06d1
Update downstream.yaml
Neenu1995 Feb 11, 2022
56bfe3f
Update downstream-client-library-check.sh
Neenu1995 Feb 11, 2022
a404db9
Merge branch 'main' into single-script-downstream-check
Neenu1995 Feb 11, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 141 additions & 0 deletions .github/workflows/downstream.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
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:
Neenu1995 marked this conversation as resolved.
Show resolved Hide resolved
- accessapproval
- 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 ${{matrix.repo}}
92 changes: 92 additions & 0 deletions .kokoro/downstream-client-library-check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#!/bin/bash
# Copyright 2022 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.

set -eo pipefail
# Display commands being run.
set -x
Neenu1995 marked this conversation as resolved.
Show resolved Hide resolved

CLIENT_LIBRARY=$1
## 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}/..

# Round 1
# Publish gax to local maven to make it available for downstream libraries
./gradlew publishToMavenLocal

# Read current gax version
GAX_VERSION=$( ./gradlew -q :gax:properties | grep '^version: ' | cut -d' ' -f2 )

# Round 2
# Run this gax-java 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()="gax-bom"]
cd ../x:version
set ${GAX_VERSION}
cd ../..
cd .//x:artifactId[text()="gax-grpc"]
cd ../x:version
set ${GAX_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

# Namespace (xmlns) prevents xmllint from specifying tag names in XPath
SHARED_DEPS_VERSION=$( sed -e 's/xmlns=".*"//' pom.xml | xmllint --xpath '/project/version/text()' - )

if [ -z "${SHARED_DEPS_VERSION}" ]; then
echo "Version is not found in pom.xml"
exit 1
fi

# Round 3
# Run this shared-dependencies 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