How to use artifactes from another step?

When reading the documentation I thought artifacts from previous steps would be available for the following ones.

    docker: true

            - step:
                image: golang:1.9
                name: Build and test
                    - PACKAGE_PATH="${GOPATH}/src/${BITBUCKET_REPO_SLUG}"
                    - mkdir -pv "${PACKAGE_PATH}"
                    - tar -cO --exclude-vcs --exclude=bitbucket-pipelines.yml . | tar -xv -C "${PACKAGE_PATH}"
                    - cd "${PACKAGE_PATH}"

                    - go get -v
                    - go build -v
                    - go test -v ./...
                    - MYAPPLICATION

            - step:
                image: debian/jessie:latest
                name: Deploy
                    - ls -la

In this configuration I expected to have the MYAPPLICATION file from "Build and test" step available to use on the "Deploy" step.

However, the "ls -l" command show only my source code and not the MYAPPLICATION file.

1 answer

1 accepted

My mistake. When I first changed the work dir on the first step I created the artifacts outside BITBUCKET_CLONE_DIR. It was just add a copy line to the end of the step:


Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

706 views 0 4
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot