Thanks for the #feature-request @Roboteam! It makes perfect sense, but don’t forget to vote for this!
@Roboteam in my projects add https://gist.github.com/ramonornela/2e683e4fde6df66dca88972412dc52ef, should i export to step
Todo
Implements in file secrets Generic Storage
Hi @ramonornela!
This thread is a feature request towards Bitrise to offer the option to allow workflow specific secrets.Can you elaborate on your message please?
Maybe a step fix with rules: read Generic File or External File and Set ENV via envman
dev:
after_run:
- _set-env-vars-file
envs:
- ENV_FILE: $BITRISEIO_ENV_FILE_DEV_URL
_set-env-vars-file:
steps:
- script:
inputs:
- title: "Set env vars file"
- content: |
#!/bin/bash
if [ -n "$ENV_FILE" ]; then
# specify local download path
file_local_path=$BITRISE_SOURCE_DIR/file_env
# download the file
wget -O "$file_local_path" "$ENV_FILE"
filename="$file_local_path"
# set vars define by env file in generic file storage
while IFS= read -r var
do
if [[ $var =~ "=" ]]; then
key=${var%%=*}
value=${var#*=}
valueDefault=${!key}
if [ -n "$value" ] && [ -z "$valueDefault" ]; then
echo "Set var: $key"
envman add --key $key --value $value
fi
fi
done < "$filename"
fi
More a propose add scope similar https://docs.gitlab.com/ee/ci/variables/#limiting-environment-scopes-of-environment-variables-premium
Any updates on this?
Hello,
Unfortunately, we really can’t comment of that status of a feature requests. We are constantly re-evaluating and re-prioritizing and we would hate to have our users excited for a new change only to have to disappoint them if something comes up.
In the meantime, you might want to check out a community step available that might be just what you are looking for: Fetch secrets from AWS Secrets Manager