-
Notifications
You must be signed in to change notification settings - Fork 233
Expand file tree
/
Copy pathrelease.yaml
More file actions
122 lines (109 loc) · 4.62 KB
/
release.yaml
File metadata and controls
122 lines (109 loc) · 4.62 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: $(Date:yyyyMMdd).$(Rev:r)
parameters:
- name: publishHubDevice
displayName: Publish the 'com.microsoft.azure.sdk.iot:iot-device-client' package
type: string
values:
- true
- false
default: false
- name: publishDpsDevice
displayName: Publish the 'com.microsoft.azure.sdk.iot.provisioning:provisioning-device-client' package
type: string
values:
- true
- false
default: false
- name: publishDpsService
displayName: Publish 'com.microsoft.azure.sdk.iot.provisioning:provisioning-service-client' package
type: string
values:
- true
- false
default: false
- name: publishDpsSecurity
displayName: Publish 'com.microsoft.azure.sdk.iot.provisioning.security:security-provider' package
type: string
values:
- true
- false
default: false
- name: publishDpsSecurityX509
displayName: Publish 'com.microsoft.azure.sdk.iot.provisioning.security:x509-provider' package
type: string
values:
- true
- false
default: false
- name: publishDpsSecurityTpm
displayName: Publish 'com.microsoft.azure.sdk.iot.provisioning.security:tpm-provider' package
type: string
values:
- true
- false
default: false
jobs:
- job: Package
displayName: Package
pool:
vmImage: ubuntu-latest
steps:
- bash: |
echo "Publish IoT hub device client package? ${{ parameters.publishHubDevice }}"
echo "Publish Dps device client package? ${{ parameters.publishDpsDevice }}"
echo "Publish Dps service client package? ${{ parameters.publishDpsService }}"
echo "Publish security provider package? ${{ parameters.publishDpsSecurity }}"
echo "Publish tpm provider package? ${{ parameters.publishDpsSecurityTpm }}"
echo "Publish x509 provider client package? ${{ parameters.publishDpsSecurityX509 }}"
if [[ ${{ parameters.publishHubDevice }} -ne "true" && ${{ parameters.publishDpsDevice }} -ne "true" && ${{ parameters.publishDpsService }} -ne "true" && ${{ parameters.publishDpsSecurity }} -ne "true" && ${{ parameters.publishDpsSecurityTpm }} -ne "true" && ${{ parameters.publishDpsSecurityX509 }} -ne "true" ]]; then
echo "Must select at least one package to publish"
exit 1
fi
displayName: Validate build params
- task: JavaToolInstaller@0
inputs:
versionSpec: 11
jdkArchitectureOption: 'x64'
jdkSourceOption: 'PreInstalled'
- task: PowerShell@2
displayName: Mvn install
inputs:
targetType: 'inline'
script: |
mvn clean install -DskipTests -T 2C --batch-mode -q
New-Item -ItemType Directory -Path $(Build.SourcesDirectory)/output
- template: ../templates/PackPackage.yaml
parameters:
packagePath: '$(Build.SourcesDirectory)/iothub/device/iot-device-client'
condition: ${{ parameters.publishHubDevice }}
- template: ../templates/PackPackage.yaml
parameters:
packagePath: '$(Build.SourcesDirectory)/provisioning/provisioning-device-client'
condition: ${{ parameters.publishDpsDevice }}
- template: ../templates/PackPackage.yaml
parameters:
packagePath: '$(Build.SourcesDirectory)/provisioning/provisioning-service-client'
condition: ${{ parameters.publishDpsService }}
- template: ../templates/PackPackage.yaml
parameters:
packagePath: '$(Build.SourcesDirectory)/provisioning/security/security-provider'
condition: ${{ parameters.publishDpsSecurity }}
- template: ../templates/PackPackage.yaml
parameters:
packagePath: '$(Build.SourcesDirectory)/provisioning/security/tpm-provider'
condition: ${{ parameters.publishDpsSecurityTpm }}
- template: ../templates/PackPackage.yaml
parameters:
packagePath: '$(Build.SourcesDirectory)/provisioning/security/x509-provider'
condition: ${{ parameters.publishDpsSecurityX509 }}
- task: AzureCLI@2
displayName: "Upload packages to Azure storage"
inputs:
azureSubscription: 'azuresdkpartnerdrops'
scriptType: 'bash'
scriptLocation: 'inlineScript'
inlineScript: 'az storage blob upload-batch --source "$(Build.SourcesDirectory)/output/" --destination "drops/azure-iot-sdks/java/$(Build.BuildNumber)" --account-name azuresdkpartnerdrops --auth-mode login'
- bash: |
echo "Files uploaded to partner storage directory drops/azure-iot-sdks/java/$(Build.BuildNumber)"
echo "Go to https://dev.azure.com/azure-sdk/internal/_build?definitionId=1809&_a=summary and run the pipeline with Relative Path in Partner Drops Blob Container set to azure-iot-sdks/java/$(Build.BuildNumber)"
displayName: Next Steps