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

Bug: When DISABLE'ing stages (Action for not-referenced Bamboo objects) #44

Closed mayani closed 7 years ago

mayani commented 7 years ago

Bug

Add On Verison

1.8.2

Sample Input

Action: DISABLE

Initial

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
              tasks:
                - !script
                  description: Create source tarballs
                  inlineScript:
                    interpreter: !scriptInterpreter LEGACY_SH_BAT
                    scriptBody: "echo A"
              miscellaneous:
                cleanWorkingDirectoryAfterEachBuild: true

        - name: Unit Tests
          description: Run Unit Tests on Code and Binaries
          jobs:
            - key: D9CUT
              name: Debian 9 C Unit Tests
              tasks:
                - !script
                  description: Untar source
                  inlineScript:
                    interpreter: !scriptInterpreter LEGACY_SH_BAT
                    scriptBody: "echo B"
              miscellaneous:
                cleanWorkingDirectoryAfterEachBuild: true

Modified

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
              tasks:
                - !script
                  description: Create source tarballs
                  inlineScript:
                    interpreter: !scriptInterpreter LEGACY_SH_BAT
                    scriptBody: "echo A"
              miscellaneous:
                cleanWorkingDirectoryAfterEachBuild: true

Description

Stage Unit Tests should be disabled, but is marked manual instead. Stages do not have an enable/disable flag, so all jobs in the stage should be disabled.

mrueegg commented 7 years ago

Thanks for the detailed bug report. Actually, this works as designed. But I must confess that it is probably more intuitive to disable all the jobs of a stage instead of setting it to manual. So I think I will change this according to your specification for the next release.

mrueegg commented 7 years ago

Fixed with the just released 1.9.0. Thanks for bringing this up!