I wanted to copy my code to a shared location for use in my pipe steps, but it doesn't appear that $BITBUCKET_PIPE_SHARED_STORAGE_DIR is recognized. My copy step is defined as follows:
definitions:
steps:
- step: ©CodeToSharedStorage
script:
- cp -r . $BITBUCKET_PIPE_SHARED_STORAGE_DIR
But seeing this in the log:
cp -r . $BITBUCKET_PIPE_SHARED_STORAGE_DIR
cp: missing destination file operand after ‘.’
Try 'cp --help' for more information.
Hi @Mike Burton
I want to help you with this one, but I'll need some more clues to understand where the variables BITBUCKET_PIPE_SHARED_STORAGE_DIR come from.
Did you declare that variable in repository variables?
If I do it here, I'm able to use it as expected.
That variable should be predefined as per
https://confluence.atlassian.com/bitbucket/advanced-techniques-for-writing-pipes-969511009.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for sharing. I'll be in touch with the development team to check why this is happening. As soon I have something to share I'll be posting it here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Mike Burton,
I was able to get the information we needed from a Pipelines developer. According to him, we don’t actually expose that variable in the step of a pipeline. It’s only present in the pipe itself. Which means that someone writing a custom pipe can use it, but not outside of it.
If you are trying to use this information to pass data to another step you should use an artifact instead.
Please let us know your use case if the information provided is not enough to allow you moving forward on this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I've been trying to figure out whether it's possible to use artifacts with custom Pipes, but couldn't find anything in the documentation. Say I want to use a custom Pipe to generate some file that I can later use in a normal Pipelines step. How would I do that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Amit Edelshtein
I'm sorry for the delay (my vacation time).
I asked one of our developers about this and he shared an example where a file is created in a pipe and used in a different step later.
This is the one:
https://bitbucket.org/bitbucketpipelines/example-aws-lambda-deploy/src/master/bitbucket-pipelines.yml
I hope that helps!
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.
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.