Extension steps and resources are defined within a namespace, to ensure that all steps and resources in a set have unique names. Namespaces are specified through the repository path of the step or resource model definition.
Extension step definitions must be stored in a subdirectory path of the form:
steps/<namespace>/<stepTypeName>
.Extension resource definitions must be stored in a subdirectory path of the form:
resources/<namespace>/<resourceTypeName>
.
Note
If no namespace is specified, Pipelines defaults to the jfrog
namespace for standard Pipelines resources, or standard generic or native steps.
Example
The sample extensions in our tutorial are in a tutorial
namespace, as defined in the repository's directory structure:
|
|
|
|
|
|
|
You can define as many steps or resources under a namespace directory as you need. For example:
|
|
|
|
| |||
| |||
|
|
| |
| |||
|
When used in a Pipelines DSL file, the extension must be referenced with its namespace to be recognized. For example:
pipelines.yml
resources: - name: MyResource type: mycompanyname/ResourceTypeX # <-- extension resource configuration: ... pipelines: - name: MyPipeline configuration: environmentVariables: readOnly: my_env_var: "hello" steps: - name: MyStep_1 type: mycompanyname/StepTypeA # <-- extension step configuration: ... - name: MyStep_2 type: mycompanyname/StepTypeB # <-- extension step configuration: ...