跳到主要内容

Transfer to sandbox with YAML

List of YAML parameters and examples for the "Transfer to sandbox" action.

YAML parameters for Transfer to sandbox

名称类型描述
action
必填
StringThe ID of the action.
type
必填
StringThe type of the action. Must be set to DEPLOY_TO_SANDBOX.
input_typeStringDefines whether the files are uploaded from the repository or from the pipeline filesystem. Can be one of SCM_REPOSITORY or BUILD_ARTIFACTS.
local_pathStringThe source path of the files to be uploaded.
remote_pathStringThe absolute or relative path on the sandbox where the files are uploaded.
deployment_excludesString[]The paths and/or files that excluded from the upload.
deployment_includesString[]The exceptions from the ignore patterns set in deployment_excludes.
use_temporary_filesBooleanThe files will be uploaded with a "tmp" suffix that will be removed once the upload has finished.
deletion_disabledBooleanWhen set to false, deletes files on the server that were deleted between revisions.
userStringThe name of the local (to the sandbox server) user who uploads the files.
sandbox_references 必填StringDefines the sandbox selection method. Available values: BY_TAGS, BY_NAME, BY_PROJECT, BY_DAYS, BY_ID, BY_ACTION.
sandbox_idStringID of the sandbox to which the files are uploaded. Required when sandbox_references is set to BY_ID.
referenced_action_idIntID of the action that creates the target sandbox.Required when sandbox_references is set to BY_ACTION.
referenced_sanbox_nameStringName of the target sandbox. Required when sandbox_references is set to BY_NAME.
tagsString[]List of tags applied to the target sandbox. Required when sandbox_references is set to BY_TAGS.
sandbox_project_idIntID of the project with the target sandbox. Required when sandbox_references is set to BY_PROJECT.
daysIntNumber of days passed since the creation of the target sandbox. One of 1, 2, 3, 7, 14, 30. Required when sandbox_references is set to BY_DAYS.

YAML example for Transfer to sandbox

actions:
- action: "Upload files to sandbox"
type: "DEPLOY_TO_SANDBOX"
input_type: "SCM_REPOSITORY"
local_path: "/assets/"
remote_path: "www/"
user: "root"
sandbox_references:
- "BY_ID"
sandbox_id: "Cgn3QO34klUri"
deletion_disabled: true
use_temporary_files: true
deployment_excludes:
- "/tmp/"
deployment_includes:
- "/tmp/file.txt"