Configure a pipeline to build H5 applications.
Procedure
Open the pipeline editing page. For more information, see Open the pipeline editing page.
Click the Build stage to open the Stage Configuration panel on the right.
In the Stage Configuration panel, configure the parameters.
Option
Description
Stage name
Set the name for this stage.
Timeout (minutes)
Set the maximum running time for this stage. The default value is 360 minutes. If the stage runs longer than the specified time, the task fails.
Runtime environment required
Specify whether this stage requires a runtime environment. Build tasks usually need to run in a specific environment, such as one that includes Node.js.
Build application stage: Required
Custom stage (serial): Required/Not required
Custom stage (parallel): Required
Image
If Runtime Environment Required is set to Required, the default Image is android-latest. If it is set to Not Required, the Image is Agentless.
Execution timing
Set the condition for running this stage.
Run only when the previous stage succeeds
Run only when the previous stage fails
Run unconditionally: Runs this stage after the previous stage is complete, regardless of whether it succeeded or failed.
Task steps
Click Add Step to set the tasks for this stage.
In the list of steps that appears, select the step to add. The step is added to the Tasks list for this stage. Configure the step as needed. You can also select an existing step and modify its parameters as needed.
For more information about the configuration, see Use plug-ins to build a custom pipeline.
NoteThe Public switch for the Upload Build Artifacts step is turned off by default. If you turn it on, you can use a browser to scan the artifact's QR code to install the application.
Hover the mouse pointer over an added task and drag it to reorder the tasks.
Click OK to save the stage configuration.
Default build steps
Clone code
Retrieves the code required to build the application from a specified branch of a code repository.
Option
Description
Code URL
The URL of the code repository. The code repository is preconfigured. For more information, see Add code access permissions.
Code branch
Specifies the code branch.
ImportantCase-sensitive.
Code access permissions
The access permissions for the code repository. The access permissions are preconfigured. For more information, see Add code access permissions.
Install modules
Installs node_modules.
Option
Description
Script content
Enter a custom shell script. The default commands are already included.
Script execution directory
Enter the local directory where the custom shell script runs. The default is the code root directory.
Run build
Compiles the H5 application.
Option
Description
Script content
Enter a custom shell script. The default commands are already included.
Script execution directory
Enter the local directory where the custom shell script runs. The default is the code root directory.
Upload build artifacts
Collects build artifacts with specified file extensions from a specified directory.
Option
Description
Path
The relative path from the code root directory to the directory where build artifacts are stored.
NoteSet this option as needed.
Traverse subdirectories
Specifies whether to traverse all subdirectories of the specified directory when uploading build artifacts.
File extension
The file extension of the build artifacts to upload. To specify multiple extensions, separate them with commas (,).
NoteBy default, files with the .js, .html, and .css extensions are collected.
Public
Specifies whether the build artifacts are publicly accessible after they are uploaded. This option is turned off by default.
NoteIf you are building a debug package, turn this switch off.