Skip to content

Commit ceb14b3

Browse files
author
Eugene C
authored
Add clarifying sentences
Provide commentary and clarification on some of the optimizations Add links to other CircleCI documentation
1 parent 8d92e8e commit ceb14b3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

jekyll/_cci2/optimizations.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ jobs:
4747
Make note of the use of a `checksum` in the cache `key`; this is used to calculate when a specific dependency-management file (such as a `package.json` or `requirements.txt` in this case) _changes_ and so the cache will be updated accordingly. In the above example, the
4848
[`restore_cache`]({{site.baseurl}}/2.0/configuration-reference#restore_cache) example uses interpolation to put dynamic values into the cache-key, allowing more control in what exactly constitutes the need to update a cache.
4949

50+
We recommend that you verify that the dependencies installation step succeeds before adding caching steps. Caching a failed dependency step will require you to change the cache key in order to avoid failed builds due to a bad cache.
51+
5052
Consult the [caching document]({{site.baseurl}}/2.0/caching) to learn more.
5153

5254
## Workflows
@@ -94,16 +96,16 @@ Learn more about workflows in our [workflows document]({{site.baseurl}}/2.0/work
9496
9597
Workspaces are used to pass along data that is _unique to a run_ and is needed for _downstream jobs_. So, if you are using workflows, a job run earlier in your build might fetch data and then make it _available later_ for jobs that run later in a build.
9698
97-
To persist data from a job and make it available to other jobs, configure the job to use the [`persist_to_workspace`]({{ site.baseurl}}/2.0/configuration-reference#persist_to_workspace) key. Files and directories named in the paths: property of `persist_to_workspace` will be uploaded to the workflow’s temporary workspace relative to the directory specified with the root key. The files and directories are then uploaded and made available for subsequent jobs (and re-runs of the workflow) to use.
99+
To persist data from a job and make it available to downstream jobs via the [`attach_workspace`] key, configure the job to use the [`persist_to_workspace`]({{ site.baseurl}}/2.0/configuration-reference#persist_to_workspace) key. Files and directories named in the paths: property of `persist_to_workspace` will be uploaded to the workflow’s temporary workspace relative to the directory specified with the root key. The files and directories are then uploaded and made available for subsequent jobs (and re-runs of the workflow) to use.
98100

99101
Read more about how to use workspaces in the [workflows document]({{site.baseurl}}/2.0/workflows/#using-workspaces-to-share-data-among-jobs).
100102

101103
## Parallelism
102104

103105
**Note**: Your CircleCI plan determines what level of parallelism you can use in your builds (1x, 2x, 4x, etc)
104106

105-
If your project has a large test suite, you can configure your build to use [`parallelism`]({{site.baseurl}}/2.0/configuration-reference#parallelism)
106-
to spread your tests across multiple machines. CircleCI supports automatic test
107+
If your project has a large test suite, you can configure your build to use [`parallelism`]({{site.baseurl}}/2.0/configuration-reference#parallelism) together with either [CircleCI's test splitting functionality](https://circleci.com/docs/2.0/parallelism-faster-jobs/#using-the-circleci-cli-to-split-tests) or a [third party application or library](https://circleci.com/docs/2.0/parallelism-faster-jobs/#other-ways-to-split-tests)
108+
to split your tests across multiple machines. CircleCI supports automatic test
107109
allocation across machines on a file-basis, however, you can also manually
108110
customize how tests are allocated.
109111

@@ -125,7 +127,7 @@ Read more in-depth about splitting tests in our [document on parallelism]({{site
125127
[`resource_class`]({{site.baseurl}}/2.0/configuration-reference#resource_class) feature.
126128
If you are on a container-based plan you will need to [open a support ticket](https://support.circleci.com/hc/en-us/requests/new) to have a CircleCI Sales representative contact you about enabling this feature on your account.
127129

128-
After this feature is added to your paid plan, it is possible to configure CPU and RAM resources for each job as described in the following table. If `resource_class` is not specified or an invalid class is specified, the default `resource_class: medium` will be used. The `resource_class` key is currently only available for use with the `docker` executor.
130+
After this feature is added to your paid plan, it is possible to configure CPU and RAM resources for each job as described in [this table](https://circleci.com/docs/2.0/configuration-reference/#resource_class). If `resource_class` is not specified or an invalid class is specified, the default `resource_class: medium` will be used. The `resource_class` key is currently only available for use with the `docker` executor.
129131

130132
Below is an example use case of the `resource_class` feature.
131133

0 commit comments

Comments
 (0)