Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Ignore Pipeline Artifacts in further steps

Edited

Our Issue

We use Pipelines for our whole CI/CD process. The Pipeline uses artifacts for the build-and-test part. It builds some containers and pushes them to our gcloud repository.

Done that, it just needs to apply the deployment-file on the K8S cluster, which takes around 15 seconds.

But because the “Build Setup”-Step consumes all artifacts before (which aren’t needed in this step), it needs between 75 and 90 seconds. Usually, this step takes less than 15 seconds. This means, one additional Build Minute to pay per Deployment (sure, it’s affordable, but still unnecessary) and also this minute for the developer to wait before he can start with the manual test.

Also, one more issue for me, regarding the artifacts is, that they can’t be overwritten. In this pipeline, I use the vendor/**-folder for the test. After that, I remove test-dependencies from the vendor-folder. Now I again define vendor/** as artifact, as I need only production dependencies.

But the pipeline now extracts both vendor/**artifacts, instead only the later one, and my dev-dependencies still bother my production container. This could also be solved if I could delete/ignore artifacts within the pipeline.

Is there any way to make this work?

The solution on our wishlist

Allow to name artifacts.

artifacts:
- vendor: "vendor/**"

Or even nicer, also allow to define import/export artifacts:

artifacts:
import:
- vendor: "vendor/**"
export:
- vendor: "vendor/**"
- env: ".env"

 

On Build Setup:

Look for Artifacts with the same name. If the Pipeline has stored artifacts with the same name, import them in. If the Artifact is not existing, it’s only meant to export at the teardown.

On Build Teardown:

Export all named Artifacts. Overwrite any existing artifact with the same name.

Compatibility with existing pipeline-files:

Unnamed Artifacts are still imported in every further step (as it is). This also allows easy usage of Artifacts that are needed in all further steps, and doesn't break any pipeline.

3 answers

0 votes
Ray Gomez I'm New Here Aug 18, 2021

Pardon the necrobump, but this comes up in top google results annoyingly. You can see how to disable artifacts in pipeline steps in this blog post: https://bitbucket.org/blog/skipping-artifact-downloads

Second post I see about this without answer...

Hi @Dominik Kohler ,
could you find any workaround or a solution for this?

Many thanks in advanced!

nope, there's neither a convinient workaround nor any feedback from Atlassian on this matter

Like Xavi Ros likes this

Thanks @Dominik Kohler . This is really awful... :(

0 votes

Hello Dominik,

We currently don't have support for either of the artifact features you'd like.

We have an open feature request to prevent artifacts from downloading in certain steps: https://bitbucket.org/site/master/issues/16728/ability-to-prevent-a-step-from-downloading 

I've added a (private) comment with a link to this Community Question. If you'd like to provide any additional information, can you do so on the feature request?

I'm not aware of any open feature requests for deleting artifacts within a pipeline. You can open one here: https://bitbucket.org/site/master/issues/new

Thanks,

Phil

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,785 views 10 16
Read article

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