Skip to content

Commit 69b2013

Browse files
committed
Do not cache external snapshot dependencies
Signed-off-by: David Kornel <kornys@outlook.com>
1 parent 39b94dd commit 69b2013

5 files changed

Lines changed: 29 additions & 2 deletions

File tree

.azure/templates/jobs/build/build_strimzi.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,6 @@ jobs:
6666
displayName: "Tar the binaries"
6767
- publish: $(System.DefaultWorkingDirectory)/binaries.tar
6868
artifact: Binaries
69+
70+
# Clean SNAPSHOT dependencies before caching
71+
- template: "../../steps/clean_maven_snapshots.yaml"

.azure/templates/jobs/build/deploy_strimzi_java.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,7 @@ jobs:
3232
GPG_PASSPHRASE: $(GPG_PASSPHRASE)
3333
GPG_SIGNING_KEY: $(GPG_SIGNING_KEY)
3434
CENTRAL_USERNAME: $(CENTRAL_USERNAME)
35-
CENTRAL_PASSWORD: $(CENTRAL_PASSWORD)
35+
CENTRAL_PASSWORD: $(CENTRAL_PASSWORD)
36+
37+
# Clean SNAPSHOT dependencies before caching
38+
- template: "../../steps/clean_maven_snapshots.yaml"

.azure/templates/jobs/build/test_strimzi.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,7 @@ jobs:
4646
- task: PublishCodeCoverageResults@2
4747
inputs:
4848
summaryFileLocation: $(System.DefaultWorkingDirectory)/**/target/site/jacoco/jacoco.xml
49-
displayName: "Publish Test Coverage"
49+
displayName: "Publish Test Coverage"
50+
51+
# Clean SNAPSHOT dependencies before caching
52+
- template: "../../steps/clean_maven_snapshots.yaml"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
steps:
2+
# Clean external SNAPSHOT dependencies before caching
3+
- bash: |
4+
mvn dependency:purge-local-repository \
5+
-DsnapshotsOnly=true \
6+
-DreResolve=false \
7+
-Dexcludes="io.strimzi:*" -q || true
8+
displayName: "Clean external SNAPSHOT dependencies"

.github/actions/build/build-strimzi-binaries/action.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,16 @@ runs:
109109
name: strimzi-binaries.tar
110110
path: strimzi-binaries.tar
111111

112+
# Clean external SNAPSHOT dependencies before caching
113+
- name: Clean external SNAPSHOT dependencies from Maven repository
114+
if: github.ref == 'refs/heads/main'
115+
shell: bash
116+
run: |
117+
mvn dependency:purge-local-repository \
118+
-DsnapshotsOnly=true \
119+
-DreResolve=false \
120+
-Dexcludes="io.strimzi:*" -q || true
121+
112122
# Save maven cache for main branches
113123
- name: Save Maven cache
114124
if: github.ref == 'refs/heads/main'

0 commit comments

Comments
 (0)