I am able to run below command.
java -jar jenkins-cli.jar -s http://ininilabsispw01:8080/ -auth user:pwd
I am not running through cli
The jenkins-cli.jar that you are running is the Jenkins command line interface. It can be downloaded from the /cli URL of the Jenkins controller.
I followed the steps that you described and am unable to duplicate the issue. You'll need to provide the details from the reporting script in hopes that the issue can be duplicated with those additional details.
Steps that I took:
- Create a shell script run-jenkins.sh
that downloads Jenkins 2.440.1 and the plugin installation manager tool
- Create an empty file plugins.txt
that will cause no additional plugins to be installed
- Run the shell script run-jenkins.sh
, install no additional plugins, and create a user for myself
- Define an access token in my user account in that Jenkins controller
- Create a parameterized freestyle project "has-a-param" with a choice parameter "CHOSEN_LETTER" with allowed values "A", "B", and "C"
- Run the parameterized freestyle project from the Jenkins user interface and confirm it passes
- Download the Jenkins CLI jar file with the command wget http://localhost:8080/jnlpJars/jenkins-cli.jar
- Run the Jenkins CLI jar file with the command
java -jar jenkins-cli.jar -s http://localhost:8080 -auth mwaite:$TOKEN build -p CHOSEN_LETTER=C /has-a-param
- Confirm that the parameterized job ran as expected
I ran the same checks with the most recent weekly release, Jenkins 2.449 and saw the same results. Parameterized jobs run from the command line with jenkins-cli.jar.
Can we connect if you have some time?
No, I don't provide private support, especially for issues that I cannot duplicate based on the instructions from the submitter.
I'm not able to duplicate the issue in my configuration. I'm running Jenkins 2.440.1 with latest plugins as described in my plugins.txt file. I have a parmeterized job that I'm able to run with the command:
java -jar jenkins-cli.jar -auth $USER:$TOKEN -s http://localhost:8080 build -f -p BRANCH_TO_BUILD=1.4.x -v /Bugs-Individual/Bugs-20-000-to-29-999/JENKINS-21980-polling-parameterized
Are you using the most recent version of the Jenkins command line jar file? You can download it from the /cli URL of your Jenkins controller.
Are the plugins installed on your system the most recent releases? If not, is the problem resolved when you update to the most recent releases of the plugins?
Please provide the detailed report of your Jenkins version and the installed plugins that is generated when you run the reporting script in the Jenkins script console from "Manage Jenkins".