Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support transient/temporary artifacts with a retention period of 0 #45

Open
emilianbold opened this issue Dec 23, 2019 · 5 comments
Open
Labels
enhancement New feature or request retention Artifact retention

Comments

@emilianbold
Copy link

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.

@eine
Copy link

eine commented Dec 24, 2019

Ref #5.

@chrispat chrispat added the enhancement New feature or request label Jan 28, 2020
@konradpabjan konradpabjan added the retention Artifact retention label Mar 19, 2020
@konradpabjan
Copy link
Collaborator

konradpabjan commented Mar 23, 2020

Related (I think this could be more useful if the sole purpose is to transmit data between jobs): actions/download-artifact#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: #34

@ahdbilal
Copy link

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!

@deefdragon
Copy link

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.

@neilhwatson
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request retention Artifact retention
Projects
None yet
Development

No branches or pull requests

7 participants