pipeline {agent anystages {stage('Upload to generic repository') {steps {// Use the fallocate command to create a file of 10 MB in size. (The default working directory in Continuous Integration is /root/workspace.)sh 'fallocate -l 10m my-generic-file'codingArtifactsGeneric(files: 'my-generic-file',repoName: 'myrepo', // Fill in your repository parameters here, for example, ${env.GENERIC_REPO_NAME})}}}}
pipeline {agent anystages {stage('Upload to generic repository') {steps {// Use the fallocate command to create a file of 10 MB in size. (The default working directory in Continuous Integration is /root/workspace.)sh 'fallocate -l 10m my-generic-file'codingArtifactsGeneric(files: 'my-generic-file',repoName: 'myrepo',)}}}}
Parameter | Required? | Parameter type | Graphical parameter type | Default value | Description |
files | Yes | - | List of files to be uploaded, wildcards are supported build/libs/**/xx | - | - |
repoName | Yes (Not required if repoURL is set separately) | string | Repository name | - | This parameter determines the repository to which an artifact is uploaded. Simply enter the repoName to upload the artifact to the repository under the current project by default. If the repository is not in the current project, use the repoURL |
version | No | string | string | latest | Version of the artifact, default: "latest" |
zip | No | - | string | string | Packages the artifacts in the selected directory into a zip file, and then uploads the individual artifacts. For example, demo.zip. (Do not set the parameter. Multiple files will be uploaded as individual artifacts.) |
credentialsId | No | string | Credentials (username+password) | env.CODING_ARTIFACTS_CREDENTIALS_ID | Credentials used to upload repository (Only the username + password project token is supported). By default, the environment variable CODING_ARTIFACTS_CREDENTIALS_ID will be used. |
repoURL | No | string | string | https:// < env.CCI_CURRENT_TEAM>-generic.< env.CCI_CURRENT_DOMAIN>/< env.PROJECT_NAME>/< params.repoName> | By default, the CI built-in environment variables CCI_CURRENT_TEAM , CCI_CURRENT_DOMAIN , and PROJECT_NAME and repoName set in the parameters will be used. For example, https://myteam-generic.coding.net/myproject/myrepo/ . You can manually set the parameter to upload the artifact to a repository outside of the current project. After you set the parameter, the repoName will be invalid. |
withBuildProps | No | boolean | boolean | true | Set to true . By default, the current CI build environment will be associated with the built-in artifact fields. |
workspace | No | string | No | - | - |
Was this page helpful?