Skip to content

Commit

Permalink
Merge pull request #4 from armyers/master
Browse files Browse the repository at this point in the history
full support for Active Choice Plug-in
  • Loading branch information
bgaifullin authored Dec 18, 2020
2 parents 52df141 + e6e3e66 commit dfecf46
Show file tree
Hide file tree
Showing 44 changed files with 2,826 additions and 20 deletions.
83 changes: 83 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Example:

.. code-block:: yaml
# OLD: partial support of Active Choice Plug-in capabilities
# deprecated -- see below
- job:
name: 'cascade-choice-example'
Expand All @@ -30,6 +32,87 @@ Example:
return ['Something Wrong']
reference: STR_PARAM
choice-type: single
- dynamic-reference:
name: DYNAMIC_REF
project: 'dynamic-reference-example-04'
script: |
return ['foo', 'bar']
description: "A parameter named DYNAMIC_REF with options foo and bar."
fallback-script: |
return ['Something Wrong']
reference: STR_PARAM
omit-value: false
choice-type: bullet-list
# NEW: Supports full capabilities of the Active Choice Plug-in
- job:
name: 'TEST-jjb-active-choice-full-support'
parameters:
- string:
name: STR_PARAM
default: test
- choice:
name: CHOICE_PARAM
choices:
- choice_01
- choice_02
- choice_03
- choice_04
description: |
Just a test parameter for used by references
- active-choice:
project: 'active-choice-example'
name: ACTIVE_CHOICE_01
description: "A parameter named ACTIVE_CHOICE_01 with options foo and bar."
groovy:
script: |
return ['foo:selected', 'bar']
classpath: file:/tmp/aklsdjfkl.jar
sandbox: false
fallback:
script: |
return ['Error']
visible-item-count: 1
choice-type: single
filterable: true
filter-length: 3
- active-choice-reactive:
project: 'active-choice-example'
name: ACTIVE_CHOICE_REACTIVE_01
description: "A parameter named ACTIVE_CHOICE_REACTIVE_01 with options foo and bar."
groovy:
script: |
return ['foo:selected', 'bar']
classpath: file:/tmp/aklsdjfkl.jar
fallback:
script: |
return ['Error']
classpath: file:/tmp/aklsdjfkl.jar,https://lakjsdfklsdjklf/lkajsdflk.jar
sandbox: true
visible-item-count: 10
reference: STR_PARAM,CHOICE_PARAM
choice-type: multi
- active-choice-reactive-reference:
name: ACTIVE_CHOICE_REACTIVE_REF_01
project: 'active-choice-example'
description: "A parameter named ACTIVE_CHOICE_REACTIVE_REF_01 with options foo and bar."
groovy:
script: |
return ['foo:selected', 'bar']
classpath: file:/tmp/aklsdjfkl.jar
sandbox: true
fallback:
script: |
return ['Error']
classpath: file:/tmp/aklsdjfkl.jar,http://lakjsdfklsdjklf/lkajsdflk.jar
reference: STR_PARAM,CHOICE_PARAM
omit-value: false
choice-type: bullet-list
.. _`Active Choice Plugin`: https://wiki.jenkins-ci.org/display/JENKINS/Active+Choices+Plugin
Expand Down
2 changes: 2 additions & 0 deletions dev-files/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

# Just a few files used to during dev/test of the full support for the Active Choice plug-in
258 changes: 258 additions & 0 deletions dev-files/dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,258 @@
- job:
name: 'TEST-jjb-active-choice'

parameters:
- string:
name: STR_PARAM
default: test

- choice:
name: CHOICE_PARAM
choices:
- choice_01
- choice_02
- choice_03
- choice_04
description: |
Just a test parameter for used by references
- active-choice:
project: 'active-choice-example'
name: ACTIVE_CHOICE_01
description: "A parameter named ACTIVE_CHOICE_01 with options foo and bar."
groovy:
script: |
return ['foo:selected', 'bar']
classpath: file:/tmp/aklsdjfkl.jar
sandbox: false
fallback:
script: |
return ['Error']
visible-item-count: 1
choice-type: single
filterable: true
filter-length: 3

- active-choice:
project: 'active-choice-example'
name: ACTIVE_CHOICE_02
description: "A parameter named ACTIVE_CHOICE_02 with options foo and bar."
groovy:
script: |
return ['foo:selected', 'bar']
fallback:
script: |
return ['Error']
sandbox: true
classpath: file:/tmp/aklsdjfkl.jar
visible-item-count: 4
choice-type: multi
filterable: false

- active-choice:
project: 'active-choice-example'
name: ACTIVE_CHOICE_03
description: "A parameter named ACTIVE_CHOICE_03 with options foo and bar."
groovy:
script: |
return ['foo:selected', 'bar']
fallback:
script: |
return ['Error']
sandbox: true
classpath: file:/tmp/aklsdjfkl.jar
visible-item-count: 3
choice-type: radio

- active-choice:
project: 'active-choice-example'
name: ACTIVE_CHOICE_04
description: "A parameter named ACTIVE_CHOICE_04 with options foo and bar."
groovy:
script: |
return ['foo:selected', 'bar']
fallback:
script: |
return ['Error']
sandbox: true
classpath: file:/tmp/aklsdjfkl.jar
visible-item-count: 1
choice-type: checkbox

- active-choice:
project: 'active-choice-example'
name: ACTIVE_CHOICE_05
description: "A parameter named ACTIVE_CHOICE_05 with options foo and bar."
scriptler:
script: print-path
parameters:
- PARAM1: value1 alksdjflksdf lkasjflk
- PARAM2: value2
visible-item-count: 1
choice-type: checkbox

- active-choice-reactive:
project: 'active-choice-example'
name: ACTIVE_CHOICE_REACTIVE_01
description: "A parameter named ACTIVE_CHOICE_REACTIVE_01 with options foo and bar."
groovy:
script: |
return ['foo:selected', 'bar']
classpath: file:/tmp/aklsdjfkl.jar
fallback:
script: |
return ['Error']
classpath: file:/tmp/aklsdjfkl.jar,https://lakjsdfklsdjklf/lkajsdflk.jar
sandbox: true
visible-item-count: 10
reference: STR_PARAM,CHOICE_PARAM
choice-type: multi

- active-choice-reactive:
project: 'active-choice-example'
name: ACTIVE_CHOICE_REACTIVE_02
description: "A parameter named ACTIVE_CHOICE_REACTIVE_02 with options foo and bar."
groovy:
script: |
return ['foo:selected', 'bar']
classpath: file:/your-path/your-classes.jar
sandbox: true
reference: STR_PARAM,ACTIVE_CHOICE_01
visible-item-count: 10
choice-type: radio
filterable: true
filter-length: 10

- active-choice-reactive:
project: 'active-choice-example'
name: ACTIVE_CHOICE_REACTIVE_03
description: "A parameter named ACTIVE_CHOICE_REACTIVE_03 with options foo and bar."
scriptler:
script: print-path
parameters:
- PARAM1: value1 aklfsdj kalsjflk
- PARAM2: value2
reference: STR_PARAM
visible-item-count: 10
choice-type: checkbox
filterable: true
filter-length: 4

- active-choice-reactive:
project: 'active-choice-example'
name: ACTIVE_CHOICE_REACTIVE_04
description: "A parameter named ACTIVE_CHOICE_REACTIVE_04 with options foo and bar."
scriptler:
script: print-path
reference: STR_PARAM,CHOICE_PARAM
visible-item-count: 10
choice-type: checkbox

- active-choice-reactive-reference:
name: ACTIVE_CHOICE_REACTIVE_REF_01
project: 'active-choice-example'
description: "A parameter named ACTIVE_CHOICE_REACTIVE_REF_01 with options foo and bar."
groovy:
script: |
return ['foo:selected', 'bar']
classpath: file:/tmp/aklsdjfkl.jar
sandbox: true
fallback:
script: |
return ['Error']
classpath: file:/tmp/aklsdjfkl.jar,http://lakjsdfklsdjklf/lkajsdflk.jar
reference: STR_PARAM
omit-value: false
choice-type: input-text

- active-choice-reactive-reference:
name: ACTIVE_CHOICE_REACTIVE_REF_02
project: 'active-choice-example'
description: "A parameter named ACTIVE_CHOICE_REACTIVE_REF_02 with options foo and bar."
groovy:
script: |
return ['foo:selected', 'bar']
classpath: file:/tmp/aklsdjfkl.jar
sandbox: true
fallback:
script: |
return ['Error']
classpath: file:/tmp/aklsdjfkl.jar,http://lakjsdfklsdjklf/lkajsdflk.jar
reference: STR_PARAM,ACTIVE_CHOICE_01
omit-value: false
choice-type: numbered-list

- active-choice-reactive-reference:
name: ACTIVE_CHOICE_REACTIVE_REF_03
project: 'active-choice-example'
description: "A parameter named ACTIVE_CHOICE_REACTIVE_REF_03 with options foo and bar."
groovy:
script: |
return ['foo:selected', 'bar']
classpath: file:/tmp/aklsdjfkl.jar
sandbox: true
fallback:
script: |
return ['Error']
classpath: file:/tmp/aklsdjfkl.jar,http://lakjsdfklsdjklf/lkajsdflk.jar
reference: STR_PARAM,CHOICE_PARAM
omit-value: false
choice-type: bullet-list

- active-choice-reactive-reference:
name: ACTIVE_CHOICE_REACTIVE_REF_04
project: 'active-choice-example'
description: "A parameter named ACTIVE_CHOICE_REACTIVE_REF_04 with options foo and bar."
groovy:
script: |
return ['foo:selected', 'bar']
classpath: file:/tmp/aklsdjfkl.jar
sandbox: true
fallback:
script: |
return ['Error']
classpath: file:/tmp/aklsdjfkl.jar,http://lakjsdfklsdjklf/lkajsdflk.jar
reference: STR_PARAM,CHOICE_PARAM
omit-value: false
choice-type: formatted-html

- active-choice-reactive-reference:
name: ACTIVE_CHOICE_REACTIVE_REF_05
project: 'active-choice-example'
description: "A parameter named ACTIVE_CHOICE_REACTIVE_REF_05 with options foo and bar."
groovy:
script: |
return ['foo:selected', 'bar']
sandbox: true
fallback:
script: |
return ['Error']
classpath: file:/tmp/aklsdjfkl.jar,http://lakjsdfklsdjklf/lkajsdflk.jar
reference: STR_PARAM
omit-value: false
choice-type: formatted-hidden-html

- active-choice-reactive-reference:
project: 'active-choice-example'
name: ACTIVE_CHOICE_REACTIVE_REF_06
description: "A parameter named ACTIVE_CHOICE_REACTIVE_REF_06 with options foo and bar."
scriptler:
script: print-path
parameters:
- PARAM1: value1
reference: STR_PARAM
visible-item-count: 10
choice-type: input-text

- active-choice-reactive-reference:
project: 'active-choice-example'
name: ACTIVE_CHOICE_REACTIVE_REF_07
description: "A parameter named ACTIVE_CHOICE_REACTIVE_REF_07 with options foo and bar."
scriptler:
script: print-path
reference: STR_PARAM,CHOICE_PARAM
visible-item-count: 10
choice-type: input-text
filterable: true
filter-length: 8

Loading

0 comments on commit dfecf46

Please sign in to comment.