I'm trying use the variable BITBUCKET_BRANCH to define a filename, but the slash is causing us issues. Here's a sample YAML
pipelines:
branches:
feature/*:
- step:
name: Build javascript
image: node:12.16.3
caches:
- node
script:
- apt-get update && apt-get install --yes zip
- npm install
- npx ng build
- zip -r ${BITBUCKET_BRANCH}.zip dist
- pipe: atlassian/bitbucket-upload-file:0.1.4
variables:
BITBUCKET_USERNAME: $NAME
BITBUCKET_APP_PASSWORD: $PASSWORD
FILENAME: "${BITBUCKET_BRANCH}.zip"
How can I modify the BITBUCKET_BRANCH variable to remove non-alphanumeric characters? For example changing from: feature/bitbucket-ci --> featurebitbucketci.