Makes the output a bit more structured.
Change-Id: Ieedcbf97af01cec63604c2907d6f74177271a64d
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
# Requires the existance of $WORKSPACE/m2repo and $WORKSPACE/m2repo-backup to
# compare if maven metadata files have changed. Unchanged files are then
# removed from $WORKSPACE/m2repo before uploading to the snapshot repo.
# Requires the existance of $WORKSPACE/m2repo and $WORKSPACE/m2repo-backup to
# compare if maven metadata files have changed. Unchanged files are then
# removed from $WORKSPACE/m2repo before uploading to the snapshot repo.
+echo "---> maven-deploy.sh"
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
-# Remove metadata files that were not updated.
+echo "-----> Remove metadata files that were not updated"
set +e # Temporarily disable to run diff command.
mapfile -t metadata_files <<< "$(diff -s -r "$m2repo_dir" "$WORKSPACE/m2repo-backup" \
| grep 'Files .* and .* are identical' \
set +e # Temporarily disable to run diff command.
mapfile -t metadata_files <<< "$(diff -s -r "$m2repo_dir" "$WORKSPACE/m2repo-backup" \
| grep 'Files .* and .* are identical' \
find "$m2repo_dir" -type d -empty -delete
maven_metadata_validate "$m2repo_dir"
find "$m2repo_dir" -type d -empty -delete
maven_metadata_validate "$m2repo_dir"
+
+echo "-----> Upload files to Nexus"
lftools deploy nexus -s "$nexus_repo_url" "$m2repo_dir"
lftools deploy nexus -s "$nexus_repo_url" "$m2repo_dir"