Support transient/temporary artifacts with a retention period of 0
Hello,
Some of my artifacts are transient. They transmit data between jobs but I don't want to keep them.
Ideally, I would like to use actions/upload-artifact like this:
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: myartifact
path: mypath
temporary: true
The temporary (or transient) flag would mark the artifact as transient and automatically delete it when the workflow is done.
Ref #5.
Related (I think this could be more useful if the sole purpose is to transmit data between jobs): https://github.com/actions/download-artifact/issues/20
If retention policies do get added, I'm thinking we'll be able to support this scenario. An expiration time of 0 or something could be used to denote that that artifact should be immediately deleted after the run is complete: https://github.com/actions/upload-artifact/issues/34
You can now set artifact and log retention duration to 1 day and we will clean and delete artifacts right after they expire. You can learn more about this feature here. Feedback is welcome!
You can now set artifact and log retention duration to 1 day and we will clean and delete artifacts right after they expire. You can learn more about this feature here. Feedback is welcome!
I still feel this is inadequate. I am currently working on developing my actions, and have, even using the 1 day expiration, nearly hit my limit on the plan. While this is due to some large artifacts, and needing to run the job many times in a short period, it is still a bother to have to go through and delete all of these artifacts by hand to keep working on developing the action.
The ability to set an artifact to temporary, or to have retention-days:0 be "for this job only" would be very welcome.
Related (I think this could be more useful if the sole purpose is to transmit data between jobs): actions/download-artifact#20
The downside here is that if you have two jobs that run in parallel that use the artifact, which do you have delete it?
If nothing else, a built in job to delete the artifact manually ( a first party one like actions/delete-artifact) would be very welcome.
If I understand the OP, something like Jenkins' 'stash' would be ideal. It's an artifact that only persists for the workflow run. https://www.jenkins.io/doc/pipeline/steps/workflow-basic-steps/#stash-stash-some-files-to-be-used-later-in-the-build