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.
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
The irony is, this answer is the first result appearing in Google other than the general documentation on Pipeline artifacts. Thanks for the link!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
nope, there's neither a convinient workaround nor any feedback from Atlassian on this matter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.