Skip to content

Commit a90e204

Browse files
fix: ff fixes
1 parent e01fabb commit a90e204

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,12 @@ stages:
319319
java_project_type: "${{ variables.java_project_type }}"
320320
functional_test_project_type: "${{ variables.functional_test_project_type }}"
321321

322-
- bash: |
323-
echo "Setting variable 'BUILD_ATTEMPT_NUMBER' with value '$(System.JobAttempt)'"
324-
echo "##vso[task.setvariable variable=BUILD_ATTEMPT_NUMBER;isOutput=true]$(System.JobAttempt)"
322+
- task: Bash@3
323+
inputs:
324+
targetType: "inline"
325+
script: |
326+
echo "Setting variable 'BUILD_ATTEMPT_NUMBER' with value '$(System.JobAttempt)'"
327+
echo "##vso[task.setvariable variable=BUILD_ATTEMPT_NUMBER;isOutput=true]$(System.JobAttempt)"
325328
name: build_attempt_number
326329
displayName: "Output: Set Job Attempt Output Variable"
327330

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

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,20 @@ steps:
2727

2828
- ${{ if eq(parameters.vulnerability_scan, true) }}:
2929
- task: Bash@3
30-
script: |
31-
DATE="$(date "+%F")"
32-
HOUR="$(date "+%H")"
30+
inputs:
31+
targetType: "inline"
32+
script: |
33+
DATE="$(date "+%F")"
34+
HOUR="$(date "+%H")"
3335
34-
# NVD Cache lasts 4 hours (240 mins) and so cache based on the hour's time
35-
# in 24 hours. E.g. 0-3 are 0, 1-4 are 1, 20-23 are 5 etc..
36-
HOUR_BY_FOUR="$(( ${HOUR} / 4 ))"
36+
# NVD Cache lasts 4 hours (240 mins) and so cache based on the hour's time
37+
# in 24 hours. E.g. 0-3 are 0, 1-4 are 1, 20-23 are 5 etc..
38+
HOUR_BY_FOUR="$(( ${HOUR} / 4 ))"
3739
38-
NVD_CACHE_FILE="${DATE}-${HOUR_BY_FOUR}"
40+
NVD_CACHE_FILE="${DATE}-${HOUR_BY_FOUR}"
3941
40-
echo "echoing to a file '${{ parameters.repo_root_dir }}/.nvd-cache' with value ''"
41-
echo "${NVD_CACHE_FILE}" >> ${{ parameters.repo_root_dir }}/.nvd-cache
42+
echo "echoing to a file '${{ parameters.repo_root_dir }}/.nvd-cache' with value ''"
43+
echo "${NVD_CACHE_FILE}" >> ${{ parameters.repo_root_dir }}/.nvd-cache
4244
displayName: Set NVD Cache Variable
4345

4446
- task: Cache@2

0 commit comments

Comments
 (0)