generated from NHSDigital/api-management-service-template
-
Notifications
You must be signed in to change notification settings - Fork 7
/
azure-build-pipeline.yml
82 lines (77 loc) · 2.5 KB
/
azure-build-pipeline.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: "$(SourceBranchName)+$(BuildID)"
trigger:
branches:
include:
- tags/refs/v*
tags:
include:
- v*
pr:
branches:
include: ["*"]
resources:
repositories:
- repository: common
type: github
name: NHSDigital/api-management-utils
ref: refs/heads/edge
endpoint: NHSDigital
variables:
- template: project.yml
extends:
template: azure/common/apigee-build.yml@common
parameters:
service_name: ${{ variables.service_name }}
short_service_name: ${{ variables.short_service_name }}
cache_steps:
- bash: |
VALIDATOR_VERSION=v1.0.200-alpha
echo "Using validator version ${VALIDATOR_VERSION}"
echo "##vso[task.setvariable variable=VALIDATOR_VERSION]$VALIDATOR_VERSION"
displayName: get validator version
- task: DownloadGitHubRelease@0
displayName: Download Validator
inputs:
connection: NHSDigital
userRepository: NHSDigital/validation-service-fhir-r4
itemPattern: "**"
defaultVersionType: specificTag
version: $(VALIDATOR_VERSION)
downloadPath: "validator"
- task: NodeTool@0
displayName: Use Node v20.10.0
inputs:
versionSpec: "20.10.0"
- task: UseDotNet@2
inputs:
version: "3.1.x"
- bash: "make prepare-for-api-release"
displayName: Prepare for api release
workingDirectory: "${{ variables.service_name }}"
- bash: "make download-openjdk"
displayName: Download OpenJDK
workingDirectory: "${{ variables.service_name }}"
- task: JavaToolInstaller@0
displayName: Install JRE & JDK v8 x64
inputs:
versionSpec: "8"
jdkArchitectureOption: "x64"
jdkSourceOption: "LocalDirectory"
jdkFile: "/tmp/openjdk.tar.gz"
jdkDestinationDirectory: "/tmp/openjdk"
test_steps:
- bash: "make check-language-versions"
displayName: Check consistent language version
workingDirectory: "${{ variables.service_name }}"
- bash: "make test"
displayName: Run Quality Checks
workingDirectory: "${{ variables.service_name }}"
- task: PublishTestResults@2
displayName: "Publish Test Results"
inputs:
testResultsFormat: "JUnit"
testResultsFiles: "**/junit.xml"
searchFolder: "${{ variables.service_name }}"
mergeTestResults: true
testRunTitle: "EPS Tests"
failTaskOnFailedTests: true