Skip to content

Commit 9546000

Browse files
committed
add clarification on how to use compression
1 parent ee04acb commit 9546000

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,29 +134,30 @@ The build UUID to download the artifact from unless specificed otherwise in the
134134

135135
### `compressed` (optional, string)
136136

137-
Limitations:
137+
⚠️ Limitations:
138138
* filename needs to end with `.zip` or `.tgz` and that will determine the compression executable to use
139-
* path globs (`*`) are interpreted by agent's shell and (un)compressing program (meaning that probably `**` will not work)
139+
* path globs (`*`) are interpreted by agent's shell and (un)compressing program, meaning that `*` and `**` will not work.
140+
141+
When uploading, the file or directory specified in the `upload` option will be compressed in a single file with this name and uploaded as a single artifact. The following example will get the directory matching `log/my-folder`, zip them up and upload a single artifact file named `logs.zip`:
140142

141-
When uploading, globs specified in the `upload` option will be compressed in a single file with this name and uploaded as a single artifact. The following example will get all files matching `log/*.log`, zip them up and upload a single artifact file named `logs.zip`:
142143

143144
```yml
144145
steps:
145146
- command: ...
146147
plugins:
147148
- artifacts#v1.9.0:
148-
upload: "log/*.log"
149+
upload: "log/my-folder"
149150
compressed: logs.zip
150151
```
151152

152-
When downloading, this option states the actual name of the artifact to be downloaded and globs in the `download` option will be extracted off of it. The following example will download the `logs.tgz` artifact and extract all files in it matching `log/*.log`:
153+
When downloading, this option states the actual name of the artifact to be downloaded in the `download` option will be extracted off of it. The following example will download the `logs.tgz` artifact and extract all files in it matching `log/file.log`:
153154

154155
```yml
155156
steps:
156157
- command: ...
157158
plugins:
158159
- artifacts#v1.9.0:
159-
download: "log/*.log"
160+
download: "log/file.log"
160161
compressed: logs.tgz
161162
```
162163

0 commit comments

Comments
 (0)