-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcodeship-steps.yml
46 lines (43 loc) · 2.15 KB
/
codeship-steps.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# This is where we define the test steps that would be run in a Codeship Pro build.
# The build passes as long as every test step/container returns with a non-zero exit code.
# See here for more: https://documentation.codeship.com/pro/builds-and-configuration/steps/
- name: migrate db
command: bundle exec rake db:migrate
service: app # this migration command will run on the `app` service as defined in the `codeship-services.yml` file
- command: rails test # migration work persists to next step/container only because we have defined a Docker volume in the `codeship-services.yml` (https://documentation.codeship.com/pro/builds-and-configuration/services/)
service: app
# parallel grouping of steps (still in networked isolation)
- type: parallel
steps:
- command: echo apple
service: busybox
- command: echo banana
service: busybox
- command: echo cherry
service: busybox
- command: echo date
service: busybox
# serial order of steps is default, but can also be asserted in a grouping of its own
- type: serial
steps:
- command: /bin/sh -c 'whoami && echo 1' # shell wrapper not required unless passing along env variables or combining commands
service: busybox
- command: echo 2
service: busybox
- command: echo 3
service: busybox
- command: echo 4
service: busybox
exclude: master # `exclude` attribute to blacklist step commands when running build for a given branch name
- type: parallel
steps:
- name: master branch check # provide a `name` otherwise build UI will default to literal step command
command: /bin/sh -c 'echo $CI_BRANCH branch detected'
tag: master # `tag` attribute to whitelist branch names
service: busybox
- command: /bin/sh -c 'echo $CI_BRANCH branch detected'
tag: ^(qa|staging) # regex accepted for whitelisting/blacklisting
service: busybox
- command: /bin/sh -c 'echo $CI_BRANCH branch detected'
tag: ^dev- # to blacklist/whitelist effectively on local machine via `jet steps`, set both `--ci-branch` and `--tag` flags (see `jet steps --help`)
service: busybox