Back to Jenkins

Help Artifacts

core/src/main/resources/hudson/tasks/ArtifactArchiver/help-artifacts.html

1.385723 B
Original Source

You can use wildcards like 'module/dist/**/*.zip'. See the includes attribute of Ant fileset for the exact format -- except that "," ( comma ) is the only supported separator. The base directory is the workspace . You can only archive files that are located in your workspace.

Here are some examples of usage for pipeline:

  • How to archive multiple artifacts from a specific folder:
archiveArtifacts artifacts: 'target/*.jar'
  • How to archive multiple artifacts with different patterns:
archiveArtifacts artifacts: 'target/*.jar, target/*.war'
  • How to archive multiple nested artifacts:
archiveArtifacts artifacts: '**/*.jar'