Help Center/ CodeArts Build/ User Guide/ Configuring a Build Task/ Configuring Build Actions/ Downloading a Software Package from Release Repos
Updated on 2024-11-19 GMT+08:00

Downloading a Software Package from Release Repos

CodeArts Build allows you to download packages or files from the release repo to the build task root directory for use in subsequent build actions.

Obtaining the Package Download Address

  1. In the navigation pane, choose Artifact > Release Repos.
  2. Click the name of the package to be downloaded. On the package details page, the Repository Path is the download URL. Click next to the address to copy it.

    Figure 1 Software package address

Build on GUI

Add Download Package from Release Repos when configuring build actions. Set the parameters according to Table 1.

Table 1 Parameters for downloading a package from the release repo

Parameter

Description

Action Name

Assign a custom name to the build action. The name can contain:

  • Letters, digits, hyphens (-), underscores (_), commas (,), semicolons (;), colons (:), periods (.), slashes (/), and parentheses (()).
  • 1 to 128 characters.

Tool Version

Select a tool version.

Package Address

Paste the address copied in 2 to the text box.

Continue After Failure

Specify whether to proceed after the current action fails by setting the parameter to either Yes or No.

Build with Code

Modify the code in the BUILD block in Creating a YAML File for Your Code-based Build by referring to the following sample code:

1
2
3
4
5
6
7
version: 2.0 # The value must be 2.0.
steps:
  BUILD:
    - download_artifact:
          inputs:
            url: xxxxxxxxxxxxx
            ignore_fail: true
Table 2 Parameters in the sample code

Parameter

Type

Description

url

String

Paste the address copied in 2.

ignore_fail

string

Whether to proceed after the current action fails.
  • true: Yes
  • Empty: No