-
Notifications
You must be signed in to change notification settings - Fork 107
/
azure-maven-central-pipelines.yml
106 lines (94 loc) · 4.54 KB
/
azure-maven-central-pipelines.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
pr: none
variables:
- group: InfoSec-SecurityResults
- name: tags
value: production,externalfacing
jobs:
- template: fluentui-android-compliance.yml
- job: Build
pool:
vmImage: ubuntu-latest
variables:
- name: BUILDSECMON_OPT_IN
value: true
steps:
- task: Bash@3
displayName: "Base64 decodes and pipes the GPG key content into the secret file"
env:
GPG_KEY_CONTENT: $(gpgContent)
SIGNING_SECRET_KEY_RING_FILE: $(gpgSecretFilePath)
inputs:
targetType: "inline"
script: |
# Write your commands here
sudo bash -c "echo '$GPG_KEY_CONTENT' | base64 -d > '$SIGNING_SECRET_KEY_RING_FILE'"
ls
- task: Gradle@3
inputs:
gradleWrapperFile: "gradlew"
tasks: "build"
options: "-PappCenterSecret=$(appCenterSecret) -PsigningKeyPassword=$(signingKeyPassword) -PsigningKeyStorePassword=$(signingKeyStorePassword)"
publishJUnitResults: false
javaHomeOption: "JDKVersion"
jdkVersionOption: "$(jdkVersion)"
sonarQubeRunAnalysis: false
spotBugsAnalysis: false
- task: Gradle@2
displayName: Generate testApk
inputs:
gradleWrapperFile: "gradlew"
tasks: "assembleDevelopmentDebugAndroidTest"
publishJUnitResults: false
javaHomeOption: "JDKVersion"
jdkVersionOption: "$(jdkVersion)"
sonarQubeRunAnalysis: false
spotBugsAnalysis: false
- task: Gradle@2
displayName: Hydra Lab UI test
inputs:
gradleWrapperFile: "gradlew"
tasks: "requestHydraLabTest -PappPath=$(build.sourcesdirectory)/FluentUI.Demo/build/outputs/apk/development/debug/FluentUI.Demo-development-debug.apk -PtestAppPath=$(build.sourcesdirectory)/FluentUI.Demo/build/outputs/apk/androidTest/development/debug/FluentUI.Demo-development-debug-androidTest.apk -PbuildFlavor=$(buildFlavor) -PtestSuiteName=$(testSuiteName) -PrunTimeOutSeconds=$(timeOutSeconds) -PdeviceIdentifier=$(deviceIdentifier) -PgroupTestType=$(groupTestType) -PreportAudience=TestLabOwner -PauthToken=$(authToken) -PpkgName=$(pkgName) -PtestPkgName=$(testPkgName) -PrunningType=$(runningType) -PframeworkType=$(frameworkType) -PhydraLabAPIHost=$(hydraLabAPIHost) -PhydraLabAPISchema=$(hydraLabAPISchema)"
javaHomeOption: "JDKVersion"
jdkVersionOption: "$(jdkVersion)"
publishJUnitResults: true
- task: PublishTestResults@2
displayName: "Publish Test Results"
inputs:
testResultsFiles: "$(build.sourcesdirectory)/build/testResult/**/hydra_result_*.xml"
testRunTitle: "Test-Result"
failTaskOnFailedTests: false
- task: Gradle@2
displayName: "generate artifacts and publish to feed"
inputs:
gradleWrapperFile: "gradlew"
tasks: "publish"
javaHomeOption: "JDKVersion"
jdkVersionOption: "$(jdkVersion)"
options: "-PGPGSigningKeyID=$(gpgSignKey) -PGPGSigningPassword=$(gpgSignPassword) -PSigningSecretKeyRingFile=$(gpgSecretFileParentPath) -PmavenUserName=$(mavenUsername) -PmavenPassword=$(mavenPassword) -Pdeveloper_id=$(developer_id) -Pdeveloper_name=\"$(developer_name)\" -Pdeveloper_email=$(developer_email)"
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
displayName: 📒 Generate Manifest
inputs:
BuildDropPath: '$(build.sourcesdirectory)/build'
- task: PublishPipelineArtifact@1
displayName: 📒 Publish Manifest
inputs:
artifactName: SBom-$(System.JobAttempt)
targetPath: $(build.sourcesdirectory)/build/_manifest
- task: PublishPipelineArtifact@1
displayName: "Publish artifacts to pipeline"
inputs:
targetPath: "$(build.sourcesdirectory)/build/artifacts/com/microsoft/fluentui"
artifact: "Build"
publishLocation: "pipeline"
- task: PublishPipelineArtifact@1
displayName: "Publish dogfood apk to pipeline"
inputs:
targetPath: "$(build.sourcesdirectory)/FluentUI.Demo/build/outputs/apk/dogfood/release/FluentUI.Demo-dogfood-release.apk"
artifact: "dogfood"
publishLocation: "pipeline"
- task: PublishPipelineArtifact@1
displayName: "Publish release notes to pipeline"
inputs:
targetPath: "$(build.sourcesdirectory)/FluentUI.Demo/src/main/assets/dogfood-release-notes.txt"
artifact: "notes"
publishLocation: "pipeline"