Skip to content

Commit 8cbf2f0

Browse files
test: add presubmit to verify java_library requirements file (#1701) (#784)
* test: add presubmit to verify java_library requirements file Source-Link: https://togithub.com/googleapis/synthtool/commit/d14818215edae9910959439def57cf180d58f4c9 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:27d0a1232b3656f0610cc1a55beb157cb3b63b1ca8b3dfba0bcd8b9dfecda4a1
1 parent 34db8a9 commit 8cbf2f0

File tree

5 files changed

+15
-60
lines changed

5 files changed

+15
-60
lines changed

java-os-login/.github/.OwlBot.lock.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest
16-
digest: sha256:5643a4e1b729803e67ddceee450e87052527b37cac394bf900b4f8e3d1bb3e9b
16+
digest: sha256:27d0a1232b3656f0610cc1a55beb157cb3b63b1ca8b3dfba0bcd8b9dfecda4a1

java-os-login/.kokoro/dependencies.sh

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -57,54 +57,3 @@ retry_with_backoff 3 10 \
5757
-Dclirr.skip=true
5858

5959
mvn -B dependency:analyze -DfailOnWarning=true
60-
61-
echo "****************** DEPENDENCY LIST COMPLETENESS CHECK *******************"
62-
## Run dependency list completeness check
63-
function completenessCheck() {
64-
# Output dep list with compile scope generated using the original pom
65-
# Running mvn dependency:list on Java versions that support modules will also include the module of the dependency.
66-
# This is stripped from the output as it is not present in the flattened pom.
67-
# Only dependencies with 'compile' or 'runtime' scope are included from original dependency list.
68-
msg "Generating dependency list using original pom..."
69-
mvn dependency:list -f pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e 's/ --.*//' >.org-list.txt
70-
71-
# Output dep list generated using the flattened pom (only 'compile' and 'runtime' scopes)
72-
msg "Generating dependency list using flattened pom..."
73-
mvn dependency:list -f .flattened-pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' >.new-list.txt
74-
75-
# Compare two dependency lists
76-
msg "Comparing dependency lists..."
77-
diff .org-list.txt .new-list.txt >.diff.txt
78-
if [[ $? == 0 ]]
79-
then
80-
msg "Success. No diff!"
81-
else
82-
msg "Diff found. See below: "
83-
msg "You can also check .diff.txt file located in $1."
84-
cat .diff.txt
85-
return 1
86-
fi
87-
}
88-
89-
# Allow failures to continue running the script
90-
set +e
91-
92-
error_count=0
93-
for path in **/.flattened-pom.xml
94-
do
95-
# Check flattened pom in each dir that contains it for completeness
96-
dir=$(dirname "$path")
97-
pushd "$dir"
98-
completenessCheck "$dir"
99-
error_count=$(($error_count + $?))
100-
popd
101-
done
102-
103-
if [[ $error_count == 0 ]]
104-
then
105-
msg "All checks passed."
106-
exit 0
107-
else
108-
msg "Errors found. See log statements above."
109-
exit 1
110-
fi

java-os-login/.kokoro/requirements.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ pycparser==2.21
1616
pyperclip==1.8.2
1717
python-dateutil==2.8.2
1818
requests==2.27.1
19+
certifi==2022.9.24
1920
importlib-metadata==4.8.3
2021
zipp==3.6.0
2122
google_api_core==2.8.2
2223
google-cloud-storage==2.0.0
24+
google-resumable-media==2.3.3
2325
google-cloud-core==2.3.1
2426
typing-extensions==4.1.1
2527
urllib3==1.26.12

java-os-login/.kokoro/requirements.txt

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ cachetools==4.2.4 \
1616
# via
1717
# -r requirements.in
1818
# google-auth
19-
certifi==2022.9.14 \
20-
--hash=sha256:36973885b9542e6bd01dea287b2b4b3b21236307c56324fcc3f1160f2d655ed5 \
21-
--hash=sha256:e232343de1ab72c2aa521b625c80f699e356830fd0e2c620b465b304b17b0516
22-
# via requests
19+
certifi==2022.9.24 \
20+
--hash=sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14 \
21+
--hash=sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382
22+
# via
23+
# -r requirements.in
24+
# requests
2325
cffi==1.15.1 \
2426
--hash=sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5 \
2527
--hash=sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef \
@@ -218,7 +220,9 @@ google-crc32c==1.3.0 \
218220
google-resumable-media==2.3.3 \
219221
--hash=sha256:27c52620bd364d1c8116eaac4ea2afcbfb81ae9139fb3199652fcac1724bfb6c \
220222
--hash=sha256:5b52774ea7a829a8cdaa8bd2d4c3d4bc660c91b30857ab2668d0eb830f4ea8c5
221-
# via google-cloud-storage
223+
# via
224+
# -r requirements.in
225+
# google-cloud-storage
222226
googleapis-common-protos==1.56.3 \
223227
--hash=sha256:6f1369b58ed6cf3a4b7054a44ebe8d03b29c309257583a2bbdc064cd1e4a1442 \
224228
--hash=sha256:87955d7b3a73e6e803f2572a33179de23989ebba725e05ea42f24838b792e461

java-os-login/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,20 @@ If you are using Maven without BOM, add this to your dependencies:
4949
If you are using Gradle 5.x or later, add this to your dependencies:
5050

5151
```Groovy
52-
implementation platform('com.google.cloud:libraries-bom:26.1.3')
52+
implementation platform('com.google.cloud:libraries-bom:26.1.4')
5353
5454
implementation 'com.google.cloud:google-cloud-os-login'
5555
```
5656
If you are using Gradle without BOM, add this to your dependencies:
5757

5858
```Groovy
59-
implementation 'com.google.cloud:google-cloud-os-login:2.2.7'
59+
implementation 'com.google.cloud:google-cloud-os-login:2.4.0'
6060
```
6161

6262
If you are using SBT, add this to your dependencies:
6363

6464
```Scala
65-
libraryDependencies += "com.google.cloud" % "google-cloud-os-login" % "2.2.7"
65+
libraryDependencies += "com.google.cloud" % "google-cloud-os-login" % "2.4.0"
6666
```
6767

6868
## Authentication

0 commit comments

Comments
 (0)