Skip to content

HasChanged is set to false even when it has detected changes #51

Description

@jennybeate

changes/files/folder/file3.bicep

Changed files:
- changes/files/folder/file3.bicep
Filtering files using glob rules
HASCHANGED: No change detected since last succeeded build, setting "HasChanged" to "false"

Pipeline:

jobs:

  • job: check
    displayName: Check changed files
    pool:
    vmImage: ubuntu-latest
    steps:

    • checkout: self
      fetchDepth: 2 # Set to 0 when merging with non Squash Commits
      displayName: Checkout Repo

    • task: ChangedFiles@1
      name: Changes
      inputs:
      rules: /**/*.bicep
      variable: HasChanged
      verbose: true

  • job: jobWithCondition
    displayName: Build only when code changes
    dependsOn:

    • check
      condition: eq(dependencies.check.outputs['Changes.HasChanged'], 'true')
      steps:
      • script: echo "run with condition"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions