Skip to content

Commit 43fae80

Browse files
Merge branch 'master' into patch-2
2 parents 857c8be + 6676b0f commit 43fae80

File tree

3 files changed

+197
-64
lines changed

3 files changed

+197
-64
lines changed

jekyll/_cci2/creating-orbs.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ Certified orbs are those that CircleCI has built or has reviewed and approved as
5454

5555
**Note:** The Security setting required for publishing or using 3rd-party orbs may only be toggled by organization administrators.
5656

57+
**Note:** Orbs are not currently supported on private installations of CircleCI Server.
58+
5759
## Semantic Versioning in Orbs
5860

5961
Orbs are published with the standard 3-number semantic versioning system:
@@ -133,7 +135,6 @@ workflows:
133135

134136
In the example above, note that the contents of ```my-orb``` are resolved as an inline orb because the contents of ```my-orb``` are a map; whereas the contents of ```codecov``` are a scalar value, and thus assumed to be an orb URI.
135137

136-
137138
### Example Inline Template
138139

139140
When you want to author an orb, you may wish to use this example template to quickly and easily create a new orb with all of the required components. This example includes each of the three top-level concepts of orbs. While any orb can be equally expressed as an inline orb definition, it will generally be simpler to iterate on an inline orb and use ```circleci config process .circleci/config.yml``` to check whether your orb usage matches your expectation.
@@ -256,7 +257,6 @@ While not strictly enforced, it is best practice when versioning your production
256257
* MINOR: when you add functionality in a backwards-compatible manner
257258
* PATCH: when you make backwards-compatible bug fixes
258259

259-
260260
#### Using Orbs Within Your Orb and Register-Time Resolution
261261

262262
You may use an ```orbs``` stanza inside an orb.
@@ -267,6 +267,26 @@ For example, orb ```foo/bar``` is published at version ```1.2.3``` with an ```or
267267

268268
If ```biz/baz``` is updated to ```3.0.0```, anyone using ```foo/[email protected]``` will not see the change in ```biz/[email protected]``` until ```foo/bar``` is published at a higher version than `1.2.3`.
269269

270+
**Note:** Orb elements may be composed directly with elements of other orbs. For example, you may have an orb that looks like the example below.
271+
272+
{% raw %}
273+
```
274+
orbs:
275+
some-orb: some-ns/some-orb@volatile
276+
executors:
277+
my-executor: some-orb/their-executor
278+
commands:
279+
my-command: some-orb/their-command
280+
jobs:
281+
my-job: some-orb/their-job
282+
another-job:
283+
executor: my-executor
284+
steps:
285+
- my-command
286+
param1: "hello"
287+
```
288+
{% endraw %}
289+
270290
### Deleting Production Orbs
271291

272292
In general, CircleCI prefers to never delete production orbs that were published as world-readable because it harms the reliability of the orb registry as a source of configuration and the trust of all orb users.
@@ -403,7 +423,6 @@ If you are a user of a privately installed CircleCI deployment you will have to
403423

404424
**Note:** CircleCI installed on a private cloud or datacenter does not yet support config processing and orbs; therefore, you will only be able to use `circlecli local execute` (this was previously `circleci build`).
405425

406-
407426
### Validating a Build Config
408427

409428
To ensure that the CircleCI CLI tool has been installed properly, you can use the CLI tool to validate a build config file by running the following command:
@@ -519,4 +538,3 @@ The animation shows snippets to give you an overview of the following steps for
519538
9. Replacing the inline executor and job definitions in the `.circleci/config.yml` with the reference to the published `ndintenfass/orb-utils@dev:test` orb.
520539
10. Running `circleci-config-validate .circleci/config.yml` to validate it is well-formed.
521540
11. Committing the change and checking that the build succeeds when using the imported orb. The processed config appears on the Configuration tab of the CircleCI Jobs page.
522-

jekyll/_cci2/orbs-faq.md

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ only certified orbs are permitted in this project.
6060

6161
* Answer: Try making a whitespace change or similar. Your config won't recompile until you've made a change. Config processing happens before the compiled code is passed into the workflows conductor. Because of that, the workflows conductor (where you trigger the rebuild) knows nothing of the original 2.1 config.
6262

63-
6463
<!---
6564
### Environment Variables Not Being Passed at Runtime
6665
@@ -108,7 +107,6 @@ yourusername/circle-autoAdded by GitHub
108107
```
109108
--->
110109

111-
112110
### Logging Outputs
113111

114112
* Question: Is there a standard way to to log output? For example, Jenkins plugins provide console links to show the log output and provides hooks to log those messages. It is possible to log to stdout, but is there a better way to log those log messages.
@@ -117,14 +115,43 @@ yourusername/circle-autoAdded by GitHub
117115

118116
### Failing Builds
119117

120-
Question: How can I intentionally fail a job that invokes an orb from within an orb?
118+
* Question: How can I intentionally fail a job that invokes an orb from within an orb?
119+
120+
* Answer: You can always return a non-zero status code from the shell to fail the job. You can also use `run: circleci-agent step halt` as a step to exit the job without failing.
121+
122+
### Private Installation of CircleCI When Using Orbs
121123

122-
Answer: You can always return a non-zero status code from the shell to fail the job. You can also use `run: circleci-agent step halt` as a step to exit the job without failing.
124+
* Question: Can I use a private installation of CircleCI Server when using working with orbs?
125+
126+
* Answer: No. CircleCI Server does not currently support private installations.
127+
128+
### Using Orb Elements For Other Orbs
129+
130+
* Question: May I use elements from a different orb when creating my own orb?
131+
132+
* Answer: Yes, orbs may be composed directly using elements of other orbs. For example:
133+
134+
{% raw %}
135+
```
136+
orbs:
137+
some-orb: some-ns/some-orb@volatile
138+
executors:
139+
my-executor: some-orb/their-executor
140+
commands:
141+
my-command: some-orb/their-command
142+
jobs:
143+
my-job: some-orb/their-job
144+
another-job:
145+
executor: my-executor
146+
steps:
147+
- my-command
148+
param1: "hello"
149+
```
150+
{% endraw %}
123151

124152

125153
## See Also
126154
- Refer to [Orb Introduction]({{site.baseurl}}/2.0/orb-intro/), for a high-level overview.
127155
- Refer to [Using Orbs]({{site.baseurl}}/2.0/using-orbs/), for more about how to use existing orbs.
128156
- Refer to [Creating Orbs]({{site.baseurl}}/2.0/creating-orbs/), where you will find step-by-step instructions on how to create your own orb.
129157
- Refer to [Reusing Config]({{site.baseurl}}/2.0/reusing-config/) for more detailed examples of reusable orbs, commands, parameters, and executors.
130-

0 commit comments

Comments
 (0)