简体   繁体   中英

Problem with sha pointer ["error": "--from is not a valid sha pointer: \"origin/master\"",]

I want to deploy only changed files (according to documentation: https://github.com/scolladon/sfdx-git-delta )

I add to bitbucket-pipelines.yml:

- mkdir changed-sources
- git status
- git diff YMLEdit origin/master
- sfdx sgd:source:delta --to "HEAD" -f origin/master --output changed-sources/ --generate-delta

without git diff i receive an error:

sfdx sgd:source:delta --to "HEAD" -f origin/master --output changed-sources/ --generate-delta
{
"error": "--from is not a valid sha pointer: \"origin/master\"",
"output": "changed-sources/",
"success": false,
"warnings": []

}

When I add git diff i receive this:

+ git diff YMLEdit origin/master
fatal: ambiguous argument 'origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

Any ideas?

I tried using diffrent docker image I tried using git fetch

Bitbucket is probably running your pipeline in a shallow, single-branch clone, so that there is no origin/master. Check any appropriate bitbucket documentation to find out how to direct the pipelne to use a full clone

Solution, that worked for me: according to torek suggestion and documntation: https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/ I add to bitbucket-pipelines.yml:

clone:

depth: full

enter image description here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM