Mac Jenkins+fastlane Simple steps for iOS automated packaging release

Source: Internet
Author: User

Recently in the use of Jenkins to implement iOS automated Packaging release Dandelion process practice encountered a number of pits, deliberately recorded to facilitate the needs of people.

Go to the Chase:

First, install Jenkins

1.Mac on installation Jenkins encounters to the pit

Because Jenkins's PKG installation package default installation location is shared folder, subsequent encounter permissions issues, so give up the pkg installation. (Description: May be the reason why all users of this machine were selected at the time of installation)

If you have already installed the pkg file, uninstall method: Locate the file/Library/Application Support/jenkins/uninstall.command double-click to perform the uninstallation.

2. Recommended Installation method :

Official website http://mirrors.jenkins.io/war-stable/directly download the war package;

Put it in your personal directory /Users/yourname/jenkins

Before installation, set the Jenkins_home in advance.

Open-t ~/.bash_profile

Add a row

export JENKINS_HOME="/Users/yourname/jenkins"

Source ~/.bash_profile makes settings effective

CD-to-store directory terminal execution commands

java -jar jenkins.war --httpPort=8080 

See the following message stating that the installation is complete

Info: Jenkins is fully up and running

Check the log of the installation process to find the activation password (save one copy)

< If you do not see the password, the instructions are not uninstalled completely, then execute

sudo rm-rf/var/root/.jenkins ~/.jenkins

Perform a setup command once >

3. Unlocking

4. Troubleshoot offline issues

Open a new tab page Enter the URL http://localhost:8080/pluginManager/advanced. Here there is a "upgrade site", the link to the HTTP to change the good, Http://updates.jenkins.io/update-center.json. Submit! then turn Jenkins off (close the end of the installation of Jenkins), and then start Jenkins (Terminal Java-jar Jenkins.war, which needs to be re-pasted) so that it can be connected to the network normally.

5. Install the recommended plugins

6. Create an administrator user

Enter the information and then go to the Jenkins System administration page and get here first

Second, installation Fastlane

Fastlane is used here to automatically compile and pack iOS, it can also automatically publish AppStore on one click, make apps, etc., Fastlane Tool Library is powerful beyond your imagination; more about Fastlane's authoritative introduction usage reference https:// Docs.fastlane.tools Chinese information can be consulted https://www.jianshu.com/p/19ae8cc865b0

1. Xcode-select--install

2. sudo gem install FASTLANE-NV

Third, configure Jenkins

1. Create a new task

2. Set the source code acquisition method

1. Fill in the Source SVN address 2. Add the account password used to get the source code 3. Select just fill in the account

3. Set the polling method to get code updates every 5 minutes, automatically when updates are available. Click? Can view help information about

Complete the above steps to save, manual build purpose is to get the code first

4. Initialize Fastlane

directory where the CD project is located

Execute Fastlane init (select 4)

Fastlane will automatically generate the directory in the APP directory fastlane

Install the plugin to upload dandelion

Execute Fastlane add_plugin Pgyer

Edit configuration file Fastlane/fastfile Custom Lane function: Beta finishes compiling packaging. IPA and upload release

    1. The above api_key and user_key , please developers in their account under the 应用管理 - App概述 - API can be found, and replaced to the corresponding location.
    2. In the later versions of Xcode 8.3 and Xcode 8.3, the values for will need to be build_app export_method set according to the developer's package type, and the optional values are: app-store ,, ad-hoc development , enterprise . For versions below Xcode 8.3, you do not need to set up export_method .
    3. Reference: Https://www.pgyer.com/doc/view/fastlane

4. Build shell scripts (automatically compile scripts for packaged publications)

Edit Write Script: Call the previous written beta method

Saved, you can build the test manually immediately. Good luck!!!

IV. mailing Notification Settings After successful publication reference: 78665075?from=singlemessage&isappinstalled=0

Recommended only for mail plug-ins, if the system default mailbox settings item is configured at the same time will cause the custom sender template to not work

Mac Jenkins+fastlane Simple steps for iOS automated packaging release

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.