When reading the documentation I thought artifacts from previous steps would be available for the following ones.
options:
docker: true
pipelines:
branches:
master:
- step:
image: golang:1.9
name: Build and test
script:
- 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 ./...
artifacts:
- MYAPPLICATION
- step:
image: debian/jessie:latest
name: Deploy
script:
- 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.
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:
- cp -pfv MYAPPLICATION ${BITBUCKET_CLONE_DIR}
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.