Closed superandrew closed 2 years ago
in the end we managed with dynamic steps.
@superandrew I am running into the same problem. Can you provide the solution you came up with? It would really help me
@superandrew yes please do tell cause I'm having the same problem and NEED help
this is the code we used to discriminate between branches and certificates that we needed to use per branch:
- task: InstallAppleProvisioningProfile@1
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'develop'))
inputs:
provisioningProfileLocation: "secureFiles"
provProfileSecureFile
any solution? In my case the profile name will be stored in a manifest.json, and I need pro sign in execution time...
The solution I end up with for my case was to add a UI Variable to the pipeline lets call it "provisioningFile". We upload a dummy secure file to use as a value so that when saving the YAML file it doesn't complain but running the pipe with it would give warning because it is a dummy file. The UI variable has no problems in being used in "provProfileSecureFile". In order to use it dynamically you have to call the pipeline trough the Azure REST API:
https://dev.azure.com/censored/censored/_apis/pipelines/57/runs?api-version=7.1-preview.1
{
"resources": {
"repositories": {
"self": {
"refName": "refs/heads/main"
}
}
},
"variables": {
"provisioningFile": {
"isSecret": false,
"value": "your_dynamic_name.mobileprovision>"
}
}
}
You could just end it here and call the api from you server or wherever.
I suppose you could also make a new pipeline that dynamically "calculates" the name for the provisioning profile file and uses it in lets say bash curl to make the call to the previous pipeline with the api call.
🤢
Note
Issues in this repo are for tracking bugs, feature requests and questions for the tasks in this repo
For a list:
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks
If you have an issue or request for the Azure Pipelines service, use developer community instead:
https://developercommunity.visualstudio.com/spaces/21/index.html )
Required Information
Entering this information will route you directly to the right team and expedite traction.
Question, Bug, or Feature?
Type: Question
Enter Task Name: InstallAppleProvisioningProfile
list here (V# not needed):
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks
Environment
Azure Pipeline, on behalf of a customer
Agent - Hosted or Private:
Issue Description
[Include task name(s), screenshots and any other relevant details] When we use InstallAppleProvisioningProfile the pipeline runs a pre-task. In this pretask it installs the provisionin profile before using it in the task. Since we have an environment variable which is set to the type of provisioning profile we want to install (e.g. dev, qa, prod) this determines the name of the file to be installed.
However we noticed that the variable, which is set dnamically based on the branch on the configuration task which run before the iOs task, that variable isn't set when the pre-task runs.
and this is how it should take it
Any Idea on how this could be achieved?
Task logs
Troubleshooting
Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting