Editor’s note: This article is reprinted from the practice sharing of flow.ci user GitHub@mzying2013, the original link here.


preface

I’m sure a lot of people got their start with automated builds from Jenkins. They are all built by hand, and the local code creation library is also built by Gitblit. Basically, every time I change jobs, I have to build it all over again. During the countless trample pit, temporarily not table. I got to know Flow. ci because I had been using their APP publishing platform service fir.im before. Here are some of my experiences with Flow. ci that I hope will help iOSer get started quickly.

The preparatory work

  1. The project’s Git repository (what? Still using SVN! If you change SVN to Git, you can see it here.

  2. Register a Coding account to create a Coding private creation library (free).

    If you already have a Git repository, you can also create a branch dedicated to automated builds

  3. Register flow. Ci account (no charge, but require mobile phone number to receive SMS verification code)

  4. registeredfir.imaccount, and getAPI Token(No charge, but mobile phone number to receive SMS verification code)

  5. Bind Coding accounts. To bind a Coding account, click the user profile picture – Git repository or create a project on the Dashboard page. (GitHub, Bitbucket, Coding, GitLab, code Cloud are all supported)

  6. Certificate and description file. Reference flow.ci’s ownDetailed export certificate and description file tutorial.


    (Please ignore enterprise certificates) Be sure to add the UDID of the device to be installed in the description file, otherwise there will be a message “cannot install this application” when downloading from fir. Im. You will need to re-add the UDID to the description file, then re-upload the description file and build again.

starts

Project configuration

  1. Click Create project directly on the Dashboard page of Flow. ci.

  2. Select Coding and select the repository.

  3. Basic Project Configuration. Select the Apple icon, Xcode version. Click on thecreate.

  4. Workflow configuration. This is a fine-grained configuration that specifies the build branch. You can also set scheduled tasks. Build one at the end of the day. If you have multiple schemes (for example, the APP has iPhone and iPad versions, free and paid versions), you can specify a specific Scheme in compile-scheme. Once you’re done, you can configure some build failure and success notifications (add a build success email address, beware of email explosions).

  5. Add a member. Enter the Email addresses of your team members and testers and click Invite. They receive an email with the subject line Project Invitation. Follow the instructions and join your team.

  6. Set up the. Find Upload Certificate & Provisioning Profile, uploadPreparation 6Prepared description file and certificate.

build

  1. An automated build. Select “Build List” and wait a few seconds for the branch information of your repository to appear.

  2. Manual build. If automatic build is too slow to read the branch information, click Manual Build and select the branch you want to build.

  3. The build process. Click Build current build item (if the status isPrepare resources, you need to wait a few seconds. And then it automatically becomesIn the operation of the). , you can see the build process in the figure below. Error messages tend to occur at compile time. Modify the item as prompted, and then submit it to Coding.flow.ciThe code base is automatically synchronized and the build runs.

  4. After the build. Publish the built APP to the fir.im platform. The first thing you need to do is clickworkflowIn the left “+” sign and search fir, addFir. Im upload plugin. inFIRAPITOKENFill in the boxPreparation 4To obtain theAPI Token.

    If all goes well, you’ll be thereFir. Im – My appYou can see the successful APP package inside. Share your APP download qr code.

The last two options are optional. $FIR_CHANGELOG is used to display update logs on the fir. Im download page. I usually fill in “flow.ci build”. Used to distinguish manual upload from automatic build of flow.ci.

conclusion

The overall feeling is smooth and seamless. As someone who has been tortured multiple times by Jenkins. Flow. ci is currently free to create up to five projects. The Dashboard page of Flow. ci has a battery-like icon in the upper right corner. You can see your current usage. There is also more intuitive data analysis. This is just the first taste of Flow.ci.

Look forward to exploring more interesting features in the future.


This is the use of GitHub@mzying2013 in the “Flow. ci best Practices” series, which I hope will be useful to you.

flow.ci