It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Clearing of Artifacts Drop location...

Norbert Apr 12, 2012


I' have two stages in my Plan

  1. Stage: get code from repository (inkluding cleanup)
  2. Stage: build everything

I move the data from stage one to stage two via "Artifact" (see screenshot)

The problem is that the Artifact is only getting copied...
so files in the target folder are not deleted if I delete them in the repository..

I need to have an task running BEFORE copying the artifacts to cleanup the folder.

AFAIK this is not possible... How can I solve this problem?

2 answers

1 accepted

0 votes
Answer accepted
Norbert Apr 12, 2012

Like, I said a little bit lacking ;-)

but thanks for the help I think I will go with the merging the stages solution

0 votes
Marcin Gardias Atlassian Team Apr 12, 2012

I don't quite understand what your problem is. Artifacts from each build are stored in different folder, (fresh dir for each build) so any leftover files shouldn't be an issue.

You can clean artifacts of old builds by configuring Build Result Expiry

Norbert Apr 12, 2012


As far as i understand, the Artifact ist copied to the stage when there is a dependency

in the repository are 2 files, file_a, file_b, both are retreived in stage 1 and packed as artifact
the both files are copied to stage 2 (assume build root folder)
-> everything ok so far

then i delete file_b from the repository
stage1 retrieves the file and deletes file_b in the build folder..
then the file_a is copied to stage2..
but file_b isn't deleted in the root folder of stage2!

This is not a problem with old artifacts but with using artifacts..
The only solution would be to bring everything back to one stage so I don't need the whole "artifact" stuff..

Marcin Gardias Atlassian Team Apr 12, 2012

I see.

There's an option to clean working directory after build is finished.

It's in Job Configuration, Misc tab, checkbox: "<label>Clean working directory after each build</label>". This wipes everything from build working dir after the build is finished, so the next one starts at clean state.

Just make sure that any binaries you want to keep are defined as artifacts too.

Norbert Apr 12, 2012

As I feared this raises the next problem...
I have a third stage, deliver the results..
this stage failes because stage 2 clean everything after its finished...

So here again there is the only solution to do the merge the two stages or to do the cleaning manually...

I'm more and more convinced that the your concept of stages/jobs/task is a little bit lacking :-(
espacially if developing an fat client and not a WebApp or something similar..

Marcin Gardias Atlassian Team Apr 12, 2012

Like, I said, define the results you want to keep as an artifact.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Statuspage

⭐️Would you recommend Statuspage? Leave a (honest!) review. ⭐️

Hi Community friends, We're working on sourcing more reviews on Capterra – a popular software review site –  to help teams like yours make more informed decisions when choosing an inc...

77 views 3 5
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you