Since I do not own a Apple Mac, I need to upload my .ipa file
which is ready with me to iTunesConnect for putting it
on AppleAppStore ..
Not sure about bitrise workflows etc, since I have joined bitrise
short time back. Will I need to learn workflows and take
the full curve of bitrise learnings?
Is there any easy steps reckoner via bitrise just to deploy an ipa file on appleStore thru iTunesconnect without using Mac/XCode personally ??
Thanks
The recommended way is to build your app (.ipa) with https://www.bitrise.io , as that way the building & code signing of the .ipa is handled automatically.
If you don't want to build your app on bitrise.io and just want to upload it to iTunes Connect, you have two ways to do this depending on where you store your .ipa that you want to send to iTunes Connect.
You store the .ipa in a repository
You store the .ipa elsewhere (Dropbox, Amazon S3, etc.) and you want to download the .ipa from there.
In the first case:
Create a new app on Bitrise with the repository that you use to store the .ipa. (To add a repository which doesn't include an iOS project select the Do you want to configure the build manually? option in the Validation setup section.)
After that go to the Workflow tab, click on the Manage Workflow button and remove all the steps except the Git Clone and the Activate SSH key. (docs for accessing and managing the workflow: http://devcenter.bitrise.io/docs/add-your-first-step-to-your-apps-workflow)
Add a Script Step and after that one of the iTunes Connect Steps (Deliver or Shenzen).
Click on the Script Step and copy this to the content input:
Script:
#!/bin/bash
set -e
set -x
ipa_relative_path_in_repository="${BITRISE_SOURCE_DIR}/relative/path/to.ipa"
envman add --key BITRISE_IPA_PATH --value "${ipa_relative_path_in_repository}"
In the second case:
Create a new app on Bitrise with the repo you use to store your app.
Go to Manage workflow
Remove every step
Add a Script Step and after that one of the iTunes Connect Steps (Deliver or Shenzen).
Click on the Script Step and copy this to the content input:
Script:
#!/bin/bash
set -e
set -x
ipa_download_url="INSERT_YOUR_IPA_DOWNLOAD_URL_HERE"
ipa_download_location="${BITRISE_DEPLOY_DIR}/ipa-to-upload.ipa"
echo "ipa_download_location: ${ipa_download_location}"
wget -O "$ipa_download_location" "$ipa_download_url"
envman add --key BITRISE_IPA_PATH --value "${ipa_download_location}"
Related
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.
I might be late to the CI/CD party but better late than never. So far, I am able to setup Jenkins on a separate MAC which does not contain XCode. I use this MAC as a 24x7 small server for minor operations. A lot of time was wasted for archiving and then uploading that build to testflight for my iOS apps so I thought of setting up a CI/CD process.
After the Jenkins setup, I am able to generate the .ipa file for specified target (release/debug).
Now I want to upload this .ipa file to Testflight. This is what I know already:
Via ALTool: As per this answer, I should use AlTool. AlTool is nothing but the Application Loader inside XCode. I don't want to install XCode on this separate MAC, so this is not what I can work with.
Via shell script: If you see the question of the answer in the above point, the user has mentioned a script. I have tried that as well and it fails.
Via Shenzen: This is deprecated. On the Github page itself, they have mentioned to use Fastlane.
Via Testflight plugin: This is also deprecated.
So basically, what I feel is Jenkins alone itself can not distribute iOS builds to testflight, unless we use ALTool which requires XCode to be installed. Is there a workaround to do it purely via Jenkins?
Yes, there is a better option, strongly recommend Fastlane.
You can check here and here is specifically for TestFlight
You need to have Fastlane on the Jenkins but it is execution is easy and fast.
Also as we discussed you can implement connection by yourself using AppStoreConnect API
Fastlane Pilot action is a better option.
You need to add Environment Variables in Jenkins
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD - This is application-specific password generated on https://appleid.apple.com. Pilot automatically fetches password for a transporter from environment variable named FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD
FASTLANE_PASSWORD This is apple developer account password
Add below command in shell script of Jenkins
fastlane pilot upload — ipa IPA_PATH
Reference link
I have successfully upgraded to VS/TFS 2017, and I am at the point where I want the build to automatically publish a website to a staging location using one of the project's publish profiles. I am impressed with the flexibility in the "Build & Release" section of the TFS Team Project Site, but it's a little overwhelming.
This project has 2 simple publish profiles. Both use the 'FTP publish method' to upload to the Go Daddy hosting provider; one deletes all files before upload, the other only updates files. There are transforms applied for things like connection strings. These publish profiles work properly. I just need them to be added at the end of an automated build.
It would seem it should be simple to say 'use this publish profile', but there are so many options and choices it's not intuitively obvious which to use, and I haven't been able to find a reference on the web that focuses on what I want to do.
If you want to invoke the msbuild command using the publish profile to publish website to FTP location, then it's impossible as FTP publishing is not supported on the command line.
If you insist on invoking the publish profile, then you can invoke msbuild command line with the publish profile used to publish the website to a staging location (eg, local or UNC path), then use FTP upload task step to upload the website from the staging location to the specific FTP location, or using PowerShell script to upload the website.
You can reference this thread:
How can I add FTP website deployment to a VS2015/TFS2013 build process
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).
Using the xcodebuild command it is fairly simple to build iPhone projects on a Mac based build server. However an issue I run into, when building a new project is that I need to install the provisioning profile on the machine.
I think it is not a very good practise to check in the provisioning profile along with the code (Is that right?). So how do I make sure that at build time the provisioning profiles are available via some sort of automated mechanism.
You could check the certificates and the private key into your source code control system assuming that they aren't publicly available.
Other than that there are two options, either use an automated system builder type tool, such as Chef or roll your own shell script to set up build machines.
You could create a Chef recipe that builds a new Jenkins based CI server, downloads the provisioning profile (and the private key) from an internal server and installs it into the Jenkins user's Library/MobileDevices/Provisioning Profiles directory (and login.keychain) on the new CI server.
You could also automate this part of the setup of the server using a shell script:
curl -O http://your_server/ABCD.mobileprovision
cp ABCD.mobileprovision ~/Library/MobileDevices/Provisioning\ Profiles
curl -O http://your_server/DeveloperCerts.p12
security import DeveloperCerts.p12 -P this_is_your_password -T codesign -T security