"Reference not in tree" when running pipeline on commit manually

I have successfully run a pipeline on a branch automatically using the 'branches' section of pipelines.yml.

I have now edited the yml file so that I can run the same steps manually using the 'custom' section.

When I create a new commit and try to run the pipeline manually, the pipeline runs but has different results (it fails, when the code passes when run automatically).

The codebase for the commits are identical, as are the steps for the custom and branching sections of the pipelines.yml 

I have checked the output of the pipeline for both cases carefully and notice this difference in the way the repo is cloned.

The automatically run pipeline that works successfully:

git clone --branch="BRANCHNAME" --depth 50 https://x-token-auth:$AUTH_TOKEN@bitbucket.org/REPO

With the result:

HEAD is now at COMMIT_HASH_GOES_HERE Testing successful

 

The manual run pipeline that does not:

git clone --depth 50 https://x-token-auth:$AUTH_TOKEN@bitbucket.org/REPO

With the result:

fatal: reference is not a tree: COMMIT_HASH_GOES_HERE

 

As far as I can tell, this results in the commit I actually want to manually test not being checked out - and so the codebase is different to what i'm actually trying to run through the pipeline and so it ends up failing.

Since I do not have control over this cloning command, i'm not really sure how to resolve this.

Has anyone else observed this behaviour or know of a workaround?

1 answer

1 accepted

2 votes

Hi @Jon Scott,

We noticed this problem and have just put out a fix for it. If this continues to be a problem please raise a support ticket at https://support.atlassian.com so we can continue investigating this.

Cheers,

Tom

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

23,406 views 26 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you