Skip to content

Commit

Permalink
ci: add optional (for now) test to catch multiple versions of depende…
Browse files Browse the repository at this point in the history
…ncies
  • Loading branch information
kofemann authored and khys95 committed Aug 23, 2024
1 parent 76b882e commit cfce5a1
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,24 @@ container:
--dockerfile $CI_PROJECT_DIR/Dockerfile
--destination $CI_REGISTRY_IMAGE:$tag
#
# Get maven non-test dependencies, make unique sort, drop the version and check for duplicates
#
Check for duplicate dependencies:
stage: build
image: dcache/maven-java17-tar-build
extends: .build_cache
allow_failure: false
script:
- mvn -DskipTests -am -pl packages/tar clean dependency:tree > dependency-tree.txt
- |
grep :jar dependency-tree.txt | \
awk '{print $NF}' | \
awk -F: '!/.*:test$/ {printf("%s:%s:%s\n", $1, $2, $4);}' | \
sort -u | \
cut -d : -f 1,2 | \
uniq -D > duplicate-dependencies.txt
- if [ -s duplicate-dependencies.txt ]; then cat duplicate-dependencies.txt; exit 1; fi

#sign_rpm:
# stage: sign
Expand Down

0 comments on commit cfce5a1

Please sign in to comment.