| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -305,6 +305,10 @@ Mark a job artifact as kept when expiration is set:: | |||
| 305 | 305 | ||
| 306 | 306 | build_or_job.keep_artifacts() | |
| 307 | 307 | ||
| 308 | + Delete the artifacts of a job:: | ||
| 309 | + | ||
| 310 | + build_or_job.delete_artifacts() | ||
| 311 | + | ||
| 308 | 312 | Get a job trace:: | |
| 309 | 313 | ||
| 310 | 314 | build_or_job.trace() | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1342,6 +1342,21 @@ def keep_artifacts(self, **kwargs): | |||
| 1342 | 1342 | path = '%s/%s/artifacts/keep' % (self.manager.path, self.get_id()) | |
| 1343 | 1343 | self.manager.gitlab.http_post(path) | |
| 1344 | 1344 | ||
| 1345 | + @cli.register_custom_action('ProjectJob') | ||
| 1346 | + @exc.on_http_error(exc.GitlabCreateError) | ||
| 1347 | + def delete_artifacts(self, **kwargs): | ||
| 1348 | + """Delete artifacts of a job? | ||
| 1349 | + | ||
| 1350 | + Args: | ||
| 1351 | + **kwargs: Extra options to send to the server (e.g. sudo) | ||
| 1352 | + | ||
| 1353 | + Raises: | ||
| 1354 | + GitlabAuthenticationError: If authentication is not correct | ||
| 1355 | + GitlabDeleteError: If the request could not be performed | ||
| 1356 | + """ | ||
| 1357 | + path = '%s/%s/artifacts' % (self.manager.path, self.get_id()) | ||
| 1358 | + self.manager.gitlab.http_delete(path) | ||
| 1359 | + | ||
| 1345 | 1360 | @cli.register_custom_action('ProjectJob') | |
| 1346 | 1361 | @exc.on_http_error(exc.GitlabGetError) | |
| 1347 | 1362 | def artifacts(self, streamed=False, action=None, chunk_size=1024, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments