I need to use the BITBUCKET_CLONE_DIR variable in my pipeline. I've tried to echo it to ensure it gets the right value, but it's coming out as empty. Keep in my mind that I'm using a self hosted windows runner for this piepline.
I tried these variation of echo with no results. Do I have the syntax wrong?
image: atlassian/default-image:3
pipelines:
branches:
Pipelines-test:
- step:
name: 'Build MVC Secure'
runs-on:
- 'self.hosted'
- 'windows'
script:
- echo $BITBUCKET_CLONE_DIR
- echo ${BITBUCKET_CLONE_DIR}
- echo '${BITBUCKET_CLONE_DIR}'
- echo "${BITBUCKET_CLONE_DIR}"
- echo $BITBUCKET_CLONE_DIR
- echo '$BITBUCKET_CLONE_DIR'
- echo "$BITBUCKET_CLONE_DIR"
I figured this out. since windows runners use powershell, I needed to write it as $env:BITBUCKET_CLONE_DIR
Thanks for this. Strange the official website doesn't show this... https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/
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.