1
votes

I am creating a build for ios using azure and I want to copy a certificate file to artifact folder created to use in the release pipeline.

I am using a copy task and after the task is done its job, I am not able to find a copied file at the desired artifact folder.copy task there are answers for copy task but not working for my scenario.

or is there any way to access files from the source folder of build pipeline to from release pipeline?

1
what do you mean "not working"? where the cert file located? can you share the logs of the copy task?Shayki Abramczyk
@ShaykiAbramczyk I mean I am not able to find the copied file in an artifact folderRagesh Pikalmunde
can you share the logs and the location of the cert file?Shayki Abramczyk
@ShaykiAbramczyk you can see it in the image I attached, do want me to print the variable path which I used?Ragesh Pikalmunde
I don't see any logs from the build. and, where the cert file located?Shayki Abramczyk

1 Answers

6
votes

You were using download secure files task to download the cert files. As below described: see here for more information.

Once downloaded, use the name value that is set on the task (or "Reference name" in the classic editor) to reference the path to the secure file on the agent machine. For example, if the task is given the name mySecureFile, its path can be referenced in the pipeline as $(mySecureFile.secureFilePath). Alternatively, downloaded secure files can be found in the directory given by $(Agent.TempDirectory)

The secure files are downloaded to directory $(Agent.TempDirectory) and its path can be referenced by $(mySecureFile.secureFilePath) if you set the reference name to mySecureFile

So that the copy files task of yours need to be configured as below: Set the Source Folder to $(Agent.TempDirectory) and Contents to the name of the secure files. See below example:

enter image description here

You can also set the Contents to $(certFile.secureFilePath) $(provisionFile.secureFilePath) if you set the Reference name of above download secure file tasks to certFile and provisionFile

enter image description here enter image description here

More conveniently you can use download secure files task directly in release pipeline to download the cert files.

Then the secure files will be available in release pipeline, and can be referenced just like in the build pipeline.