Skip to content

Commit f14213c

Browse files
authored
Merge pull request travis-ci#2447 from travis-ci/ph-language-review-lifecycle
Language review of job-lifecycle.md
2 parents 9860871 + 886eaa2 commit f14213c

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

user/job-lifecycle.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Travis CI provides a default build environment and a default set of phases for e
99

1010
Keep reading to see how you can customize any phase in this process, via your `.travis.yml`.
1111

12-
## The job lifecycle
12+
## The Job Lifecycle
1313

1414
A job on Travis CI is made up of two main parts:
1515

@@ -36,7 +36,7 @@ The complete job lifecycle, including three optional deployment phases and after
3636
1. OPTIONAL `after_deploy`
3737
1. `after_script`
3838

39-
A *build* can be composed of many jobs.
39+
> A *build* can be composed of many jobs.
4040
4141
## Customizing the Installation Phase
4242

@@ -50,7 +50,7 @@ install: ./install-dependencies.sh
5050
```
5151
{: data-file=".travis.yml"}
5252
53-
> When using custom scripts they should be executable (for example, using `chmod +x`) and contain a valid shebang line such as `/usr/bin/env sh`, `/usr/bin/env ruby`, or `/usr/bin/env python`.
53+
> When using custom scripts, they should be executable (for example, using `chmod +x`) and contain a valid shebang line such as `/usr/bin/env sh`, `/usr/bin/env ruby`, or `/usr/bin/env python`.
5454

5555
You can also provide multiple steps, for instance to install both ruby and node dependencies:
5656

@@ -94,7 +94,7 @@ script:
9494
```
9595
{: data-file=".travis.yml"}
9696

97-
When one of the build commands returns a non-zero exit code, the Travis CI build runs the subsequent commands as well, and accumulates the build result.
97+
When one of the build commands returns a non-zero exit code, the Travis CI build runs the subsequent commands as well and accumulates the build result.
9898

9999
In the example above, if `bundle exec rake build` returns an exit code of 1, the following command `bundle exec rake builddoc` is still run, but the build will result in a failure.
100100

@@ -134,7 +134,7 @@ if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
134134
fi
135135
```
136136

137-
Note the `set -ev` at the top. The `-e` flag causes the script to exit as soon as one command returns a non-zero exit code. This can be handy if you want whatever script you have to exit early. It also helps in complex installation scripts where one failed command wouldn't otherwise cause the installation to fail.
137+
> Note the `set -ev` at the top. The `-e` flag causes the script to exit as soon as one command returns a non-zero exit code. This can be handy if you want whatever script you have to exit early. It also helps in complex installation scripts where one failed command wouldn't otherwise cause the installation to fail.
138138

139139
The `-v` flag makes the shell print all lines in the script before executing them, which helps identify which steps failed.
140140

@@ -157,7 +157,7 @@ When overriding these steps, do not use `exit` shell built-in command.
157157
Doing so will run the risk of terminating the build process without giving Travis a chance to
158158
perform subsequent tasks.
159159

160-
Using `exit` inside a custom script which will be invoked from during a build is fine.
160+
> Using `exit` inside a custom script which will be invoked from during a build is fine.
161161

162162

163163
## Breaking the Build
@@ -175,7 +175,7 @@ However, if one of these stages times out, the build is marked as **failed**.
175175

176176
An optional phase in the job lifecycle is deployment.
177177
This phase is defined by using one of our continuous deployment providers to deploy code to Heroku, Amazon, or a different supported platform.
178-
The deploy steps are skipped if the build is broken.
178+
The deploy steps are skipped, if the build is broken.
179179

180180
When deploying files to a provider, prevent Travis CI from resetting your
181181
working directory and deleting all changes made during the build ( `git stash
@@ -189,6 +189,8 @@ deploy:
189189

190190
You can run commands before a deploy by using the `before_deploy` phase. A non-zero exit code in this phase will mark the build as **errored**.
191191

192-
If there are any steps you'd like to run after the deployment, you can use the `after_deploy` phase. Note that `after_deploy` does not affect the status of the build.
192+
If there are any steps you'd like to run after the deployment, you can use the `after_deploy` phase.
193193

194-
Note that `before_deploy` and `after_deploy` are run before and after every deploy provider, so will run multiple times if there are multiple providers.
194+
> Note that `after_deploy` does not affect the status of the build.
195+
196+
> Note that `before_deploy` and `after_deploy` are run before and after every deploy provider, so they will run multiple times, if there are multiple providers.

0 commit comments

Comments
 (0)