Show Menu
Cheatography

codemagic.yaml cheat sheet Cheat Sheet (DRAFT) by

Configure all your workflows in a single file. codemagic.yaml is a highly customizable configuration file for setting up your CI/CD pipeline with Codemagic. Configure all your workflows in a single file and commit the file to version control.

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Configure all your workflows in a single file

codema­gic.yaml is a highly custom­izable config­uration file for setting up your CI/CD pipeline with Codemagic. Configure all your workflows in a single file and commit the file to version control.

Syntax

workflows:
  hello-world-workflow:
    name: Hello world workflow
    scripts:
        - echo "Hello World!"

Reusing sections

Define the section on the top of the .yaml file and reuse it later in workflows.

defini­tions:

instan­ce_­mac­_pro: &i­nst­anc­e_m­ac_pro

instan­ce_­type: mac_pro

max_bu­ild­_du­ration: 120

env_ve­rsions: &e­nv_­ver­sions

flutter: stable

xcode: latest

cocoapods: default

scripts:

- &a­dd_­cer­ts_­to_­key­chain

name: Add certs to keychain

script: |

keychain add-ce­rti­ficates


Reuse the defined section elsewhere by adding a * in front of it.
workflows:

ios-re­lease:

name: iOS release

<<: *insta­nce­_ma­c_pro

enviro­nment:

<<: *env_v­ersions

scripts:

- *add_c­ert­s_t­o_k­eychain
 

Instance Type

Instance Type
Build Machine
Specs
Disk size
Billing required?
Cost
mac_mini
macOS standard VM
2.3GHz Quad Core 8GB RAM
322GB
no
$0.038 / minute
mac_pro
macOS premium VM
3.7GHz Quad Core 32GB RAM
322GB
yes
$0.095 / minute