Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]: How to get "git diff" information from one pipeline to another #19134

Closed
1 of 4 tasks
ser789654 opened this issue Oct 18, 2023 · 1 comment
Closed
1 of 4 tasks

Comments

@ser789654
Copy link

ser789654 commented Oct 18, 2023

Task name

No response

Task version

No response

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

ubuntu-latest

Question

I have PR pipeline in which I build Dockerfiles, but only those which are changed. I get paths of changed files using git diff command. After PR is completed the source branch is merged but not deleted. I have release pipeline on main branch which is triggered after merge to main. This pipeline will perform same build only on changed files and then push those images to container registry.

But git diff in this pipeline wont work since agent is checked out on main branch. How can I get the same information in this pipeline? I looked up git log command in which I could do git diff against commitId but that wont work If someone else will finish their PR before me. The PR branch still exist, is it possible to somehow get name of this branch in the release pipeline?

Copy link

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant