Building with HarmonyOS
Build, test, and deploy a project with Hvigor.
Constraints
You are advised to use executors with 4 vCPUs and 16 GB memory (at least 8 GB) or higher for Hvigor builds.
Build on GUI
Add Build with HarmonyOS, when configuring build actions. Set the parameters according to Table 1.
Parameter |
Description |
---|---|
Action Name |
Assign a custom name to the build action. The name can contain:
|
Tool Version |
The default version is HarmonyOS-5.0.0-API12. Currently, HarmonyOS-5.0.0-API12 and HarmonyOS-API9 are supported. |
Commands |
Configure commands, or use the default ones. If you have special build requirements, enter your custom build script in 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 8 9 10 11 12 13 |
version: 2.0 # The value must be 2.0. steps: BUILD: - harmonyos: name: "HarmonyOS Build" inputs: command: | npm config set strict-ssl false npm config set registry=https://repo.huaweicloud.com/repository/npm/ npm config set @ohos:registry=https://repo.harmonyos.com/npm/ chmod +x hvigorw ./hvigorw clean assembleApp --no-daemon ignore_fail: true |
Parameter |
Type |
Description |
---|---|---|
command |
String |
Configure the HarmonyOS commands. |
ignore_fail |
String |
Whether to proceed after the current action fails.
|
Feedback
Was this page helpful?
Provide feedbackThank 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