Skip to content

Commit c974512

Browse files
Merge pull request #9978 from circleci/DOCSS-1799-content-updates
Orbs content updates
2 parents e44b29b + 144767d commit c974512

24 files changed

+1841
-665
lines changed
File renamed without changes.

docs/orbs/modules/author/pages/creating-orbs.adoc renamed to archive/orbs/publishing-orbs-to-the-registry.adoc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
= Publishing orbs
1+
= Publishing orbs to the orb registry
22
:page-platform: Cloud
33
:page-description: Publishing Orbs to the Orb Registry
44
:experimental:
5+
:page-aliases: creating-orbs
56

6-
This guide covers the steps required to publish an orb.
7+
This guide covers the steps required to publish a registry orb to the link:https://circleci.com/developer/orbs[orb registry].
78

89
[#introduction]
910
== Introduction
1011

11-
After authoring your orb, you can publish it with a xref:orb-concepts.adoc#semantic-versioning[semantically versioned] tag, and the orb will appear on the link:https://circleci.com/developer/orbs[Orb Registry].
12+
After authoring your orb, you can publish it with a xref:use:orb-concepts.adoc#semantic-versioning[semantically versioned] tag, and the orb will appear on the link:https://circleci.com/developer/orbs[orb registry].
1213

1314
CAUTION: If your orb is private, it will not be searchable on the Orb Registry. However, the URL will be accessible to authenticated users of the orb.
1415

16+
.Flow diagram of the orb registry publishing process.
1517
image::guides:ROOT:orb-publishing-process.png[Orb Publishing Process]
1618

17-
If you are publishing your orb using the xref:orb-development-kit.adoc[orb development kit], rather than xref:orb-author-validate-publish.adoc[manually], semantic releases are straight-forward using the steps set out in this section. You can find a simplified version of the publishing process in the link:https://github.com/CircleCI-Public/Orb-Template/blob/main/README.md[README.md] file that the `circleci orb init` command generates at the start of the authoring process.
19+
If you are publishing your orb using the xref:orb-author.adoc#orb-development-kit[orb development kit], rather than xref:manual-orb-authoring-process.adoc[manually], semantic releases are straight-forward using the steps set out in this section. You can find a simplified version of the publishing process in the link:https://github.com/CircleCI-Public/Orb-Template/blob/main/README.md[README.md] file that the `circleci orb init` command generates at the start of the authoring process.
1820

1921
[#issue-a-new-release-with-the-orb-development-kit]
2022
== Issue a new release with the orb development kit

docs/guides/modules/ROOT/partials/faq/orb-author-faq-snip.adoc

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,60 @@
1+
[#which-orb-type-should-i-author]
2+
=== Which orb type should I author?
3+
4+
The type of orb you should author depends on what you need it for and how you want to share it.
5+
6+
* **Registry orbs**: Best for public sharing or when you need semantic versioning.
7+
* **URL orbs**: Best for sharing across your organization but not externally. Requires hosting and administrative allow-list management.
8+
* **Inline orbs**: Best for project-specific reusable configuration and testing before extracting config into a URL or registry orb. No publishing required, defined directly in your config file.
9+
10+
See xref:orbs:use:orb-intro.adoc#choosing-an-orb-type[Choosing an Orb Type] for detailed guidance.
11+
112
[#possible-to-delete-orb]
2-
=== Is it possible to delete an orb I've created?
13+
=== Is it possible to delete a registry orb that I have created?
314

4-
No. Orbs are public by default and immutable, once a version of an orb is published it can not be changed. This is done so users can reasonably expect a known version of an orb will behave the same on every run. Deleting an orb could potentially lead to a failing pipeline in any of its user's projects.
15+
No. Registry orbs are public by default and immutable, once a version of a registry orb is published it can not be changed. Registry orbs are immutable by design so users can reasonably expect a known version of an orb will behave the same on every run. Deleting an orb could potentially lead to a failing pipeline in any of its user's projects.
516

617
Orbs can however be "Unlisted" from the link:https://circleci.com/developer/orbs[Orb registry]. Unlisted orbs still exist and are discoverable via the API or CLI, but will not appear in the Orb Registry results. This may be desired if for instance, an orb is no longer maintained.
718

819
```shell
920
circleci orb unlist <namespace>/<orb> <true|false> [flags]
1021
```
1122

12-
WARNING: **Use caution when using private orbs.** Currently the `orb source` CircleCI CLI command does not work for _any_ private orbs, regardless if they are listed or unlisted. So unless the Private Orb name is documented before it is unlisted, you will not be able to find the orb through the Orb Registry or the CircleCI CLI. If you believe this happened to you, you can create a link:https://support.circleci.com/hc/en-us[support ticket].
23+
WARNING: **Use caution when using private orbs.** Currently the `orb source` CircleCI CLI command does not work for _any_ private orbs, regardless if they are listed or unlisted. Unless the private orb name is documented before it is unlisted, you will not be able to find the orb through the orb registry or the CircleCI CLI. If you believe this happened to you, you can create a link:https://support.circleci.com/hc/en-us[support ticket].
1324

1425
[#protect-users-api-tokens]
1526
=== How do I protect a user's API tokens and other sensitive information?
1627

1728
Use the `env_var_name` parameter type for the API key parameter. This parameter type will only accept valid POSIX environment variable name strings as input. In the parameter description, it is best practice to mention to the user to add this environment variable.
1829

19-
If you are interested in reading more on this topic, visit the xref:reference:ROOT:reusing-config.adoc#environment-variable-name[Environment variable name] and xref:orbs:author:orbs-best-practices.adoc[Best practices] pages.
30+
If you are interested in reading more on this topic, visit the xref:reference:ROOT:reusing-config.adoc#environment-variable-name[Environment Variable Name] and xref:orbs:author:orbs-best-practices.adoc[Best Practices] pages.
2031

2132
[#require-user-to-add-an-environment-variable]
2233
=== How can I require a user to add an environment variable?
2334

2435
Create a parameter for the environment variable name, even if it is a statically named environment variable the user _should not_ change. Then, assign it the correct default value. In the parameter description let the user know if this value should not be changed. Either way, consider instructing the user on how they can obtain their API key.
2536

26-
Consider validating required environment variables. See more in the xref:orbs:author:orbs-best-practices.adoc#commands[Orb author best practices] guide.
37+
Consider validating required environment variables. See more in the xref:orbs:author:orbs-best-practices.adoc#commands[Orb Author Best Practices] guide.
2738

28-
If you are interested in reading more on this topic, visit the xref:reference:ROOT:reusing-config.adoc#environment-variable-name[Environment variable name] and xref:orbs:author:orbs-best-practices.adoc[Best practices] pages.
39+
If you are interested in reading more on this topic, visit the xref:reference:ROOT:reusing-config.adoc#environment-variable-name[Environment Variable Name] and xref:orbs:author:orbs-best-practices.adoc[Best Practices] pages.
2940

3041
[#what-language-to-write-orb]
3142
=== What language do I use to write an orb?
3243

33-
Orbs are packages of xref:guides:getting-started:introduction-to-yaml-configurations.adoc[CircleCI YAML configuration].
44+
Orbs are packages of xref:guides:getting-started:introduction-to-yaml-configurations.adoc[CircleCI YAML Configuration].
3445

35-
CircleCI orbs package xref:reference:ROOT:reusing-config.adoc[CircleCI reusable config], such as xref:reference:ROOT:reusing-config.adoc#authoring-reusable-commands[commands], which can execute within a given xref:guides:execution-managed:executor-intro.adoc[executor] defined by either, the user if using a _command_ within a custom job, or by the orb author if using a xref:orbs:author:orb-concepts.adoc#jobs[reusable job]. The environment within which your logic is running may influence your language decisions.
46+
CircleCI orbs package xref:reference:ROOT:reusing-config.adoc[Reusable Configuration Elements] like xref:reference:ROOT:reusing-config.adoc#authoring-reusable-commands[Commands]. These commands run within an xref:guides:execution-managed:executor-intro.adoc[Executor]—either one the user specifies in a custom job, or one the orb author defines in a xref:orbs:use:orb-concepts.adoc#jobs[Reusable Job]. This execution environment may influence your language decisions.
3647

3748
[#what-programming-languages-command-logic]
3849
=== What programming languages can I write my Command logic in?
3950

40-
POSIX compliant bash is the most portable and universal language. This is the recommended option when you intend to share your orb. Orbs do, however, come with the flexibility and freedom to run other programming languages or tools.
51+
POSIX compliant Bash is the most portable and universal language. Bash is the recommended option when you intend to share your orb. Orbs do, however, come with the flexibility and freedom to run other programming languages or tools.
4152

4253
---
4354

4455
**Bash**
4556

46-
Bash is the preferred language as it is most commonly available among all available executors. Bash can (and should) be easily written directly using the native xref:reference:ROOT:configuration-reference.adoc#run[run] command. The default shell on MacOS and Linux will be bash.
57+
Bash is the preferred language as it is most commonly available among all available executors. Bash should be written directly using the native xref:reference:ROOT:configuration-reference.adoc#run[Run] command. The default shell on macOS and Linux will be Bash.
4758

4859
**Ruby**
4960

@@ -94,6 +105,13 @@ steps:
94105

95106
The answer might be both, but it will heavily depend on the task you want to accomplish.
96107

97-
An orb xref:orbs:author:orb-concepts.adoc#commands[command] can be utilized by the user, or even the orb developer, to perform some action within a job. The command itself has no knowledge of the job it is within as the user could utilize it however they wish. A command may be useful, for example, to automatically install a CLI application or go a step further and install and authenticate.
108+
An orb xref:orbs:use:orb-concepts.adoc#commands[Command] can be utilized by the user, or even the orb developer, to perform some action within a job. The command itself has no knowledge of the job it is within as the user could utilize it however they wish. A command may be useful, for example, to automatically install a CLI application or go a step further and install and authenticate.
109+
110+
A xref:orbs:use:orb-concepts.adoc#jobs[Job] defines a collection of steps and commands within a specific execution environment. A job is highly opinionated as it generally chooses the execution platform to run on and what steps to run. Jobs may offer a useful way to automate tasks such as deployments. A deployment job may look something like this:
111+
112+
* Select a certain execution platform that is known, such as _Python_.
113+
* Automatically checkout the users code.
114+
* Install a CLI.
115+
* Run a deployment command.
98116

99-
A xref:orbs:author:orb-concepts.adoc#jobs[job] defines a collection of steps and commands within a specific execution environment. A job is highly opinionated as it generally chooses the execution platform to run on and what steps to run. Jobs may offer a useful way to automate tasks such as deployments. A deployment job may select a certain execution platform that is known, such as _python_, and automatically checkout the users code, install a CLI, and run a deployment command, all with little to no additional configuration required from the user.
117+
All without requiring any additional configuration from the user.
Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,65 @@
1+
[#what-types-of-orbs-are-available]
2+
=== What types of orbs are available?
3+
4+
CircleCI supports three types of orbs:
5+
6+
include::guides:ROOT:partial$orbs/orb-types.adoc[]
7+
8+
For a detailed comparison, see the xref:orbs:use:orb-concepts.adoc#orb-types-comparison[Orb Types Comparison] section.
9+
10+
[#which-orb-type-should-i-use]
11+
=== Which orb type should I use?
12+
13+
Choose **registry orbs** when:
14+
15+
* You want to share with the community.
16+
* You need semantic versioning.
17+
* You want discoverability in the Orb Registry.
18+
19+
Choose **URL orbs** when:
20+
21+
* You need to share configuration across your organization.
22+
* You need direct control over updates.
23+
* Configuration contains proprietary logic.
24+
25+
Choose **inline orbs** when:
26+
27+
* Configuration is specific to one project.
28+
* You want zero publishing overhead.
29+
* You are learning about orbs and want to experiment.
30+
* You want to test out packaging some configuration before extracting it to a URL or registry orb.
31+
32+
See the xref:orbs:use:orb-intro.adoc#choosing-an-orb-type[Choosing an Orb Type] section for more guidance.
33+
134
[#can-orbs-be-private]
2-
=== Can orbs be made private?
35+
=== Can registry orbs be made private?
336

4-
xref:orbs:use:orb-intro.adoc#public-or-private[Private orbs] are available on any of our link:https://circleci.com/pricing[current plans].
37+
xref:orbs:use:orb-intro.adoc#public-or-private[Private Registry Orbs] are available on any of our link:https://circleci.com/pricing[Current Plans]. Inline orbs are inherently private to the project. URL orbs are controlled by your organization's allow-list and hosting access.
538

639
[#difference-between-commands-and-jobs]
740
=== What is the difference between commands and jobs?
841

9-
Both xref:reference:ROOT:reusing-config.adoc#the-commands-key[commands] and xref:reference:ROOT:reusing-config.adoc#authoring-parameterized-jobs[jobs] are elements that can be used within orbs.
42+
Both xref:reference:ROOT:reusing-config.adoc#the-commands-key[Commands] and xref:reference:ROOT:reusing-config.adoc#authoring-parameterized-jobs[Jobs] are elements that can be used within orbs.
1043

11-
_Commands_ contain one or many xref:reference:ROOT:configuration-reference.adoc#steps[steps], which contain the logic of the orb. Commands generally execute some shell code (bash).
44+
_Commands_ contain one or many xref:reference:ROOT:configuration-reference.adoc#steps[Steps], which contain the logic of the orb. Commands generally execute some shell code (Bash).
1245

13-
_Jobs_ are a definition of what steps/commands to run and the xref:reference:ROOT:reusing-config.adoc#the-executors-key[executor] to run them in. _Jobs_ invoke commands, and are orchestrated using xref:guides:orchestrate:workflows.adoc#workflows-configuration-examples[workflows].
46+
_Jobs_ are a definition of what steps/commands to run and the xref:reference:ROOT:reusing-config.adoc#the-executors-key[Executor] to run them in. _Jobs_ invoke commands, and are orchestrated using xref:guides:orchestrate:workflows.adoc#workflows-configuration-examples[Workflows].
1447

1548
[#orbs-on-private-installation-server]
16-
=== Can orbs be used on a private installation of CircleCI server?
49+
=== Can orbs be used on a private installation of CircleCI Server?
1750

18-
Orbs can be used with installations of CircleCI server. For information on importing and using orbs for server, see the xref:server-admin:operator:managing-orbs.adoc[CircleCI server managing orbs] page.
51+
Orbs can be used with installations of CircleCI Server. For information on importing and using orbs for server, see the xref:server-admin:operator:managing-orbs.adoc[CircleCI Server Managing Orbs] page.
1952

2053
[#report-an-issue-with-a-public-orb]
2154
=== How can I report a bug or issue with a public orb?
2255

2356
All public orbs are open source projects. Issues, bug reports, or even pull requests can be made against the orb's git repository. Public orb authors may opt to include a link to the git repo on the orb registry. If the git repo link is unavailable, contact support and we will attempt to contact the author. Alternatively, consider forking the orb and publishing your own version.
2457

2558
[#how-to-use-the-latest-version-of-an-orb]
26-
=== How do I use the latest version of an orb?
59+
=== How do I use the latest version of a registry orb?
60+
61+
Registry orbs use semantic versioning. If you set the _major_ version (example: `3`), you will receive all _minor_ and _patch_ updates. If you statically set the version (example: `3.0.0`), no updates will apply. Using a static version is the most deterministic and recommended method.
2762

28-
Orbs use semantic versioning, meaning if you set the _major_ version (example: `3`), you will receive all _minor_ and _patch_ updates, where if you statically set the version (example: `3.0.0`), no updates will apply, this is the most deterministic and recommended method.
63+
NOTE: Inline orbs do not have versions (updated by editing the config file), and URL orbs use Git-based versioning (branches, tags, or commits) rather than semantic versioning.
2964

3065
WARNING: NOT RECOMMENDED - It is possible to use `@volatile` to receive the last published version of an orb. This is not recommended as breaking changes are expected.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
[.table-scroll]
2+
--
3+
[cols=4*, options="header"]
4+
|===
5+
| Feature | Registry Orbs | URL Orbs | Inline Orbs
6+
7+
| *Location*
8+
| Published to Orb Registry, stored in GitHub repository
9+
| Hosted at accessible URL (GitHub, S3, etc.)
10+
| Defined in config file
11+
12+
| *Sharing scope*
13+
| Public or private across organizations
14+
| Organization-wide (with allow-list)
15+
| Project-specific only
16+
17+
| *Versioning*
18+
| Semantic versioning
19+
| Manual (Git branches, tags, commits)
20+
| None
21+
22+
| *VCS support*
23+
| Registry orbs are hosted in GitHub only but can be used by all CircleCI users if public
24+
| GitHub, Bitbucket
25+
| GitHub, GitLab, Bitbucket
26+
27+
| *Mutability*
28+
| Immutable
29+
| Mutable
30+
| Mutable (edit config directly)
31+
32+
| *Updates*
33+
| Publish new semantic version (immutable)
34+
| Update hosted file (5-minute cache)
35+
| Edit config file directly
36+
37+
| *Access control*
38+
| Namespace permissions
39+
| Organization allow-list
40+
| Repository access only
41+
42+
| *Best for*
43+
| Community sharing, public packages, certified orbs
44+
| Organization-wide shared config, overriding config, proprietary logic
45+
| Project-specific reusable config, learning, testing
46+
47+
| *Choose this type when:*
48+
a| * You want to share your orb with the community.
49+
* You want to use semantic versioning for your orb.
50+
* You want your orb to be discoverable in the CircleCI Orb Registry.
51+
* You want to leverage the orb development kit and automated CI/CD pipeline.
52+
a| * You want to use centralized configuration for your organization.
53+
* You need to share configuration within your organization.
54+
* You need direct control over updates and distribution.
55+
* You need to use proprietary or confidential configurations.
56+
a| * Configuration is specific to a single project.
57+
* You want zero publishing or hosting overhead.
58+
* You're learning about orbs and want to experiment.
59+
* You need immediate changes without any publishing delay.
60+
61+
|===
62+
--

0 commit comments

Comments
 (0)