Skip to content

Commit 9099daf

Browse files
Improve private registry docs (#15216)
* Lead with basic git publish command - Publish from git not a local path. - Use the git protocol as, if you're using a sub-folder, it's not actually a valid web address. - Mirror syntax as presented in the CLI docs. * Expand versioning - Add detail on including "v" in tags but not when publishing. - Add full example workflow for publishing a version via git and Pulumi. - Detail the default version lookup process. * Remove local path examples Use git source for all examples as local sources don't work. * Remove protocol * Refine versioning - Move default behaviour to nearer the beginning. - Make the wording more concise. * Update content/docs/idp/get-started/private-registry.md Co-authored-by: Florian Stadler <[email protected]> --------- Co-authored-by: Florian Stadler <[email protected]>
1 parent f53b9e2 commit 9099daf

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

content/docs/idp/get-started/private-registry.md

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,38 +22,46 @@ Developers leverage templates and components in their preferred workflows, wheth
2222

2323
If you're new to Pulumi components, the [Build a Component](/docs/iac/using-pulumi/extending-pulumi/build-a-component/) guide is a great resource for getting started. Once you've authored your component, push it to a GitHub or GitLab repository that Pulumi can access. Private repositories are supported, but the repository must be open to inbound requests.
2424

25-
#### Component Versioning
26-
27-
Pulumi checks for a git version tag when the `publish` command is executed and stores it as the component version. The tag must adhere to [to the semantic versioning standard](https://semver.org/).
25+
The `publish` CLI command is used to publish components to the private registry.
2826

29-
#### Component README
27+
```bash
28+
pulumi package publish <provider|schema>
29+
```
3030

31-
A README is required when publishing a component. Pulumi renders markdown README files in the private registry. They're a great way to provide context for a component. By default, the Pulumi CLI looks for a README in the component's root directory. The `--readme` flag can be used to specify a custom source.
31+
For example, if your github organization is ACME and you are publishing the `k8s-cluster` component, you'd run:
3232

3333
```bash
34-
pulumi package publish /path/to/your/component --readme README_LOCATION
34+
pulumi package publish github.com/acme/k8s-cluster
3535
```
3636

37-
#### Specifying an Organization
37+
#### Component Versioning
3838

39-
If you're part of multiple organizations and do not have a [default organization](/docs/iac/cli/commands/pulumi_org_set-default/) set, you must specify the org by using the `--publisher` flag.
39+
Pulumi uses git tags for versioning components. By default, the latest version tag will be used. The tag must adhere to [the semantic versioning standard](https://semver.org/) plus a "v" prefix (e.g. `v1.2.3`).
40+
41+
To publish a specific version, append an `@` followed by the semver version (excluding the "v") after the git source.
42+
43+
To create a version, push it to your "origin" git remote and publish to Pulumi's private registry, you'd run:
4044

4145
```bash
42-
pulumi package publish /path/to/your/component --publisher ORG_NAME
46+
git tag v1.2.3
47+
git push origin v1.2.3
48+
pulumi package publish github.com/acme/[email protected]
4349
```
4450

45-
#### CLI Publishing
51+
#### Component README
4652

47-
The `publish` CLI command is used to publish components to the private registry.
53+
A README is required when publishing a component. Pulumi renders markdown README files in the private registry. They're a great way to provide context for a component. By default, the Pulumi CLI looks for a README in the component's root directory. The `--readme` flag can be used to specify a custom source.
4854

4955
```bash
50-
pulumi package publish COMPONENT_LOCATION
56+
pulumi package publish github.com/acme/k8s-cluster --readme README_LOCATION
5157
```
5258

53-
For example, if your github organization is ACME and you are publishing the `k8s-cluster` component, you'd run:
59+
#### Specifying an Organization
60+
61+
If you're part of multiple organizations and do not have a [default organization](/docs/iac/cli/commands/pulumi_org_set-default/) set, you must specify the org by using the `--publisher` flag.
5462

5563
```bash
56-
pulumi package publish https://github.com/acme/k8s-cluster
64+
pulumi package publish github.com/acme/k8s-cluster --publisher ORG_NAME
5765
```
5866

5967
#### Authenticating with Private Repositories

0 commit comments

Comments
 (0)