Skip to content

Commit b1520ed

Browse files
chore: pin versions of certifi and google-resumable-media (#1660) (#1010)
* chore: pin versions of certifi and google-resumable-media (#1660) chore: pin versions of certifi and google-resumable-media Source-Link: googleapis/synthtool@09c4fcd Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:264c6d5da60ff1684fbdd2b268d6a3ffca2038246e0948a06f15ca0c3cf28ce8 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: losalex <90795544+losalex@users.noreply.github.com>
1 parent 6eebdc4 commit b1520ed

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

java-errorreporting/.github/.OwlBot.lock.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest
16-
digest: sha256:ae72564aa9c368b9ccd96f4af21f87889fd83b9e60635b80844deb5a2ccd08aa
16+
digest: sha256:264c6d5da60ff1684fbdd2b268d6a3ffca2038246e0948a06f15ca0c3cf28ce8
17+

java-errorreporting/.kokoro/dependencies.sh

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,54 @@ 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

0 commit comments

Comments
 (0)