I'm trying to create a custom Pipe that creates a bash script in the
# Ideally this would be `cd BITBUCKET_SHARED_STORAGE_DIR/...` but that env var isn't available, so we need to hardcode the path:
$ cd /opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/my-org/custom-pipe-name
$ ls
> script.sh data
$ . ./script.sh
> bash: /opt/atlassian/pipelines/agent/tmp/data: No such file or directory
The script file contains the following code:
#!/usr/bin/env bash
set -a
path="$(dirname "$0")"
source "$path/data"
set +a
I'm thinking that this limitation may be why the vault-secrets pipe uses `eval`, which is generally bad practice, instead of loading it's data file directly:
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.