Skip to content

Commit 01f8229

Browse files
fix: cache and downloads
1 parent c1e4150 commit 01f8229

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

build/azDevOps/azure/azure-pipelines-javaspring-k8s.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,8 @@ stages:
479479
runOnce:
480480
deploy:
481481
steps:
482+
- download: none
483+
482484
- checkout: self
483485

484486
- checkout: templates

build/azDevOps/azure/templates/steps/build/build-java.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,20 @@ steps:
4040
4141
NVD_CACHE_FILE="${DATE}-${HOUR_BY_FOUR}"
4242
43-
echo "echoing to a file '${{ parameters.repo_root_dir }}/.nvd-cache' with value '${NVD_CACHE_FILE}'"
44-
echo "${NVD_CACHE_FILE}" > ${{ parameters.repo_root_dir }}/.nvd-cache
43+
echo "echoing to a file '${{ parameters.repo_root_dir }}/.nvd-cache-day' with value '${DATE}'"
44+
echo "echoing to a file '${{ parameters.repo_root_dir }}/.nvd-cache-full' with value '${NVD_CACHE_FILE}'"
45+
46+
# Partial (slow) download lasts 24 hours
47+
echo "${DATE}" > ${{ parameters.repo_root_dir }}/.nvd-cache-day
48+
# Full Cache is 4 hours, so use the by four computed variable
49+
echo "${NVD_CACHE_FILE}" > ${{ parameters.repo_root_dir }}/.nvd-cache-full
4550
displayName: Set NVD Cache Variable
4651

4752
- task: Cache@2
4853
inputs:
49-
key: 'nvd | "$(Agent.OS)" | ${{ parameters.repo_root_dir }}/.nvd-cache'
54+
key: '${{ parameters.repo_root_dir }}/.nvd-cache-day | ${{ parameters.repo_root_dir }}/.nvd-cache-full'
5055
restoreKeys: |
51-
nvd | "$(Agent.OS)"
52-
nvd
56+
${{ parameters.repo_root_dir }}/.nvd-cache
5357
path: "${{ parameters.vulnerability_scan_database_directory }}"
5458
displayName: Cache NVD Datatbase
5559

build/azDevOps/azure/templates/steps/deploy/deploy-post-deploy-tests-karate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ steps:
1818
inputs:
1919
buildType: 'current'
2020
artifact: "${{ parameters.functional_test_artefact_name }}-$(BUILD_ATTEMPT_NUMBER)"
21-
targetPath: ${{ parameters.functional_test_artefact_name }}
21+
targetPath: ${{ parameters.functional_test_artefact_download_location }}
2222
displayName: "Download: Post-Deploy Test Artefacts"
2323

2424
# Files downloaded from artefacts seem to lose their permissions...

build/azDevOps/azure/templates/steps/deploy/deploy-post-deploy-tests-serenity.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ steps:
1818
inputs:
1919
buildType: 'current'
2020
artifact: "${{ parameters.functional_test_artefact_name }}-$(BUILD_ATTEMPT_NUMBER)"
21-
targetPath: ${{ parameters.functional_test_artefact_name }}
21+
targetPath: ${{ parameters.functional_test_artefact_download_location }}
2222
displayName: "Download: Post-Deploy Test Artefacts"
2323

2424
# Files downloaded from artefacts seem to lose their permissions...

0 commit comments

Comments
 (0)