From fd61740bd07d9345196d7a34811aa7ae669168b4 Mon Sep 17 00:00:00 2001 From: Vratko Polak Date: Fri, 6 Oct 2017 20:05:51 +0200 Subject: [PATCH] Bug 9192: Log violations in distribution-check Change-Id: I941eb2a08fe82aa5746ee93fc83a84c49c60fb68 Signed-off-by: Vratko Polak --- .../distribution/distribution-jobs.yaml | 1 + .../distribution/distribution-macros.yaml | 22 ++++++++++++++++++- .../distribution/distribution-templates.yaml | 1 + 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/jjb/integration/distribution/distribution-jobs.yaml b/jjb/integration/distribution/distribution-jobs.yaml index 460497fc6..f783d10ff 100644 --- a/jjb/integration/distribution/distribution-jobs.yaml +++ b/jjb/integration/distribution/distribution-jobs.yaml @@ -247,6 +247,7 @@ mvn-opts: '{opendaylight-infra-parallel-mvn-opts}' - integration-set-variables - distribution-check-warn-9191 + - distribution-check-warn-9192 - integration-upload-distribution: dist-pom: distribution/pom.xml - distribution-check-bootup diff --git a/jjb/integration/distribution/distribution-macros.yaml b/jjb/integration/distribution/distribution-macros.yaml index bab7b0742..741807c32 100644 --- a/jjb/integration/distribution/distribution-macros.yaml +++ b/jjb/integration/distribution/distribution-macros.yaml @@ -230,7 +230,7 @@ name: distribution-check-warn-9191 # Detect ODL bundles referenced cross-project from features, store them to a file to be archived. # Do not fail the build, this is just to inform interested contributors. - # TODO: Improve integration archiving macro so that it finds bug9191.log without us crating it in $WORKSPACE/. + # TODO: Improve integration archiving macro so that it finds bug9191 log without us crating it in $WORKSPACE/. builders: - shell: | # No failure in this macro should affect the job result. @@ -244,6 +244,26 @@ done popd +- builder: + name: distribution-check-warn-9192 + # Detect ODL bundles referenced from multiple features within a project, store them to a file to be archived. + # Current implementation will also include Bug 9191 violations, + # presenting an unified diff with lines marked to be removed, among unmarked lines to compare to. + # Do not fail the build, this is just to inform interested contributors. + # TODO: Improve integration archiving macro so that it finds bug9192 log without us crating it in $WORKSPACE/. + builders: + - shell: | + # No failure in this macro should affect the job result. + set +e + pushd "$WORKSPACE/distribution/$KARAF_ARTIFACT/target/assembly/system/org/opendaylight" + find . -name \*features.xml | xargs fgrep -n '' > "$WORKSPACE/bug9192.0.log" + popd + fgrep org.opendaylight bug9192.0.log > "$WORKSPACE/bug9192.1.log" + sort -s -t '<' -k 2 "$WORKSPACE/bug9192.1.log" > "$WORKSPACE/bug9192.2.log" + sort -u -s -t '<' -k 2 "$WORKSPACE/bug9192.1.log" > "$WORKSPACE/bug9192.3.log" + diff -U 999 -b -t -d "$WORKSPACE/bug9192.2.log" "$WORKSPACE/bug9192.3.log" > "$WORKSPACE/bug9192.diff.log" + rm -f "$WORKSPACE"/bug9192.?.log + - builder: name: distribution-check-bootup # Operation: Locally deploy ODL with all fetures, check it is not broken. diff --git a/jjb/integration/distribution/distribution-templates.yaml b/jjb/integration/distribution/distribution-templates.yaml index e3f3a7ed4..f4791ba5c 100644 --- a/jjb/integration/distribution/distribution-templates.yaml +++ b/jjb/integration/distribution/distribution-templates.yaml @@ -78,6 +78,7 @@ mvn-opts: '{opendaylight-infra-parallel-mvn-opts}' - integration-set-variables - distribution-check-warn-9191 + - distribution-check-warn-9192 - integration-upload-distribution: dist-pom: distribution/pom.xml - distribution-check-bootup -- 2.36.6