Updated on 2026-01-08 GMT+08:00

Using SWR Public Images

Prerequisites

You have created an image and pushed it to SWR.

Setting Image Type to Public

Images in SWR cannot be pulled during building. Therefore, you need to set the image type to Public.
  1. Log in to .
  2. In the navigation pane, choose My Images, click the image name to go to the image details page, and click Edit in the upper right corner.
  3. In the dialog box, set the type to be public.

  4. To obtain the complete image path, click to copy the image download command. The part following docker pull is the image path.

Graphical Build

  1. Add Use SWR Public Image, when configuring build actions.
  2. Paste the image address obtained in 4 to the Image Address text box.

    When pasting the download command to the image address text box, delete docker pull.

  3. Enter the build commands in the command window.

    For example, if the image is used for a Maven build, configure commands for building with Maven. For an npm build, configure commands for building with npm. This rule also applies to other builds.

Code-based Build

1
2
3
4
5
6
7
version: 2.0 # The value must be 2.0.
steps:
  BUILD:
    - swr:
       image: cloudbuild@ddd
       inputs:
          command: echo 'hello'

Parameter

Type

Description

Mandatory

Default Value

image

String

Image address.

The image address can be in any of the following formats:
  • cloudbuild@maven3.5.3-jdk8-open, which starts with cloudbuild, uses @ as the separator, and is followed by the default image provided by CodeArts Build.
  • Complete SWR image path, for example, swr.example.example.com/codeci_test/demo:141d26c455abd6d7xxxxxxxxxxxxxxxxxxxx.

Yes

None

command

String

Commands to be run.

For example, if the image is used for a Maven build, configure commands for building with Maven. For an npm build, configure commands for building with npm. This rule also applies to other builds.

Yes

None