I’m trying to build a pipeline for my ionic project. I’ve been struggling with this for the past week. I’m using a pipeline for each Android and iOS, the former is working fine.
iOS YAML
variables:
scheme: "App"
sdk: "iphoneos"
configuration: "Release"
pool:
vmImage: "macOS-latest"
steps:
- task: Npm@1 # Run npm install
inputs:
command: install
workingDir: "$(System.DefaultWorkingDirectory)"
- task: Npm@1
inputs:
command: custom
customCommand: run build
- task: DownloadPipelineArtifact@2
inputs:
buildType: "specific"
project: "a3706115-71e0-4d2c-a224-5eb27f5d6aed"
definition: "5"
buildVersionToDownload: "latest"
targetPath: "$(Build.BinariesDirectory)"
- bash: |
sudo npm i -g @ionic/cli
- bash: |
npx ionic cap add ios
- task: InstallAppleCertificate@2
inputs:
certSecureFile: '$(p12FileName)'
certPwd: '$(p12Password)'
keychain: 'temp'
deleteCert: true
- task: InstallAppleProvisioningProfile@1
inputs:
provisioningProfileLocation: 'secureFiles'
provProfileSecureFile: '$(provisioningProfile)'
removeProfile: true
- task: CocoaPods@0
inputs:
workingDirectory: '$(Build.SourcesDirectory)/ios/App'
forceRepoUpdate: false
- task: Xcode@5
inputs:
actions: 'build'
configuration: '$(configuration)'
sdk: '$(sdk)'
xcWorkspacePath: '$(Build.SourcesDirectory)/ios/App/App.xcworkspace'
scheme: '$(scheme)'
packageApp: true
archivePath: '$(System.DefaultWorkingDirectory)'
signingOption: 'manual'
signingIdentity: '$(APPLE_CERTIFICATE_SIGNING_IDENTITY)'
provisioningProfileUuid: '$(APPLE_PROV_PROFILE_UUID)'
args: 'CODE_SIGNING_ALLOWED=No'
- task: CopyFiles@2
inputs:
contents: '**/*.ipa'
targetFolder: '$(build.artifactStagingDirectory)'
overWrite: true
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(build.artifactStagingDirectory)/output/$(sdk)/$(configuration)'
artifactName: 'drop'
publishLocation: 'Container'
receiving the below error:
error: exportArchive: No 'teamID' specified and no team ID found in the archive.
Error Domain=IDEFoundationErrorDomain Code=1 "No 'teamID' specified and no team ID found in the archive" UserInfo={NSLocalizedDescription=No 'teamID' specified and no team ID found in the archive}
##[error]Error: /usr/bin/xcodebuild failed with return code: 70
I don’t have a mac to test the ionic xcode locally.
Anyone have an idea why this issue is happening?
2
Answers
This is done in your build.json file
Install certificates and provisioning profile
To sign your application you will need to install the certificate and provisioning profile that we have already imported into the Azure dashboard as a Secure-Files