Skip to content

Commit ee90978

Browse files
committed
Update build-ios.yaml for Azure Pipelines
1 parent 5156b4f commit ee90978

File tree

1 file changed

+152
-152
lines changed

1 file changed

+152
-152
lines changed

build-ios.yaml

Lines changed: 152 additions & 152 deletions
Original file line numberDiff line numberDiff line change
@@ -1,154 +1,154 @@
11

22
trigger:
3-
batch: true
4-
branches:
5-
include:
6-
- master
7-
exclude:
8-
- users/*
9-
- releases/*
10-
paths:
11-
exclude:
12-
- azure-pipelines-android.yml
13-
- azure-pipelines-wearos.yml
14-
- azure-pipelines-ios.yml
15-
- azure-pipelines-release-android.yml
16-
- azure-pipelines-release-ios.yml
17-
- azure-pipelines-autotests-android.yml
18-
- azure-pipelines-autotests-ios.yml
19-
- android/
20-
- ios/DevOps/
21-
22-
parameters:
23-
- name: FortifyScan
24-
default: false
25-
type: boolean
26-
- name: WhiteSourceScan
27-
default: false
28-
type: boolean
29-
30-
variables:
31-
BUILD_TYPE: private
32-
CONFIG_SECRET: AZURE_CONFIG_SECRET
33-
ENV_AUTO_TESTS: false
34-
MyBuildNumber: '$(Build.BuildId)_$(Build.BuildNumber)_ios'
35-
36-
jobs:
37-
- job: GeneratingIPA
38-
timeoutInMinutes: 240
39-
dependsOn: ReleaseNotes
40-
condition: succeeded()
41-
pool:
42-
vmImage: 'macOS-12'
43-
44-
steps:
45-
- checkout: self
46-
persistCredentials: true
47-
48-
- task: NodeTool@0
49-
inputs:
50-
versionSpec: '16.19.1'
51-
displayName: 'Install Node'
52-
53-
- script: yarn
54-
workingDirectory: ''
55-
displayName: 'Install yarn dependencies'
56-
57-
- task: CocoaPods@0
58-
displayName: "Install CocoaPods dependencies"
59-
inputs:
60-
workingDirectory: ios
61-
forceRepoUpdate: false
62-
63-
- task: DownloadBuildArtifacts@0
64-
inputs:
65-
buildType: 'current'
66-
downloadType: 'single'
67-
artifactName: 'ReleaseNotes'
68-
downloadPath: '$(agent.buildDirectory)'
69-
70-
- task: InstallAppleCertificate@2
71-
inputs:
72-
certSecureFile: 'abc.p12'
73-
74-
- task: InstallAppleProvisioningProfile@1
75-
inputs:
76-
provProfileSecureFile: 'abc.mobileprovision'
77-
78-
- script: xcrun agvtool next-version -all
79-
workingDirectory: 'ios'
80-
displayName: 'Increase version number'
81-
82-
- task: Xcode@5
83-
displayName: "Build Mobile Application"
84-
inputs:
85-
actions: 'archive'
86-
scheme: 'test'
87-
sdk: ''
88-
configuration: 'Release-azure-dev'
89-
xcWorkspacePath: ios/test.xcworkspace
90-
# Options: 8, 9, 10, default, specifyPath
91-
xcodeVersion: default
92-
# Options: nosign, default, manual, auto
93-
signingOption: 'default'
94-
teamID: 'XYZXYZXYZ'
95-
# # useXcpretty Makes it easier to diagnose build failures
96-
useXcpretty: false
97-
# Package the app
98-
packageApp: true
99-
exportOptions: 'plist'
100-
exportPath: '$(agent.buildDirectory)/output/'
101-
exportMethod: 'development'
102-
exportOptionsPlist: 'ios/DevOps/AdhocExportOptions.plist'
103-
104-
- task: CmdLine@2
105-
displayName: update version
106-
inputs:
107-
script: |
108-
git config user.email "abc@gmail.com"
109-
git config user.name "User Name"
110-
git fetch origin
111-
git merge origin/master
112-
git add "ios/test.xcodeproj/project.pbxproj"
113-
git add "ios/test/Info.plist"
114-
git add "ios/testwatch/Info.plist"
115-
git commit -m "Updated plist with new build version [skip ci]"
116-
git push origin HEAD:master
117-
118-
- script: mv '$(agent.buildDirectory)/output/test.ipa' '$(agent.buildDirectory)/output/TESTAPP$(Build.BuildNumber).ipa'
119-
displayName: 'Rename ipa'
120-
121-
- task: CopyFiles@2
122-
displayName: copy ipa files to artifact
123-
inputs:
124-
SourceFolder: $(agent.buildDirectory)
125-
contents: '**/*.ipa'
126-
targetFolder: '$(build.artifactStagingDirectory)'
127-
overWrite: true
128-
129-
- task: CopyFiles@2
130-
displayName: copy dSYM files to artifact
131-
inputs:
132-
SourceFolder: $(agent.buildDirectory)
133-
contents: '**/*.dSYM/**'
134-
targetFolder: '$(build.artifactStagingDirectory)/dSYM'
135-
overWrite: true
136-
137-
- task: PublishBuildArtifacts@1
138-
inputs:
139-
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
140-
artifactName: 'ipas'
141-
publishLocation: 'container'
142-
143-
- task: AppCenterDistribute@3
144-
inputs:
145-
serverEndpoint: 'tes-ios-service-connection'
146-
appSlug: 'ABC/TEST-Mobile-iOS'
147-
appFile: '$(agent.buildDirectory)/output/*.ipa'
148-
symbolsDsymFiles: '**/*.dSYM'
149-
symbolsIncludeParentDirectory: false
150-
releaseNotesOption: 'file'
151-
releaseNotesFile: '$(agent.buildDirectory)/ReleaseNotes/release.md'
152-
destinationType: 'groups'
153-
distributionGroupId: 'dfdfdf05-dfdfd-dddfdf-dfdfd-dddfdfdfd'
154-
3+
batch: true
4+
branches:
5+
include:
6+
- master
7+
exclude:
8+
- users/*
9+
- releases/*
10+
paths:
11+
exclude:
12+
- azure-pipelines-android.yml
13+
- azure-pipelines-wearos.yml
14+
- azure-pipelines-ios.yml
15+
- azure-pipelines-release-android.yml
16+
- azure-pipelines-release-ios.yml
17+
- azure-pipelines-autotests-android.yml
18+
- azure-pipelines-autotests-ios.yml
19+
- android/
20+
- ios/DevOps/
21+
22+
parameters:
23+
- name: FortifyScan
24+
default: false
25+
type: boolean
26+
- name: WhiteSourceScan
27+
default: false
28+
type: boolean
29+
30+
#variables:
31+
#BUILD_TYPE: private
32+
#CONFIG_SECRET: AZURE_CONFIG_SECRET
33+
#ENV_AUTO_TESTS: false
34+
#MyBuildNumber: '$(Build.BuildId)_$(Build.BuildNumber)_ios'
35+
36+
jobs:
37+
- job: GeneratingIPA
38+
timeoutInMinutes: 240
39+
dependsOn: ReleaseNotes
40+
condition: succeeded()
41+
pool:
42+
vmImage: 'macOS-12'
43+
44+
steps:
45+
- checkout: self
46+
persistCredentials: true
47+
48+
- task: NodeTool@0
49+
inputs:
50+
versionSpec: '16.19.1'
51+
displayName: 'Install Node'
52+
53+
- script: yarn
54+
workingDirectory: ''
55+
displayName: 'Install yarn dependencies'
56+
57+
- task: CocoaPods@0
58+
displayName: "Install CocoaPods dependencies"
59+
inputs:
60+
workingDirectory: ios
61+
forceRepoUpdate: false
62+
63+
- task: DownloadBuildArtifacts@0
64+
inputs:
65+
buildType: 'current'
66+
downloadType: 'single'
67+
artifactName: 'ReleaseNotes'
68+
downloadPath: '$(agent.buildDirectory)'
69+
70+
- task: InstallAppleCertificate@2
71+
inputs:
72+
certSecureFile: 'abc.p12'
73+
74+
- task: InstallAppleProvisioningProfile@1
75+
inputs:
76+
provProfileSecureFile: 'abc.mobileprovision'
77+
78+
- script: xcrun agvtool next-version -all
79+
workingDirectory: 'ios'
80+
displayName: 'Increase version number'
81+
82+
- task: Xcode@5
83+
displayName: "Build Mobile Application"
84+
inputs:
85+
actions: 'archive'
86+
scheme: 'test'
87+
sdk: ''
88+
configuration: 'Release-azure-dev'
89+
xcWorkspacePath: ios/test.xcworkspace
90+
# Options: 8, 9, 10, default, specifyPath
91+
xcodeVersion: default
92+
# Options: nosign, default, manual, auto
93+
signingOption: 'default'
94+
teamID: 'XYZXYZXYZ'
95+
# # useXcpretty Makes it easier to diagnose build failures
96+
useXcpretty: false
97+
# Package the app
98+
packageApp: true
99+
exportOptions: 'plist'
100+
exportPath: '$(agent.buildDirectory)/output/'
101+
exportMethod: 'development'
102+
exportOptionsPlist: 'ios/DevOps/AdhocExportOptions.plist'
103+
104+
- task: CmdLine@2
105+
displayName: update version
106+
inputs:
107+
script: |
108+
git config user.email "abc@gmail.com"
109+
git config user.name "User Name"
110+
git fetch origin
111+
git merge origin/master
112+
git add "ios/test.xcodeproj/project.pbxproj"
113+
git add "ios/test/Info.plist"
114+
git add "ios/testwatch/Info.plist"
115+
git commit -m "Updated plist with new build version [skip ci]"
116+
git push origin HEAD:master
117+
118+
- script: mv '$(agent.buildDirectory)/output/test.ipa' '$(agent.buildDirectory)/output/TESTAPP$(Build.BuildNumber).ipa'
119+
displayName: 'Rename ipa'
120+
121+
- task: CopyFiles@2
122+
displayName: copy ipa files to artifact
123+
inputs:
124+
SourceFolder: $(agent.buildDirectory)
125+
contents: '**/*.ipa'
126+
targetFolder: '$(build.artifactStagingDirectory)'
127+
overWrite: true
128+
129+
- task: CopyFiles@2
130+
displayName: copy dSYM files to artifact
131+
inputs:
132+
SourceFolder: $(agent.buildDirectory)
133+
contents: '**/*.dSYM/**'
134+
targetFolder: '$(build.artifactStagingDirectory)/dSYM'
135+
overWrite: true
136+
137+
- task: PublishBuildArtifacts@1
138+
inputs:
139+
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
140+
artifactName: 'ipas'
141+
publishLocation: 'container'
142+
143+
- task: AppCenterDistribute@3
144+
inputs:
145+
serverEndpoint: 'tes-ios-service-connection'
146+
appSlug: 'ABC/TEST-Mobile-iOS'
147+
appFile: '$(agent.buildDirectory)/output/*.ipa'
148+
symbolsDsymFiles: '**/*.dSYM'
149+
symbolsIncludeParentDirectory: false
150+
releaseNotesOption: 'file'
151+
releaseNotesFile: '$(agent.buildDirectory)/ReleaseNotes/release.md'
152+
destinationType: 'groups'
153+
distributionGroupId: 'dfdfdf05-dfdfd-dddfdf-dfdfd-dddfdfdfd'
154+

0 commit comments

Comments
 (0)