|
| 1 | +# yamllint disable rule:line-length |
1 | 2 | parameters:
|
2 |
| -- name: vsdropsPrefix |
3 |
| - type: string |
| 3 | + - name: vsdropsPrefix |
| 4 | + type: string |
4 | 5 |
|
5 |
| -- name: keyringPass |
6 |
| - type: string |
| 6 | + - name: keyringPass |
| 7 | + type: string |
7 | 8 |
|
8 |
| -- name: gitHubToken |
9 |
| - type: string |
| 9 | + - name: gitHubToken |
| 10 | + type: string |
10 | 11 |
|
11 |
| -- name: xqaCertPass |
12 |
| - type: string |
| 12 | + - name: xqaCertPass |
| 13 | + type: string |
13 | 14 |
|
14 |
| -- name: uploadBinlogs |
15 |
| - type: boolean |
16 |
| - default: true |
| 15 | + - name: uploadBinlogs |
| 16 | + type: boolean |
| 17 | + default: true |
17 | 18 |
|
18 |
| -- name: signAndNotarize |
19 |
| - type: boolean |
20 |
| - default: true |
| 19 | + - name: signAndNotarize |
| 20 | + type: boolean |
| 21 | + default: true |
21 | 22 |
|
22 |
| -- name: skipESRP |
23 |
| - type: boolean |
24 |
| - default: false # only to be used when testing the CI and we do not need a signed pkg |
| 23 | + - name: skipESRP |
| 24 | + type: boolean |
| 25 | + default: false # only to be used when testing the CI and we do not need a signed pkg |
25 | 26 |
|
26 |
| -- name: isPR |
27 |
| - type: boolean |
| 27 | + - name: isPR |
| 28 | + type: boolean |
28 | 29 |
|
29 |
| -- name: repositoryAlias |
30 |
| - type: string |
31 |
| - default: self |
| 30 | + - name: repositoryAlias |
| 31 | + type: string |
| 32 | + default: self |
32 | 33 |
|
33 |
| -- name: commit |
34 |
| - type: string |
35 |
| - default: HEAD |
| 34 | + - name: commit |
| 35 | + type: string |
| 36 | + default: HEAD |
36 | 37 |
|
37 |
| -- name: uploadPrefix |
38 |
| - type: string |
39 |
| - default: '$(MaciosUploadPrefix)' |
| 38 | + - name: uploadPrefix |
| 39 | + type: string |
| 40 | + default: '$(MaciosUploadPrefix)' |
40 | 41 |
|
41 | 42 | steps:
|
42 |
| -- template: build.yml |
43 |
| - parameters: |
44 |
| - isPR: ${{ parameters.isPR }} |
45 |
| - repositoryAlias: ${{ parameters.repositoryAlias }} |
46 |
| - commit: ${{ parameters.commit }} |
47 |
| - vsdropsPrefix: ${{ parameters.vsdropsPrefix }} |
48 |
| - keyringPass: ${{ parameters.keyringPass }} |
49 |
| - gitHubToken: ${{ parameters.gitHubToken }} |
50 |
| - xqaCertPass: ${{ parameters.xqaCertPass }} |
51 |
| - buildSteps: |
52 |
| - # build not signed .pkgs for the SDK |
53 |
| - - bash: | |
54 |
| - set -x |
55 |
| - set -e |
56 |
| - rm -Rf $(Build.SourcesDirectory)/package/*.pkg |
57 |
| - rm -Rf $(Build.SourcesDirectory)/package/notarized/*.pkg |
58 |
| - time make -C $(Build.SourcesDirectory)/xamarin-macios/ package |
59 |
| - name: packages |
60 |
| - displayName: 'Build Packages' |
61 |
| - condition: and(succeeded(), contains(variables['configuration.BuildPkgs'], 'True')) |
62 |
| - timeoutInMinutes: 180 |
63 |
| -
|
64 |
| - # build nugets |
65 |
| - - bash: $(Build.SourcesDirectory)/xamarin-macios/tools/devops/automation/scripts/bash/build-nugets.sh |
66 |
| - displayName: 'Build Nugets' |
67 |
| - condition: and(succeeded(), contains(variables['configuration.BuildNugets'], 'True'), ne(variables['ENABLE_DOTNET'], '')) |
68 |
| - timeoutInMinutes: 180 |
69 |
| - |
70 |
| - - bash: $(System.DefaultWorkingDirectory)/xamarin-macios/tools/devops/automation/scripts/bash/generate-workload-rollback.sh |
71 |
| - name: workload_file |
72 |
| - displayName: 'Generate "WorkloadRollback.json"' |
73 |
| - |
74 |
| - - task: 1ES.PublishPipelineArtifact@1 |
75 |
| - displayName: 'Publish WorkloadRollback.json' |
76 |
| - inputs: |
77 |
| - path: $(Build.SourcesDirectory)/WorkloadRollback.json |
78 |
| - artifact: '${{ parameters.uploadPrefix }}WorkloadRollback' |
79 |
| - continueOnError: true |
80 |
| - |
81 |
| - - bash: | |
82 |
| - var=$(make -C $(Build.SourcesDirectory)/xamarin-macios/tools/devops print-variable VARIABLE=IOS_PACKAGE_VERSION) |
83 |
| - IOS_PACKAGE_VERSION=${var#*=} |
84 |
| - IOS_PACKAGE_VERSION=$(echo $IOS_PACKAGE_VERSION | cut -d "+" -f1) |
85 |
| -
|
86 |
| - var=$(make -C $(Build.SourcesDirectory)/xamarin-macios/tools/devops print-variable VARIABLE=MAC_PACKAGE_VERSION) |
87 |
| - MAC_PACKAGE_VERSION=${var#*=} |
88 |
| - MAC_PACKAGE_VERSION=$(echo $MAC_PACKAGE_VERSION | cut -d "+" -f1) |
89 |
| -
|
90 |
| - PKG_DST="$(Build.SourcesDirectory)/PkgsVersions.json" |
91 |
| -
|
92 |
| - echo "{" > $PKG_DST |
93 |
| - echo "\"iOS\": \"$IOS_PACKAGE_VERSION\"," >> $PKG_DST |
94 |
| - echo "\"macOS\": \"$MAC_PACKAGE_VERSION\"" >> $PKG_DST |
95 |
| - echo "}" >> $PKG_DST |
96 |
| -
|
97 |
| - echo "PkgVersions.json file contents:" |
98 |
| - echo "$(cat $PKG_DST)" |
99 |
| - name: pkg_versions_file |
100 |
| - displayName: 'Generate PkgsVersions.json' |
101 |
| -
|
102 |
| - - task: 1ES.PublishPipelineArtifact@1 |
103 |
| - displayName: 'Publish PkgsVersions.json' |
104 |
| - inputs: |
105 |
| - path: $(Build.SourcesDirectory)/PkgsVersions.json |
106 |
| - artifact: '${{ parameters.uploadPrefix }}PkgsVersions' |
107 |
| - continueOnError: true |
108 |
| - |
109 |
| - # upload each of the pkgs into the pipeline artifacts |
110 |
| - - task: 1ES.PublishPipelineArtifact@1 |
111 |
| - displayName: 'Publish Build Artifacts' |
112 |
| - inputs: |
113 |
| - path: $(Build.SourcesDirectory)/package |
114 |
| - artifact: '${{ parameters.uploadPrefix }}not-signed-package' |
115 |
| - continueOnError: true |
116 |
| - |
117 |
| - - bash: | |
118 |
| - set -x |
119 |
| - set -e |
120 |
| -
|
121 |
| - make -C $(Build.SourcesDirectory)/xamarin-macios/tests package-test-libraries.zip |
122 |
| - name: introPkg |
123 |
| - displayName: 'Package test libraries dependencies' |
124 |
| - continueOnError: true # not a terrible blocking issue |
125 |
| - timeoutInMinutes: 60 |
126 |
| -
|
127 |
| - - task: 1ES.PublishPipelineArtifact@1 |
128 |
| - displayName: 'Publish test libraries dependencies' |
129 |
| - inputs: |
130 |
| - path: $(Build.SourcesDirectory)/xamarin-macios/tests/package-test-libraries.zip |
131 |
| - artifact: '${{ parameters.uploadPrefix }}package-test-libraries' |
132 |
| - continueOnError: true |
133 |
| - |
134 |
| - - task: 1ES.PublishPipelineArtifact@1 |
135 |
| - displayName: 'Publish Build.props' |
136 |
| - inputs: |
137 |
| - path: $(Build.SourcesDirectory)/xamarin-macios/Build.props |
138 |
| - artifact: '${{ parameters.uploadPrefix }}Build.props' |
139 |
| - continueOnError: true |
140 |
| - |
141 |
| - - ${{ if eq(parameters.uploadBinlogs, true) }}: |
142 |
| - # Copy all the binlogs to a separate directory, keeping directory structure. |
143 |
| - - script: | |
144 |
| - set -x |
145 |
| - mkdir -p $(Build.ArtifactStagingDirectory)/all-binlogs |
146 |
| - rsync -av --prune-empty-dirs --include '*/' --include '*.binlog' --exclude '*' $(Build.SourcesDirectory)/xamarin-macios $(Build.ArtifactStagingDirectory)/all-binlogs |
147 |
| - displayName: Copy all binlogs |
148 |
| - continueOnError: true |
149 |
| - condition: succeededOrFailed() |
150 |
| -
|
151 |
| - # Publish all the binlogs we collected in the previous step |
152 |
| - - task: 1ES.PublishPipelineArtifact@1 |
153 |
| - displayName: 'Publish Artifact: All binlogs' |
154 |
| - inputs: |
155 |
| - path: $(Build.ArtifactStagingDirectory)/all-binlogs |
156 |
| - artifact: '${{ parameters.uploadPrefix }}all-binlogs-$(Build.BuildId)-$(System.StageAttempt)-$(System.JobAttempt)' |
157 |
| - continueOnError: true |
158 |
| - condition: succeededOrFailed() |
| 43 | + - template: build.yml |
| 44 | + parameters: |
| 45 | + isPR: ${{ parameters.isPR }} |
| 46 | + repositoryAlias: ${{ parameters.repositoryAlias }} |
| 47 | + commit: ${{ parameters.commit }} |
| 48 | + vsdropsPrefix: ${{ parameters.vsdropsPrefix }} |
| 49 | + keyringPass: ${{ parameters.keyringPass }} |
| 50 | + gitHubToken: ${{ parameters.gitHubToken }} |
| 51 | + xqaCertPass: ${{ parameters.xqaCertPass }} |
| 52 | + buildSteps: |
| 53 | + # build not signed .pkgs for the SDK |
| 54 | + - bash: | |
| 55 | + set -x |
| 56 | + set -e |
| 57 | + rm -Rf $(Build.SourcesDirectory)/package/*.pkg |
| 58 | + rm -Rf $(Build.SourcesDirectory)/package/notarized/*.pkg |
| 59 | + time make -C $(Build.SourcesDirectory)/xamarin-macios/ package |
| 60 | + name: packages |
| 61 | + displayName: 'Build Packages' |
| 62 | + condition: and(succeeded(), contains(variables['configuration.BuildPkgs'], 'True')) |
| 63 | + timeoutInMinutes: 180 |
| 64 | +
|
| 65 | + # build nugets |
| 66 | + - bash: $(Build.SourcesDirectory)/xamarin-macios/tools/devops/automation/scripts/bash/build-nugets.sh |
| 67 | + displayName: 'Build Nugets' |
| 68 | + condition: and(succeeded(), contains(variables['configuration.BuildNugets'], 'True'), ne(variables['ENABLE_DOTNET'], '')) |
| 69 | + timeoutInMinutes: 180 |
| 70 | + |
| 71 | + - bash: $(System.DefaultWorkingDirectory)/xamarin-macios/tools/devops/automation/scripts/bash/generate-workload-rollback.sh |
| 72 | + name: workload_file |
| 73 | + displayName: 'Generate "WorkloadRollback.json"' |
| 74 | + |
| 75 | + - task: 1ES.PublishPipelineArtifact@1 |
| 76 | + displayName: 'Publish WorkloadRollback.json' |
| 77 | + inputs: |
| 78 | + path: $(Build.SourcesDirectory)/WorkloadRollback.json |
| 79 | + artifact: '${{ parameters.uploadPrefix }}WorkloadRollback' |
| 80 | + continueOnError: true |
| 81 | + |
| 82 | + - bash: | |
| 83 | + var=$(make -C $(Build.SourcesDirectory)/xamarin-macios/tools/devops print-variable VARIABLE=IOS_PACKAGE_VERSION) |
| 84 | + IOS_PACKAGE_VERSION=${var#*=} |
| 85 | + IOS_PACKAGE_VERSION=$(echo $IOS_PACKAGE_VERSION | cut -d "+" -f1) |
| 86 | +
|
| 87 | + var=$(make -C $(Build.SourcesDirectory)/xamarin-macios/tools/devops print-variable VARIABLE=MAC_PACKAGE_VERSION) |
| 88 | + MAC_PACKAGE_VERSION=${var#*=} |
| 89 | + MAC_PACKAGE_VERSION=$(echo $MAC_PACKAGE_VERSION | cut -d "+" -f1) |
| 90 | +
|
| 91 | + PKG_DST="$(Build.SourcesDirectory)/PkgsVersions.json" |
| 92 | +
|
| 93 | + echo "{" > $PKG_DST |
| 94 | + echo "\"iOS\": \"$IOS_PACKAGE_VERSION\"," >> $PKG_DST |
| 95 | + echo "\"macOS\": \"$MAC_PACKAGE_VERSION\"" >> $PKG_DST |
| 96 | + echo "}" >> $PKG_DST |
| 97 | +
|
| 98 | + echo "PkgVersions.json file contents:" |
| 99 | + echo "$(cat $PKG_DST)" |
| 100 | + name: pkg_versions_file |
| 101 | + displayName: 'Generate PkgsVersions.json' |
| 102 | +
|
| 103 | + - task: 1ES.PublishPipelineArtifact@1 |
| 104 | + displayName: 'Publish PkgsVersions.json' |
| 105 | + inputs: |
| 106 | + path: $(Build.SourcesDirectory)/PkgsVersions.json |
| 107 | + artifact: '${{ parameters.uploadPrefix }}PkgsVersions' |
| 108 | + continueOnError: true |
| 109 | + |
| 110 | + # upload each of the pkgs into the pipeline artifacts |
| 111 | + - task: 1ES.PublishPipelineArtifact@1 |
| 112 | + displayName: 'Publish Build Artifacts' |
| 113 | + inputs: |
| 114 | + path: $(Build.SourcesDirectory)/package |
| 115 | + artifact: '${{ parameters.uploadPrefix }}not-signed-package' |
| 116 | + continueOnError: true |
| 117 | + |
| 118 | + - bash: | |
| 119 | + set -x |
| 120 | + set -e |
| 121 | +
|
| 122 | + make -C $(Build.SourcesDirectory)/xamarin-macios/tests package-test-libraries.zip |
| 123 | + name: introPkg |
| 124 | + displayName: 'Package test libraries dependencies' |
| 125 | + continueOnError: true # not a terrible blocking issue |
| 126 | + timeoutInMinutes: 60 |
| 127 | +
|
| 128 | + - task: 1ES.PublishPipelineArtifact@1 |
| 129 | + displayName: 'Publish test libraries dependencies' |
| 130 | + inputs: |
| 131 | + path: $(Build.SourcesDirectory)/xamarin-macios/tests/package-test-libraries.zip |
| 132 | + artifact: '${{ parameters.uploadPrefix }}package-test-libraries' |
| 133 | + continueOnError: true |
| 134 | + |
| 135 | + - task: 1ES.PublishPipelineArtifact@1 |
| 136 | + displayName: 'Publish Build.props' |
| 137 | + inputs: |
| 138 | + path: $(Build.SourcesDirectory)/xamarin-macios/Build.props |
| 139 | + artifact: '${{ parameters.uploadPrefix }}Build.props' |
| 140 | + continueOnError: true |
| 141 | + |
| 142 | + - ${{ if eq(parameters.uploadBinlogs, true) }}: |
| 143 | + # Copy all the binlogs to a separate directory, keeping directory structure. |
| 144 | + - script: | |
| 145 | + set -x |
| 146 | + mkdir -p $(Build.ArtifactStagingDirectory)/all-binlogs |
| 147 | + rsync -av --prune-empty-dirs --include '*/' --include '*.binlog' --exclude '*' $(Build.SourcesDirectory)/xamarin-macios $(Build.ArtifactStagingDirectory)/all-binlogs |
| 148 | + displayName: Copy all binlogs |
| 149 | + continueOnError: true |
| 150 | + condition: succeededOrFailed() |
| 151 | +
|
| 152 | + # Publish all the binlogs we collected in the previous step |
| 153 | + - task: 1ES.PublishPipelineArtifact@1 |
| 154 | + displayName: 'Publish Artifact: All binlogs' |
| 155 | + inputs: |
| 156 | + path: $(Build.ArtifactStagingDirectory)/all-binlogs |
| 157 | + artifact: '${{ parameters.uploadPrefix }}all-binlogs-$(Build.BuildId)-$(System.StageAttempt)-$(System.JobAttempt)' |
| 158 | + continueOnError: true |
| 159 | + condition: succeededOrFailed() |
0 commit comments