Action
ACS::CICD::DockerBuild
Description
Builds a Docker image and uploads it to an Alibaba Cloud image repository. This operation can be performed only on Linux instances.
Syntax
Action: ACS::CICD::DockerBuild
Properties:
regionId: String
codeSource: String
codeSourceUrl: String
branch: String
buildType: String
instanceId: String
zoneId: String
ecsInstanceType: String
imageId: String
allocatePublicIP: Boolean
buildScript: String
dockerFilePath: String
contextPath: String
imageVersion: String
acrType: String
username: String
password: String
acrId: String
namespace: String
repoName: String
isInternal: Boolean
Attributes
Attribute | Description | Type | Required | Default value | Limit |
regionId | Region | String | No | {{ ACS::RegionId }} | |
codeSource | The code source. | String | Yes | ||
codeSourceUrl | The URL of the code source. | String | Yes | ||
branch | The branch ID. | String | No | "" | |
buildType | The build type. | String | No | ExistingEcs | |
instanceId | The ID of the Elastic Compute Service (ECS) instance. | String | No | "" | |
zoneId | The zone ID. | String | No | "" | |
ecsInstanceType | The type of the ECS instance. | String | No | ecs.g6.large | |
imageId | The image ID. | String | No | centos_7 | |
allocatePublicIP | Specifies whether to assign a public IP address. | Boolean | No | True | |
buildScript | The build command. | String | No | | The command can be up to 16,384 bytes in length. |
dockerFilePath | The path of the Dockerfile. | String | No | Dockerfile | |
contextPath | The context path. | String | No | "" | |
imageVersion | The version of the image. | String | No | v-{{ACS::CurrentDate}}-{{ACS::ExecutionId}} | |
acrType | The type of the container image. | String | Yes | ||
username | The username of the account. | String | No | "" | |
password | The password. | String | No | "" | |
acrId | The ID of the Container Registry instance. | String | No | "" | |
namespace | The namespace. | String | No | "" | |
repoName | The name of the repository. | String | Yes | ||
isInternal | Specifies whether to upload the image by using an internal URL. | Boolean | No | True |
Response parameters
Parameter | Description | Type |
imageVersion | String | |
username | String | |
password | String | |
acrId | String | |
namespace | String | |
repoName | String |
References
For more information, see ACS::CICD::DockerBuild.yml at GitHub.