mibexsoftware / bamboo-plan-dsl-plugin

Configuration as code with a Groovy-based DSL or YAML for Atlassian Bamboo.
https://marketplace.atlassian.com/plugins/ch.mibex.bamboo.plandsl/
Other
40 stars 16 forks source link

Changes in job's requirements section doesn't result in correct state #57

Closed mayani closed 7 years ago

mayani commented 7 years ago

Bug

Add On Verison

1.9.1

Sample Input

Action for not-referenced Bamboo objects: DELETE

project:
  key: DSLT
  name: DSLT
  plans:
    - key: BNT47
      name: Build & Test
      stages:
        - name: Source Checkout
          jobs:
            - key: DIST
              name: Source checkout and distribution
              description: Create the full distribution tarball
              enabled: false
              tasks:
                - !script
                  description: Create source tarballs
                  inlineScript:
                    interpreter: !scriptInterpreter LEGACY_SH_BAT
                    scriptBody: "echo A"
              miscellaneous:
                cleanWorkingDirectoryAfterEachBuild: true
              requirements:
                - capabilityKey: hostname
                  matchType: !equals
                    matchValue:  abc

Run seed.

Modify as below

project:
  key: DSLT
  name: DSLT
  plans:
    - key: BNT47
      name: Build & Test
      stages:
        - name: Source Checkout
          jobs:
            - key: DIST
              name: Source checkout and distribution
              description: Create the full distribution tarball
              enabled: false
              tasks:
                - !script
                  description: Create source tarballs
                  inlineScript:
                    interpreter: !scriptInterpreter LEGACY_SH_BAT
                    scriptBody: "echo A"
              miscellaneous:
                cleanWorkingDirectoryAfterEachBuild: true
              requirements:
                - capabilityKey: hostname
                  matchType: !equals
                    matchValue:  xyz

Run seed

The job requirements now has

hostname equals abc hostname equals xyz

instead of just

hostname equals xyz

mrueegg commented 7 years ago

Thanks for your feedback. I can confirm this bug. We will address this in the next release.

mrueegg commented 7 years ago

We have fixed this with the latest release 1.9.2. Thanks again for bringing this up!