Using YAML to Configure Code Download
The following configurations are for your reference.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
version: 2.0 # The value must be 2.0.
steps:
PRE_BUILD:
- checkout:
name: checkout
inputs:
scm: codehub # Code source: Repo and open source
url: xxxxxxxxx # SSH address for the URL to pull code
branch: ${codeBranch} # Mandatory at any time and can be parameterized.
commit: ${commitId}
lfs: true
submodule: true
depth: 100
tag: ${tag}
path: test
|
The parameters are described in the following table.
Parameter |
Type |
Description |
Mandatory |
Default Value |
---|---|---|---|---|
scm |
string |
Code source. Currently, only CodeArts Repo is supported. If this parameter is not configured in the YAML file, the code repository information configured in build task is used. |
No |
codehub |
url |
string |
SSH address for pulling code |
Yes |
None |
branch |
string |
Pulled code branch, which can be parameterized. |
Yes |
None |
commit |
string |
Commit ID obtained during builds can be parameterized. |
No |
None |
tag |
string |
Tag pulled during tag builds: It can be parameterized. If a commit ID and a tag exist at the same time, the build based on a commit ID is executed first. |
No |
None |
depth |
int |
Shallow clone depth. When a commit ID is specified for builds, depth must be greater than or equal to the depth of the commit ID. |
No |
1 |
submodule |
bool |
Whether to pull the submodule. The options are true (pull) and false (not pull). |
No |
false |
lfs |
bool |
Whether to enable Git LFS: If this parameter is set to true, Git LFS pull is executed. |
No |
false |
path |
string |
Subpath for cloning: The code is downloaded to the subpath. |
No |
None |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.