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 bashset -apath="$(dirname "$0")"source "$path/data"set +a
CC @Igor Stoyanov (b/c I saw you answered some related questions)
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:
https://bitbucket.org/atlassian/vault-secrets/src/8b0fa1e1d0f4e35bfc5e3665b99b1df061456553/pipe/pipe.py#lines-122
It looks like you're new here. Sign in or register to get started.