Score:1

azure pipeline job to check for file changes in a specific directory with a git commit

mr flag

I am working to create a job in a stage that determines if a particular git commit has any file changes in a specific directory. If so I want to run another job.

I tried below in a bash task:

  • task: Bash@3 inputs: targetType: 'inline' awsCredentials: ${{ parameters.awsCredentials }} workingDirectory: envs/${{ parameters.environment }} script: | commitid=git rev-parse --short=7 HEAD changes=git diff-tree --no-commit-id --name-only -r $commitid| grep $(basename $PWD)

Above changes is working on my workstation, but it is not returning any when i echo $commitid in the pipeline task.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.