You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: jekyll/_cci2/creating-orbs.md
+22-4Lines changed: 22 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,8 @@ Certified orbs are those that CircleCI has built or has reviewed and approved as
54
54
55
55
**Note:** The Security setting required for publishing or using 3rd-party orbs may only be toggled by organization administrators.
56
56
57
+
**Note:** Orbs are not currently supported on private installations of CircleCI Server.
58
+
57
59
## Semantic Versioning in Orbs
58
60
59
61
Orbs are published with the standard 3-number semantic versioning system:
@@ -133,7 +135,6 @@ workflows:
133
135
134
136
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.
135
137
136
-
137
138
### Example Inline Template
138
139
139
140
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
256
257
* MINOR: when you add functionality in a backwards-compatible manner
257
258
* PATCH: when you make backwards-compatible bug fixes
258
259
259
-
260
260
#### Using Orbs Within Your Orb and Register-Time Resolution
261
261
262
262
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
267
267
268
268
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`.
269
269
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
+
270
290
### Deleting Production Orbs
271
291
272
292
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
403
423
404
424
**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`).
405
425
406
-
407
426
### Validating a Build Config
408
427
409
428
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
519
538
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.
520
539
10. Running `circleci-config-validate .circleci/config.yml` to validate it is well-formed.
521
540
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.
Copy file name to clipboardExpand all lines: jekyll/_cci2/orbs-faq.md
+32-5Lines changed: 32 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,6 @@ only certified orbs are permitted in this project.
60
60
61
61
* 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.
62
62
63
-
64
63
<!---
65
64
### Environment Variables Not Being Passed at Runtime
66
65
@@ -108,7 +107,6 @@ yourusername/circle-autoAdded by GitHub
108
107
```
109
108
--->
110
109
111
-
112
110
### Logging Outputs
113
111
114
112
* 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
117
115
118
116
### Failing Builds
119
117
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
121
123
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 %}
123
151
124
152
125
153
## See Also
126
154
- Refer to [Orb Introduction]({{site.baseurl}}/2.0/orb-intro/), for a high-level overview.
127
155
- Refer to [Using Orbs]({{site.baseurl}}/2.0/using-orbs/), for more about how to use existing orbs.
128
156
- 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.
129
157
- Refer to [Reusing Config]({{site.baseurl}}/2.0/reusing-config/) for more detailed examples of reusable orbs, commands, parameters, and executors.
0 commit comments