Revert "Revert "Feat!: Update JJB version to 6x""
[releng/builder.git] / jjb / integration / distribution / distribution-macros.yaml
index 974382e2f29269c01dc9ae990a76f15db9456c92..3b0091d60e2fb80825a0320cd4ac3389807be92d 100644 (file)
@@ -4,30 +4,7 @@
     name: distribution-check-wipe
     # Step zero: Wipe file repositories up front.
     builders:
-      - shell: |
-          echo "wipe r: the local Maven repository"
-          rm -rfv /tmp/r
-          echo "wipe n: the fake remote (Nexus) repository"
-          rm -rfv /tmp/n
-          echo "wipe t: the transient repository used in some manipulations"
-          rm -rfv /tmp/t
-          echo "create n: multithreaded execution might fail at creating it."
-          mkdir /tmp/n
-          echo "detecting distribution allowed projects"
-          # Some allowed projects cannot be detected in distribution because they do not produce features.
-          ALLOW_PROJECTS=(yangtools mdsal openflowjava)
-          if [[ "$KARAF_VERSION" == "odl" ]]; then
-          ALLOW_PROJECTS+=(`grep '<groupId>org.opendaylight.' -Rh distribution \
-          | sed -e 's%^[ \t]*<groupId>org.opendaylight.%%' \
-          | sed -e 's%</groupId>%%' | sort -u`)
-          else
-          # For Managed distro we only look at the features folder
-          ALLOW_PROJECTS+=(`grep '<groupId>org.opendaylight.' -Rh distribution/features \
-          | sed -e 's%^[ \t]*<groupId>org.opendaylight.%%' \
-          | sed -e 's%</groupId>%%' | sort -u`)
-          fi
-          echo "Allowed projects are ${ALLOW_PROJECTS[@]}"
-          echo "ALLOW_PROJECTS=${ALLOW_PROJECTS[@]}" > allowed_projects.txt
+      - shell: !include-raw-escape: distribution-check-wipe.sh
 
 - builder:
     name: distribution-check-build-project
     # Arguments:
     #   gerrit-project: Project name as nexus URI part. Typically '$GERRIT_PROJECT'.
     builders:
-      - shell: |
-          echo "These are allowed projects: $ALLOW_PROJECTS"
-          echo "These are distribution pulled projects:"
-          EXIT_CODE="0"
-          for PROJECT in `ls /tmp/r/org/opendaylight`; do
-          echo "checking $PROJECT"
-          if [[ "$ALLOW_PROJECTS" != *"$PROJECT"* ]]; then
-          echo "ERROR: Not allowed project $PROJECT pulled"
-          EXIT_CODE="1"
-          fi
-          done
-          exit $EXIT_CODE
-          echo "verify project groupId"
-          mkdir -p /tmp/t/org/opendaylight/{gerrit-project}
-          mv /tmp/n/org/opendaylight/{gerrit-project}/* /tmp/t/org/opendaylight/{gerrit-project}/
-          test -z "`find /tmp/n/ -type f`" || ( echo "ERROR: Mismatched groupId detected (see above)." && false )
-          rm -rf /tmp/n
-          mv /tmp/t /tmp/n
+      - shell: !include-raw-escape: distribution-check-verify-groupid.sh
 
 - builder:
     name: distribution-check-download-deps
     #   KARAF_VERSION: 'karaf4' or 'karaf3'.
     #     Use distribution-karaf-version macro to customize.
     builders:
-      - shell: !include-raw: distribution-check-bootup.sh
+      - shell: !include-raw-escape: distribution-check-bootup.sh