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

Passing Artifacts to Custom Pipeline

Dave Gilmore November 17, 2020

Hi Folks,

In our main code repo, we have a build step that zips up the build artefacts and sends them to S3 for storage. Up to now we had a build box which then downloaded these and built our containers.

I am trying to move away from that step, and not utilise the ` - pipe: atlassian/trigger-pipeline:4.2.1` to call a custom pipeline in my build repo.

I would like, if possible to pass the build artifacts from the previous step:

artifacts:
   - master/build/HG_BUNDLE.zip

To my custom pipeline, is this possible?

The custom Pipeline is a Docker build:

- step: &build-wildfly
name: Build Wildfly Container
caches:


- docker

services:

- docker

script:

- echo "Building Wildfly $HYP_VERSION Container"

I know artifacts are passed between steps, but I am not certain if they would automatically passed to the trigger-pipeline

Thanks,

Dave.

2 answers

0 votes
Jason Harrison November 26, 2020

Also the artifacts have to total less than 1GB

0 votes
ktomk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 18, 2020

Hello @Dave Gilmore , welcome to the Atlassian Community!

Yes, like you wrote artifacts can be passed along the steps of a pipeline. But they are not passed from one pipeline to another. The support document is Use artifacts in steps.

Most easy it is that you have one pipeline with multiple steps so you have the artifacts directly at hand. For this YAML anchors could help you to keep duplication low, just seeing the `Build Wildfly Container` has already an anchor.

Manual or Deployment steps could also be helpful so that you must not always run further steps if you don't like. Manual steps have artifacts support like any other step.

Another option is that the artifacts of the last pipeline step are stored for 14 days. So the other pipeline could download these. I do not know however how well this is supported by the REST API but this could be something worth to look into. Also there is a feature in Bitbucket called Downloads, see Deploy build artifacts to Bitbucket Downloads for more info.

I do see this might not be the answer you've been hoping for, so I hope you can find some new options in my answer that helps you get going.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events