Setup xcodebuild, gym and scan for easier Jenkins integration

  • Adds and unlocks keychains from Jenkins 'Keychains and Provisioning Profiles Plugin'
  • Sets unlocked keychain to be used by Match
  • Sets code signing identity from Jenkins 'Keychains and Provisioning Profiles Plugin'
  • Sets output directory to './output' (gym, scan and backup_xcarchive)
  • Sets derived data path to './derivedData' (xcodebuild, gym, scan and clear_derived_data, carthage)
  • Produce result bundle (gym and scan)

This action helps with Jenkins integration. Creates own derived data for each job. All build results like IPA files and archives will be stored in the ./output directory.
The action also works with Keychains and Provisioning Profiles Plugin, the selected keychain will be automatically unlocked and the selected code signing identity will be used.
Match will be also set up to use the unlocked keychain and set in read-only mode, if its environment variables were not yet defined.
By default this action will only work when fastlane is executed on a CI system.

Supported platforms ios, mac
Author @bartoszj

1 Example



Key Description Default
force Force setup, even if not executed by Jenkins false
unlock_keychain Unlocks keychain true
add_keychain_to_search_list Add to keychain search list, valid values are true, false, :add, and :replace :replace
set_default_keychain Set keychain as default true
keychain_path Path to keychain
keychain_password Keychain password ''
set_code_signing_identity Set code signing identity from CODE_SIGNING_IDENTITY environment true
code_signing_identity Code signing identity
output_directory The directory in which the ipa file should be stored in ./output
derived_data_path The directory where built products and other derived data will go ./derivedData
result_bundle Produce the result bundle describing what occurred will be placed true

* = default value is dependent on the user's system


To show the documentation in your terminal, run

fastlane action setup_jenkins


It is recommended to add the above action into your Fastfile, however sometimes you might want to run one-offs. To do so, you can run the following command from your terminal

fastlane run setup_jenkins

To pass parameters, make use of the : symbol, for example

fastlane run setup_jenkins parameter1:"value1" parameter2:"value2"

It's important to note that the CLI supports primitive types like integers, floats, booleans, and strings. Arrays can be passed as a comma delimited string (e.g. param:"1,2,3"). Hashes are not currently supported.

It is recommended to add all fastlane actions you use to your Fastfile.

Source code

This action, just like the rest of fastlane, is fully open source, view the source code on GitHub

Back to actions