How to download iOS app archive from Azure DevOps? - ios

I have a pipeline in Azure DevOps for publishing app to App Store. I need the produced archive to get dSYM files from it. How do I setup the pipeline to get an archive after the pipeline is complete?

You can download the builded archive directly from the UI.
Select the successful build from your build history. On the top right corner of the build logs page. You can click the artifacts and download published artifacts.
You can aslo add a powershell task at the end of your pipeline to download the artifacts using restful API.
curl -u $AZURE_USERNAME:$AZURE_TOKEN "https://dev.azure.com/{organization}/$SYSTEM_TEAMPROJECT/_apis/build/builds/$BUILD_BUILDID/artifacts?artifactName=drop&api-version=4.1")
Update:
to include dSYM file in the artifacts, you can add a Copy Files task before the Publish build Artifact task, For blow example, in this way the dSYM file will be copied to dSYM folder of the artifacts.

The answer of Levi did not work for me. But it was pretty close.
I guess first of all it should not be **/.dSYM, but **/*.dSYM.
But it still did not save it, what I did was put ** which will save everything, then start the pipeline and collect the artifacts. Then I found where was the xcarchive file located, it was right in the root folder.
So I guess the problem was that it was in the root folder. Did not check yet, but I guess **.xcarchive will work. You can find dSYM files there.
Update
Even **.xcarchive did not work for me. Only ** works. Don't know why.

Related

How to publish archive files to confluence using Jenkins

I am trying to use Jenkins to push my .xcarchive archive file on my desktop directory on my macbook to a confluence webpages. Right now, i am using a plugin under the Post-build action to connect my Jenkin to the confluence webpage. However, I was not able to pass my archive file over and encountered this message in the log;
[confluence] Attempting to attach the archived artifacts, but there are no archived artifacts from the job! Check job configuration...
[confluence] Uploading 0 file(s) to Confluence...
I think that my Jenkins application is unable to locate the archive file. Furthermore, I am not certain what is the right direction to tackle this problem. I had tried installing plugin such as Artifact Deployer and Copy artifacts. However, I have no clue on what to input to use the plugin. Can anyone give me some suggestions/advices on what I should do? Thanks!

How to serve build archived artifact in jenkins

I am using Jenkins Archive the Artifact build post action to archive my build results. I am looking for a way to directly allow developers to download the archived artifacts from jenkins.
Is there any plugin support that?
Or is there any way to serve static resources through jenkins?
There is no plugins to install for that. When using "Archive the Artifact", every build will generate a package so if developers need to download the artifacts they just need to go the concerned build on Jenkins then look at the "Build Artifacts" section and click to the artifact link that will propose them to download it.
For this to work, developers must have access to the Jenkins interface at least as read only mode.

Understanding Jenkins' Archive The Artifacts and the use of it

I'm trying to understand what it does. Currently, this is the value that I see - dist/.tgz
From what I understand, our grunt scripts makes a tgz file. However, I don't know what Jenkins does.
I got an error when I didn't specify any pattern
ERROR: No artifacts are configured for archiving.
You probably forgot to set the file pattern, so please go back to the configuration and specify it.
If you really did mean to archive all the files in the workspace, please specify "**"
Build step 'Archive the artifacts' changed build result to FAILURE
Most importantly, it allows you to archive items from your job's workspace in a persistent and accessible way, linked to the specific build number.
I.e. you have a job Build that compiles your sources into program.exe, archiving it linked to the build it was produced by, and keeping it accessible for developers or other jobs can come in very handy.
Additionally, archived artifacts are transferred to your jenkins master, so your job can run on any slave, but your archived files will be always accessible, even when that particular slave is offline.
Also, with the right configuration and plugins, other projects can access archived artifacts from other projects. I.e. a job Deploy that uploads your program.exe to some location is as trivial as copying the archived artifact of the last successful build into its workspace for the upload.
Theres quite some information on SO already, i.e. here.

Jenkins Node/Slave(Mac iOS build) - how to get the build package

I have setup Jenkins and everything is fine. It is connected(JNLP) and builds fine.
But how can I get the build back onto the master(the server hosting Jenkins)?
One thing could be to activate a script on the slave/node to copy the build. But since we have this very nice connected JNLP, my first thought was to get it through this connection?
Thanks in advance
Regards
christian
Usually, you'd use the artifacts mechanism to save off the results of the build (the .app for example) and then in another script to retrieve them and take the next step and Jenkins takes care of storing them for you.
To save them off, add a post-build action to Archive the artifacts and then give the path of the artifacts you want to save (optionally excluding some elements, etc).
When I store artifacts for iPhone builds, I usually store the -dSYM.zip and .ipa files.
If you want to use them in another build step, you can then use the Copy Artifact Plugin to copy them as a pre-build step and then operate on them later (for example: if you want to manually release the .ipa and dSYM.zip files to TestFlightApp or HockeyApp or another distribution mechanism).

Cloud I access builds directory from Jenkins/Hudson?

I use Jenkins to run Clover, I can see the HTML report on Jenkins' web GUI, but I also want to download clover.pdf. It's created under workspace directory (only newest version) and builds directory like Jenkins\jobs\Job_test\builds\2013-02-19_17-12-25.
Is there any solution to access Jenkins\jobs\Job_test\builds\2013-02-19_17-12-25 from web ?
Archive the artifact that you require. All the archived artifacts will be stored in Jenkins server and can be accessed from web.
The link to the artifact will look like below
/jenkins/view/Test/job/jobname/lastSuccessfulBuild/artifact/path/to/mypdf.pdf
This can be achieved though the post build step "archive the artifacts":

Resources