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:
- step: ©CodeToSharedStorage
- 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.
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.
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:
I hope that helps!
Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across their Jira Cloud instance. ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events