Skip to content

Commit 59989c7

Browse files
incorporate Kunal's feedback
1 parent 88c45b7 commit 59989c7

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

jekyll/_cci2/concepts.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This document provides an overview of the concepts used in CircleCI 2.0 in the f
1616

1717
## Steps
1818

19-
Steps are actions that need to be taken to perform your build. ![step illustration]( {{ site.baseurl }}/assets/img/docs/concepts_step.png) Steps are usually a collection of executable commands. For example, the `checkout` step checks out the source code for a job over SSH. Then, the `run` step executes the `make test` command using a non-login shell by default.
19+
Steps are actions that need to be taken to perform your job. ![step illustration]( {{ site.baseurl }}/assets/img/docs/concepts_step.png) Steps are usually a collection of executable commands. For example, the `checkout` step checks out the source code for a job over SSH. Then, the `run` step executes the `make test` command using a non-login shell by default.
2020

2121

2222
```YAML
@@ -71,7 +71,7 @@ An image is a packaged system that has the instructions for creating a running c
7171

7272
## Jobs
7373

74-
Jobs are a collection of steps. The Job Space is all of the containers being run by an executor (`docker`, `machine`, or `macos`) for the current job.
74+
Jobs are a collection of steps and each job must declare an executor that is either `docker`, `machine`, or `macos`. Machine includes a default image if not specified, for Docker and macOS, you must also declare an image.
7575

7676
![job illustration]( {{ site.baseurl }}/assets/img/docs/concepts1.png)
7777

@@ -114,7 +114,7 @@ jobs:
114114
115115
## Workflows
116116
117-
Workflows define a list of jobs and their run order. Within the CI/CD industry, this feature is also referred to as Pipelines. It is possible to run jobs in parallel, sequentially, on a schedule, or with a manual gate using an approval job.
117+
Workflows define a list of jobs and their run order. It is possible to run jobs in parallel, sequentially, on a schedule, or with a manual gate using an approval job.
118118
119119
![workflows illustration]( {{ site.baseurl }}/assets/img/docs/workflow_detail.png)
120120
@@ -174,6 +174,8 @@ workflows:
174174

175175
Workspaces are a workflows-aware storage mechanism. A workspace stores data unique to the job, which may be needed in downstream jobs. Artifacts persist data after a workflow is completed and may be used for longer-term storage of the outputs of your build process.
176176

177+
Each workflow has a temporary workspace associated with it. The workspace can be used to pass along unique data built during a job to other jobs in the same workflow.
178+
177179
![workflow illustration]( {{ site.baseurl }}/assets/img/docs/concepts_workflow.png)
178180

179181
{% raw %}
@@ -207,3 +209,14 @@ jobs:
207209
...
208210
```
209211
{% endraw %}
212+
213+
Note the following distinctions between Artifacts, Workspaces, and Caches:
214+
215+
| Type | Lifetime | Use | Example |
216+
|-----------|-----------------|------------------------------------|---------
217+
| Artifacts | Months | Preserve long-term artifacts. | Available in the Artifacts tab of the Build details under the `tmp/circle-artifacts.<hash>/container` or similar directory. |
218+
| Workspaces | Duration of workflow | Attach the workspace in a downstream container with the `attach_workspace:` step. | The `attach_workspace` copies and re-creates the entire workspace content when it runs. |
219+
| Caches | Months | Store non-vital data that may help the job run faster, for example npm or Gem packages. | The `save_cache` job step with a `path` to a list of directories to add and a `key` to uniquely identify the cache (for example, the branch, build number, or revision). Restore the cache with `restore_cache` and the appropriate `key`. |
220+
{: class="table table-striped"}
221+
222+
Refer to the [Persisting Data in Workflows: When to Use Caching, Artifacts, and Workspaces](https://circleci.com/blog/persisting-data-in-workflows-when-to-use-caching-artifacts-and-workspaces/) for additional conceptual information about using workspaces, caching, and artifacts.

0 commit comments

Comments
 (0)