|
| 1 | +--- |
| 2 | +subcategory: "CodeArts Build" |
| 3 | +layout: "huaweicloud" |
| 4 | +page_title: "HuaweiCloud: huaweicloud_codearts_build_task" |
| 5 | +description: |- |
| 6 | + Manages a CodeArts Build task resource within HuaweiCloud. |
| 7 | +--- |
| 8 | + |
| 9 | +# huaweicloud_codearts_build_task |
| 10 | + |
| 11 | +Manages a CodeArts Build task resource within HuaweiCloud. |
| 12 | + |
| 13 | +## Example Usage |
| 14 | + |
| 15 | +```hcl |
| 16 | +variable "codearts_project_id" {} |
| 17 | +variable "name" {} |
| 18 | +variable "url" {} |
| 19 | +variable "web_url" {} |
| 20 | +variable "scm_type" {} |
| 21 | +variable "repo_id" {} |
| 22 | +
|
| 23 | +resource "huaweicloud_codearts_build_task" "test" { |
| 24 | + project_id = var.codearts_project_id |
| 25 | + name = var.name |
| 26 | + arch = "x86-64" |
| 27 | +
|
| 28 | + scms { |
| 29 | + url = var.url |
| 30 | + scm_type = var.scm_type |
| 31 | + web_url = var.web_url |
| 32 | + repo_id = var.repo_id |
| 33 | + branch = "master" |
| 34 | + } |
| 35 | +} |
| 36 | +``` |
| 37 | + |
| 38 | +## Argument Reference |
| 39 | + |
| 40 | +The following arguments are supported: |
| 41 | + |
| 42 | +* `region` - (Optional, String, ForceNew) Specifies the region in which to create the resource. |
| 43 | + If omitted, the provider-level region will be used. |
| 44 | + Changing this creates a new resource. |
| 45 | + |
| 46 | +* `project_id` - (Required, String, NonUpdatable) Specifies the CodeArts project ID. |
| 47 | + Changing this creates a new resource. |
| 48 | + |
| 49 | +* `arch` - (Required, String) Specifies the architecture of the build machine. |
| 50 | + |
| 51 | +* `name` - (Required, String) Specifies the name of the build task. |
| 52 | + |
| 53 | +* `scms` - (Optional, List) Specifies the build execution SCM. |
| 54 | + The [scms](#block--scms) structure is documented below. |
| 55 | + |
| 56 | +* `auto_update_sub_module` - (Optional, String) Specifies whether to automatically update submodules. |
| 57 | + |
| 58 | +* `build_config_type` - (Optional, String) Specifies the build task configuration type. |
| 59 | + |
| 60 | +* `build_if_code_updated` - (Optional, Bool) Specifies whether to enable the code commit trigger build switch. |
| 61 | + Defaults to **false**. |
| 62 | + |
| 63 | +* `flavor` - (Optional, String) Specifies the specification of the execution machine. |
| 64 | + |
| 65 | +* `group_id` - (Optional, String) Specifies the task group ID. |
| 66 | + |
| 67 | +* `host_type` - (Optional, String) Specifies the host type. |
| 68 | + |
| 69 | +* `parameters` - (Optional, List) Specifies the build execution parameter list. |
| 70 | + The [parameters](#block--parameters) structure is documented below. |
| 71 | + |
| 72 | +* `steps` - (Optional, List) Specifies the build execution steps. |
| 73 | + The [steps](#block--steps) structure is documented below. |
| 74 | + |
| 75 | +* `triggers` - (Optional, List) Specifies the collection of timed task triggers. |
| 76 | + The [triggers](#block--triggers) structure is documented below. |
| 77 | + |
| 78 | +<a name="block--parameters"></a> |
| 79 | +The `parameters` block supports: |
| 80 | + |
| 81 | +* `name` - (Optional, String) Specifies the parameter definition name. |
| 82 | + Defaults to **hudson.model.StringParameterDefinition**. |
| 83 | + |
| 84 | +* `params` - (Optional, List) Specifies the build execution sub-parameters. |
| 85 | + The [params](#block--parameters--params) structure is documented below. |
| 86 | + |
| 87 | +<a name="block--parameters--params"></a> |
| 88 | +The `params` block supports: |
| 89 | + |
| 90 | +* `limits` - (Optional, List) Specifies the enumeration parameter restrictions. |
| 91 | + The [limits](#block--parameters--params--limits) structure is documented below. |
| 92 | + |
| 93 | +* `name` - (Optional, String) Specifies the parameter field name. |
| 94 | + |
| 95 | +* `value` - (Optional, String) Specifies the parameter field value. |
| 96 | + |
| 97 | +<a name="block--parameters--params--limits"></a> |
| 98 | +The `limits` block supports: |
| 99 | + |
| 100 | +* `disable` - (Optional, String) Specifies whether it is effective. Defaults to **0**, which is effective. |
| 101 | + |
| 102 | +* `display_name` - (Optional, String) Specifies the displayed name of the parameter. |
| 103 | + |
| 104 | +* `name` - (Optional, String) Specifies the parameter name. |
| 105 | + |
| 106 | +<a name="block--scms"></a> |
| 107 | +The `scms` block supports: |
| 108 | + |
| 109 | +* `repo_id` - (Required, String) Specifies the repository ID. |
| 110 | + |
| 111 | +* `scm_type` - (Required, String) Specifies the source code management type. |
| 112 | + |
| 113 | +* `url` - (Required, String) Specifies the repository URL. |
| 114 | + |
| 115 | +* `web_url` - (Required, String) Specifies the web URL of the repository. |
| 116 | + |
| 117 | +* `branch` - (Optional, String) Specifies the branch name. |
| 118 | + |
| 119 | +* `build_type` - (Optional, String) Specifies the build type. |
| 120 | + |
| 121 | +* `depth` - (Optional, String) Specifies the depth. |
| 122 | + |
| 123 | +* `enable_git_lfs` - (Optional, Bool) Specifies whether to enable Git LFS. Defaults to **false**. |
| 124 | + |
| 125 | +* `endpoint_id` - (Optional, String) Specifies the endpoint ID. |
| 126 | + |
| 127 | +* `group_name` - (Optional, String) Specifies the group name. |
| 128 | + |
| 129 | +* `is_auto_build` - (Optional, Bool) Specifies whether to automatically build. Defaults to **false**. |
| 130 | + |
| 131 | +* `repo_name` - (Optional, String) Specifies the repository name. |
| 132 | + |
| 133 | +* `source` - (Optional, String) Specifies the source type. |
| 134 | + |
| 135 | +<a name="block--steps"></a> |
| 136 | +The `steps` block supports: |
| 137 | + |
| 138 | +* `module_id` - (Required, String) Specifies the build step module ID. |
| 139 | + |
| 140 | +* `name` - (Required, String) Specifies the build step name. |
| 141 | + |
| 142 | +* `enable` - (Optional, Bool) Specifies whether to enable the step. Defaults to **false**. |
| 143 | + |
| 144 | +* `properties` - (Optional, Map) Specifies the build step properties. |
| 145 | + |
| 146 | +* `version` - (Optional, String) Specifies the build step version. |
| 147 | + |
| 148 | +<a name="block--triggers"></a> |
| 149 | +The `triggers` block supports: |
| 150 | + |
| 151 | +* `name` - (Required, String) Specifies the trigger type. |
| 152 | + |
| 153 | +* `parameters` - (Required, List) Specifies the custom parameters. |
| 154 | + The [parameters](#block--triggers--parameters) structure is documented below. |
| 155 | + |
| 156 | +<a name="block--triggers--parameters"></a> |
| 157 | +The `parameters` block supports: |
| 158 | + |
| 159 | +* `name` - (Required, String) Specifies the parameter name. |
| 160 | + |
| 161 | +* `value` - (Required, String) Specifies the parameter value. |
| 162 | + |
| 163 | +## Attribute Reference |
| 164 | + |
| 165 | +In addition to all arguments above, the following attributes are exported: |
| 166 | + |
| 167 | +* `id` - The resource ID. |
| 168 | + |
| 169 | +* `steps` - Specifies the build execution steps. |
| 170 | + The [steps](#attrblock--steps) structure is documented below. |
| 171 | + |
| 172 | +<a name="attrblock--steps"></a> |
| 173 | +The `steps` block supports: |
| 174 | + |
| 175 | +* `properties_all` - Specifies the build step properties. |
| 176 | + |
| 177 | +## Import |
| 178 | + |
| 179 | +The build task can be imported using `id`, e.g. |
| 180 | + |
| 181 | +```bash |
| 182 | +$ terraform import huaweicloud_codearts_build_task.test <id> |
| 183 | +``` |
0 commit comments