Closed Timple closed 2 years ago
Can you give an example when pipelines
has .git
in BITBUCKET_REPO_SLUG
? Or please clarify what the report is about. @Timple
image: ubuntu
pipelines:
default:
- step:
script:
- echo "$BITBUCKET_REPO_SLUG"
Typically a repository url looks like this: https://bitbucket.org/company/somereponame
bitbucket pipelines: BITBUCKET_REPO_SLUG=somereponame
pipelines.phar: BITBUCKET_REPO_SLUG=somereponame.git
@Timple Could it be that you project is inside a folder named somereponame.git
? Pipelines should take the basename of the project folder (which is also the project name for it which then goes into the slug).
Aha, that might be it! They are not in a folder with the .git
extension but they are symlink. And the symlinks (with extension) point to a folder with extension.
So this might be something we need to fix on our side.
Ah, that explains it. If you want to have the same behaviour as on Bitbucket, you can add an entry to the .env.dist
file specifying it. pipelines
then takes that automatically into the runner-environment of the pipeline:
.env.dist
BITBUCKET_REPO_SLUG=somereponame
See as well Pipelines Environment Variable Usage.
Awesome, thanks for the pointer
In the bitbucket pipelines the BITBUCKET_REPO_SLUG does not hold the .git extension.
It's an inconsistency, but it's not documented anywhere by atlassian that is should not or cannot hold the .git extension.