Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bc40030

Browse files
suztomogcf-owl-bot[bot]
andauthoredNov 1, 2022
ci: not to check flatten plugin behavior (#2391)
* ci: not to check flatten plugin behavior We have had the check for the flatten-maven-plugin in each Cloud Java client repository. However, the behavior of the plugin has been stable and its not each repository's responsibility to assert the plugin's behavior. A new check has added at the googleapis/java-shared-config repository to assert the plugin's behavior when we upgrade its version. * 🦉 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>
1 parent 55d5f1f commit bc40030

File tree

2 files changed

+3
-58
lines changed

2 files changed

+3
-58
lines changed
 

‎.kokoro/dependencies.sh

+3-57
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# limitations under the License.
1515

1616
set -eo pipefail
17+
shopt -s nullglob
1718

1819
## Get the directory of the build script
1920
scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}"))
@@ -41,9 +42,9 @@ function determineMavenOpts() {
4142
then
4243
# MaxPermSize is no longer supported as of jdk 17
4344
echo -n "-Xmx1024m"
44-
else
45+
else
4546
echo -n "-Xmx1024m -XX:MaxPermSize=128m"
46-
fi
47+
fi
4748
}
4849

4950
export MAVEN_OPTS=$(determineMavenOpts)
@@ -56,58 +57,3 @@ retry_with_backoff 3 10 \
5657
-Dclirr.skip=true
5758

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

‎owlbot.py

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
java.common_templates(excludes=[
2020
'.kokoro/nightly/samples.cfg',
2121
'.kokoro/presubmit/samples.cfg',
22-
'.kokoro/dependencies.sh',
2322
'codecov.yaml',
2423
'renovate.json',
2524
'.kokoro/build.sh'

0 commit comments

Comments
 (0)
Failed to load comments.