Skip to content

Latest commit

 

History

History
62 lines (41 loc) · 4.47 KB

archive-files.md

File metadata and controls

62 lines (41 loc) · 4.47 KB
title description ms.topic ms.assetid ms.custom ms.date monikerRange
Archive Files task
Use an archive file to then create a source folder in Azure Pipelines and Team Foundation Server (TFS)
reference
9D2AE683-E116-4CEA-B673-CD7BEFB8F415
seodec18
02/10/2020
<= azure-devops

Archive Files task

[!INCLUDE version-lt-eq-azure-devops]

Use this task to create an archive file from a source folder. A range of standard archive formats are supported including .zip, .jar, .war, .ear, .tar, .7z, and more.

Demands

None

::: moniker range="> tfs-2018"

YAML snippet

[!INCLUDE temp]

::: moniker-end

Arguments

Argument Description
rootFolderOrFile
Root folder or file to archive
(Required) Enter the root folder or file path to add to the archive. If a folder, everything under the folder will be added to the resulting archive
Default value: $(Build.BinariesDirectory)
includeRootFolder
Prepend root folder name to archive paths
(Required) If selected, the root folder name will be prefixed to file paths within the archive. Otherwise, all file paths will start one level lower.
For example, suppose the selected root folder is: /home/user/output/classes/, and contains: com/acme/Main.class.
  • If selected, the resulting archive would contain: classes/com/acme/Main.class
  • Otherwise, the resulting archive would contain: com/acme/Main.class..
archiveType
Archive type
(Required) Specify the compression scheme used. To create foo.jar, for example, choose zip for the compression, and specify foo.jar as the archive file to create. For all tar files (including compressed ones), choose tar.
  • zip - default, zip format, choose this for all zip compatible types, (.zip, .jar, .war, .ear)
  • 7z - 7-Zip format, (.7z)
  • tar - tar format, choose this for compressed tars, (.tar.gz, .tar.bz2, .tar.xz)
  • wim - wim format, (.wim)
sevenZipCompression
7z compression
Optionally choose a compression level, or choose None to create an uncompressed 7z file
Default value: Normal
Options:
  • Ultra
  • Maximum
  • Normal
  • Fast
  • Fastest
  • None
tarCompression
Tar compression
Optionally choose a compression scheme, or choose None to create an uncompressed tar file.
  • gz - default, gzip compression (.tar.gz, .tar.tgz, .taz)
  • bz2 - bzip2 compression (.tar.bz2, .tz2, .tbz2)
  • xz - xz compression (.tar.xz, .txz)
  • None - no compression, choose this to create a uncompressed tar file (.tar)

Default value: gz
archiveFile
Archive file to create
(Required) Specify the name of the archive file to create.
For example, to create foo.tgz, select the tar archive type and gz for tar compression.
Default value: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
replaceExistingArchive
Replace existing archive
(Required) If an existing archive exists, specify whether to overwrite it. Otherwise, files will be added to it as long as it is not a compressed tar.
If adding to an existing archive, these types are supported:
  • zip
  • 7z
  • tar - uncompressed only
  • wim
verbose
Forces verbose output
(Optional) If set to true, forces tools to use verbose output. Overrides 'quiet'.
Default value: false
quiet
Forces quiet output
(Optional) If set to true, forces tools to use quiet output. Can be overridden by 'verbose'.
Default value: false

Open source

This task is open source on GitHub. Feedback and contributions are welcome.

FAQ

[!INCLUDE temp]

[!INCLUDE temp]

::: moniker range="< azure-devops"

[!INCLUDE temp]

::: moniker-end