praveena
praveena

Reputation: 41

Jenkins Job Builder error: "Unknown entry point or macro 'reactive_choice' for component type: 'parameter'."

I am unable to define the new plugins while using jenkins job builder to build my jobs. The Jenkins UI has these plugins. I am new to JJB, hence I am not too sure how these new plugins get defined. This is the configuration used in my YAML:

- job:
name: Run_Pipeline
project-type: freestyle
defaults: global
description: Build to pass variables for a pipeline
disabled: false
node: Linux
logrotate:
    numToKeep: 5
parameters:
    - choice:
      name: TYPE
      choices: ['DEV','QA']
- reactive_choice:
       name: ENV_NAME
       description: "Select environment (depending on Type) where the build has to be deployed"
       referencedParameters: TYPE
       script: |
        if (TYPE == 'DEV'){
            return['dev1','dev2','dev3']
        }else if(TYPE == 'QA'){
            return['qa1','qa2','qa3','qa4']
        }else{
            return['Uknown Type']
        }
        choiceType: PT_SINGLE_SELECT
        filterLength: 1

builders:
    - shell: |
        if [[ "$TYPE" == "QA" && "$PASSWORD" != "password" ]];then echo "Invalid Password for QA Deployment"; exit 1; fi

While running this yaml through jenkins-job builder, I am getting the error:

jenkins_jobs.errors.JenkinsJobsException: Unknown entry point or macro 'reactive_choice' for component type: 'parameter'.

I know this method is not defined in the module parameters.py; I found one in GITHub, but I am not sure how to integrate that method with the existing package.

https://github.com/ochirkov/jenkins-job-builder-active-choice-reactive-param

What am I missing? Any help is highly appreciated.

Thanks!

Upvotes: 1

Views: 2142

Answers (1)

praveena
praveena

Reputation: 41

I got it, it's pretty straightforward. I had easy_install installed in my file path and I had to just run the package from github as follows:

easy_install jjb-reactive-choice-param-0.3.0

This link was quite helpful - http://setuptools.readthedocs.io/en/latest/easy_install.html Simple enough!

Upvotes: 0

Related Questions