Cocoapods: 馃寛 Question to be possible to automate `pod trunk push` with CI service like travisCI

Created on 4 Mar 2015  路  6Comments  路  Source: CocoaPods/CocoaPods

馃寛 (I read CONTRIBUTING.md)

I want to automate release flow of pod using travisCI, because only a manual operation to be left of my ios release workflow is pod trunk push.

The command of pod trunk register requires to verify e-mail and inadvertently has the sessoin in CI working machine (in not my own machine). The former disturbs automation and the latter compromises security.

I googled to solve this issue, and found same questions not to be solved on stackoverflow. And I couldn't find any same issues on this repository.

So I'm asking you to have a solution to automation with CI, and if it doesn't exist, I hope to add a solution to issues(task lists) of future version-up.

Thank you for developing nice services.

Most helpful comment

@loicgriffie I just tackled this issue on a blog post.

You'll need to generate an access token for trunk and set it as a secret variable on Bitrise under the COCOAPODS_TRUNK_TOKEN key. Here's a post by @kylef on how to generate the access token: https://fuller.li/posts/automated-cocoapods-releases-with-ci/

All 6 comments

We could probably allow override the trunk email and token via environment variables?

I think that seems totally reasonable :+1:

Thank you for quick response !

I can confirm to fetch token throught pod trunk me --verbose.
I'm going to try this soon.

I'm going to try this soon.

I tried and confirmed it.

  • Replaced some info with *** manually.
$ bundle exec pod trunk me
[!] You need to register a session first.
...
$ COCOAPODS_TRUNK_TOKEN=*** bundle exec pod trunk me
...
  - Name:     ***
  - Email:    ***
  - Since:    September 11th, 2014 11:27
  - Pods:
    - ***
  - Sessions:
    - March 4th, 15:30           -     July 16th, 18:50. IP: 118.238.203.205 Description: Mac-158()

I'm going to try this soon.

I tried and confirmed it.

  • Replaced some info with *** manually.
$ bundle exec pod trunk me
[!] You need to register a session first.
...
$ COCOAPODS_TRUNK_TOKEN=*** bundle exec pod trunk me
...
  - Name:     ***
  - Email:    ***
  - Since:    September 11th, 2014 11:27
  - Pods:
    - ***
  - Sessions:
    - March 4th, 15:30           -     July 16th, 18:50. IP: 118.238.203.205 Description: Mac-158()

Hello,

We are trying to achieve the same for Bitrise. Any clue how to achieve this ?

@loicgriffie I just tackled this issue on a blog post.

You'll need to generate an access token for trunk and set it as a secret variable on Bitrise under the COCOAPODS_TRUNK_TOKEN key. Here's a post by @kylef on how to generate the access token: https://fuller.li/posts/automated-cocoapods-releases-with-ci/

Was this page helpful?
0 / 5 - 0 ratings