This action uploads a configuration file to a given location within an application data model.
It is meant to be used in an iterative nature for all config files to upload to the application data model
during the pipeline run.
Supports:
- Upload to:
- A component, collection, or deployable.
- The variable (vars) folder of a component, collection, or deployable.
- Regex pattern for config file input.
- Ability to be called multiple times in the same pipeline.
- Input:
Here is an example of the snDevOpsConfigUpload action. For the sake of illustration, we’ll
assign the response to a variable, changeSetId, which could be
echoed out to our console log for debugging scenarios.
Example - Multiple uploads (component)
You can call the upload action more than once to upload configuration data in different
file formats from different locations, while still keeping the uploads part of one
changeset.
- In the first upload, name the action so the changesetNumber output variable can be
reused in subsequent uploads.
- In subsequent uploads, reference the changesetNumber output variable from the first
upload as an input variable.
- In the final call, in addition to referencing the changesetNumber output variable
from
the first upload as an input variable, set autoCommit and autoValidate to
true.
Example - Multiple uploads (collection and vars)
You can call the upload action more than once to upload configuration data in different
file formats from different locations, while still keeping the uploads part of one
changeset.
- In the first upload, create a variable (for example, $changeset), and assign the
return
value of the step to it so it can be reused in subsequent uploads.
- In subsequent uploads, use the variable as an input.
Note: To upload to a variable folder,
uploadTarget must be set to
deployable, and the correct values must be set for deployableName and
changesetNumber.