Uploading Files to OBS
For details about the restrictions on using OBS, see .
Graphical Build
Add Upload Files to OBS, when configuring build actions.
The parameters are described in the following table.
| Parameter | Description |
|---|---|
| Action Name | Name of a build action. It can be customized. |
| Authorized Account |
|
| Build Directory | Directory for storing build results. If no file name is specified for OBS storage, use wildcard characters to upload multiple files. Example: **/target/*.?ar uploads all JAR and WAR packages built with Maven. |
| Bucket Name | Name of the target OBS bucket. Cross-region upload is not supported. |
| OBS Directory | Directory for storing build results on OBS (for example, application/version/). You can leave this parameter blank or enter ./ to store build results to the OBS root directory. |
| File Name | New name (excluding the directory) for storing the built file on OBS. Leave it blank to upload multiple files with their old names, or specify a name to upload a single file, for example, application.jar. |
| Headers | Add one or more custom response headers during file upload. The headers will be included in the response to download objects or query the object metadata. For example, you can set the key to x-frame-options and value to false to prevent web pages stored in OBS from being embedded into by third-party web pages. |
Code-based Build
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | version: 2.0 # The value must be 2.0. steps: BUILD: - upload_obs: inputs: artifact_path: "**/target/*.?ar" bucket_name: codecitest-obs obs_directory: test # artifact_dest_name: "" # upload_directory: true # headers: # x-frame-options: true # test: test # commit: ${commitId} |
| Parameter | Type | Description | Mandatory | Default Value |
|---|---|---|---|---|
| artifact_path | String | Path of the product to be uploaded. Regular expressions are supported. | No | bin/* |
| bucket_name | String | Name of the OBS bucket where the file is to be uploaded to. | Yes | None |
| obs_directory | String | Path of the OBS folder where the file is to be uploaded to. By default, the file is uploaded to the root directory of the bucket. | No | ./ |
| artifact_dest_name | string | Name of the file uploaded to OBS. Set this parameter when the product needs to be renamed. | No | None |
| upload_directory | bool | Whether to upload a folder. If this parameter is set to false, all matched products are uploaded to obs_directory in tile mode. | No | false |
| headers | Map | Uploaded header information. | No | None |
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot