Artifact Staging

ReferenceAutomation

You can use artifact staging to retrieve artifacts that will be deployed in an application run before the deployment starts. This ensures that all the artifacts are downloaded and available on the target, either the artifact cache (the default) or a directory specified in the component definition. Staging artifacts minimizes the time it takes to retrieve artifacts and reduces downtime during the deployment.

Artifact staging is enabled by default in the UI. However, when you use the API commands in the command line interface or in a script, make sure to enable artifact staging when modeling the application.

See Deploying and Troubleshooting Applications for how to use artifact staging when deploying an application.

At the Application Level

When artifact staging is enabled in a deployment model, CloudBees CD/RO dynamically creates and executes a job step to stage the artifacts. If the application process being deployed includes process branching, the staging job step retrieves all artifacts in the application process in parallel to reduce the staging time. In addition, the deployment processes, including the staging job step, are skipped on disabled resources.

You can deploy applications with the artifact staging enabled and following options:

  • With smart deploy enabled, the staging job step retrieves artifacts only for those objects that have not been deployed to specific resources.

  • With full deploy enabled, the staging job step retrieves artifacts only for all artifacts in the application.

  • With partial deploy enabled, the staging job step retrieves artifacts only for artifacts in the application.

  • With a selected snapshot, the staging job step retrieves artifacts only for artifacts in the selected snapshot.

For a component process, the process step to retrieve an artifact is optional because the component process is referenced in the application process. If you author a component process, the process type should be "Deploy" to ensure that the artifacts defining the component can be staged. If an artifact staging for a component fails, it will then be retried when the process execution continues and when the actual component process execution happens.

You can view the progress of the staging job step in the Application View Run page.

  • When the staging job step is successful, the artifact is retrieved and staged before the deployment run starts.

  • When the staging job step fails, the application process automatically retrieves the artifact during the component retrieval step in the application run.

The environment inventory is updated as the job step runs. In addition to viewing the status of the resources in the environment, you can also view the state of other objects including the application processes, components and component processes, and artifacts being deployed.

At the Pipeline and Release Levels

Artifact staging is supported in pipelines and Releases.

  • When you define the tasks in a pipeline stage, you can select application processes with artifact staging. The staging job step is executed as part of the application in the pipeline run as described in the previous section. See Pipeline Tasks for more information about stage tasks in a pipeline.

  • The Release definition includes the pipeline and applications that you want to run in the Release. See Release Definition for more information about the release definition.