Private packages
You can publish versioned packages privately within your organization to standardize code across repositories and workflows.
Invoking a private package is the same as a public package. Simply provide its name and version to call:
tasks:
- key: test
call: your-organization/test 1.0.0
with:
some-param: true
Declaring a private package
We maintain a package template repository that you can use as a starting point for your private packages.
A private package is a defined in a directory that contains at least a rwx-package.yml file and a README.md file. The rwx-package.yml file starts with a package field that contains the following:
| field name | description | required |
|---|---|---|
name | The package's name, in the form your-organization-slug/package-name. | ✅ |
version | The package's semantic version, such as 1.0.0. | ✅ |
description | A short description of what the package does. | ✅ |
source_code_url | A link to the package's source code. | |
issue_tracker_url | A link to where users can report issues with the package. | |
visibility | Set to private to make this a private package. | |
parameters | The inputs callers provide with with. See the template for the format. | |
outputs | The values exposed to the caller. Set values-from to a list of task keys whose output values the package passes through. |
Uploading a private package
Run rwx package build from the directory containing rwx-package.yml to upload the package to your organization. The CLI will print a package digest that you can use to test the package before you publish it. For example, if the package digest is a1b2c3, you can do the following in an RWX workflow:
tasks:
- key: test-package
call: a1b2c3
Publishing a private package
To publish a private package so that any workflow running in your organization can call it by its name and version, run rwx package publish <digest> from the directory containing rwx-package.yml. (See the above section on uploading a private package to get the digest). You can also upload and publish a package in a single command with rwx package build --publish.
If the package you are publishing has ever been published before, you will need to increment the version field before you can successfully publish it. Packages also enforce semantic versioning, so if you remove a parameter then you will be required to do a major version bump before you can publish the package.