[Ci-users] can update jenkins jobs via jjb

Fri Apr 14 12:53:29 UTC 2017
Dusty Mabe <dusty at dustymabe.com>

I'm using python3-jenkins-job-builder-1.4.0-7.fc25.noarch.rpm on fedora
and I can't update jobs. I can authenticate just fine with my password
in the config ini file, but I get a 403 forbidden. I have tried this
with both the python3 and python2 version. The below errors are from
the python 2 version:

$ jenkins-jobs --conf jenkins_jobs.ini test project.yaml
/usr/lib/python2.7/site-packages/jenkins/__init__.py:529: DeprecationWarning: get_plugins_info() is deprecated, use get_plugins()
Traceback (most recent call last):
  File "/guests/sharedfolder/code/github.com/projectatomic/adb-tests/cdrage-atomicapp-ci/centos-ci-jjb/foo/usr/bin/jenkins-jobs", line 10, in <module>
  File "/usr/lib/python2.7/site-packages/jenkins_jobs/cmd.py", line 171, in main
    execute(options, config)
  File "/usr/lib/python2.7/site-packages/jenkins_jobs/cmd.py", line 337, in execute
  File "/usr/lib/python2.7/site-packages/jenkins_jobs/builder.py", line 314, in update_job
  File "/usr/lib/python2.7/site-packages/jenkins_jobs/builder.py", line 224, in load_files
    self.parser = YamlParser(self.global_config, self.plugins_list)
  File "/usr/lib/python2.7/site-packages/jenkins_jobs/builder.py", line 220, in plugins_list
    self._plugins_list = self.jenkins.get_plugins_info()
  File "/usr/lib/python2.7/site-packages/jenkins_jobs/builder.py", line 184, in get_plugins_info
    raise e
jenkins.JenkinsException: Error in request. Possibly authentication failed [403]: Forbidden
INFO:jenkins_jobs.builder:Cache saved

Note that if I run the "test" without the `--conf jenkins_jobs.ini`,
the test passes as it is just validating the yaml.

I don't think this is an auth issue either because if I put the wrong
password in the file then I get `Invalid password/token for user:`

Can someone confirm they can run jenkins_jobs to update a job? One way
to do this is run through the `Your Next Job: Jenkins Job Builder` example
I posted a long time ago:


Thanks for any help!