Skip to content
Snippets Groups Projects
  1. Jan 02, 2025
  2. Dec 17, 2024
  3. Dec 02, 2024
  4. Nov 19, 2024
    • Johannes Carlsson's avatar
      Fix "abort-builds" for WorkflowMultiBranchProject · 50dd5899
      Johannes Carlsson authored
      "abort-builds" must be present in job_contents_keys in order for it to
      properly work.
      
      Also add a multibranch test for the yamlparser that will verify that
      this works properly.
      
      Change-Id: Ide9cd0f89a19002977cdcc2dfb9cd873e7d16945
      50dd5899
  5. Nov 09, 2024
    • Christoph Erhardt's avatar
      Fix the build with setuptools >= 71 · 7bf0dacd
      Christoph Erhardt authored
      The `pkg_resources` module no longer bundles a vendored version of the
      `packaging` module. Add an explicit dependency on `packaging` and
      directly use its classes.
      
      Change-Id: I9362ca6d6323b56bc579db30e7f5bb40b57da65a
      7bf0dacd
  6. Oct 30, 2024
    • Evgeni Golov's avatar
      Add support for Python 3.12 · 413e765a
      Evgeni Golov authored
      
      Change-Id: Ic4885ee35e900a2115078d6320e97aab89c819bb
      Signed-off-by: default avatarEvgeni Golov <evgeni@golov.de>
      413e765a
    • Zuul's avatar
      Merge "Make unit tests compatible with Python 3.13" · 26d10f4f
      Zuul authored
      26d10f4f
    • Chris Cheng's avatar
      allow disabled to remain the last setting · 7712c0b7
      Chris Cheng authored
      In the latest version of Jenkins, the default value of 'disabled' is
      true. When 'disabled' is not set (or None), reconfig_job will activate
      the job, but in some cases we hope that 'disabled' remain the last
      setting.
      When 'disabled' is not set (or None) in yaml, and the job exists,
      fix_disabled will try to get 'disabled' from the jenkins server. So the
      'disabled' value should match the current value on the jenkins server.
      
      Change-Id: Icd840f15c4d48cd8a8ebc0f891beac68c2bb6bdd
      7712c0b7
    • Christoph Erhardt's avatar
      Make unit tests compatible with Python 3.13 · 4deb12b7
      Christoph Erhardt authored
      Python 3.13 has changed the behaviour of the `xml.dom.minidom` module:
      double quotes used to be escaped everywhere, but they are now only
      escaped inside attributes.
      
      This was done by the following commit.
      https://github.com/python/cpython/commit/154477be722ae5c4e18d22d0860e284006b09c4f
      
      As a result, the unit tests fail when executed on Python 3.13.
      
      Fix this issue in the following way:
      1. In all 88 reference-output XML files, replace all occurrences of
         `&quot;` with `"`.
      2. Change `tests/conftest.py` to force-replace all occurrences of
         `&quot;` with `"` in the test output before comparing it to the
         reference output. This ensures that the subsequent equality assertion
         still holds on older versions of Python.
      
      This solution works because the test data does not contain any instances
      of `&quot;` inside XML attributes.
      
      Change-Id: Ied875014b1bb5d8225943303858658648efc12ad
      4deb12b7
    • Vsevolod Fedorov's avatar
      Fix zuul checks · 643a58e2
      Vsevolod Fedorov authored
      Fix docs and docs-linkcheck tox targets:
      It looks like recently sphinx began to check if footnotes are
      referenced. If not, it issues a warning which is treated as error.
      
      Fix Python 3.10 and 3.11:
      It looks like opendev switched to Noble Ubuntu release.
      Pin these versions to previous one.
      
      Shift flake8 version.
      New version ignores syntax whithin strings.
      
      Fix formatting errors reported by flake8.
      
      Change-Id: I9b23cccf0dc83fb56083b5fe8c9c026f5dff7e9a
      643a58e2
  7. Aug 16, 2024
  8. Jul 22, 2024
  9. Jul 10, 2024
  10. Jul 05, 2024
  11. Jul 04, 2024
  12. Jul 03, 2024
    • Ankush Pathak's avatar
      * feat: Cache raw YAML parsing results of files · ed2c3730
      Ankush Pathak authored
      It is expensive to read and parse an YAML file. This commit optimizes
      for usecases where YAML files are reused across any input by caching the
      raw parsing result.
      
      * Pin setuptools version to 69.5.1 for Python >= 3.8
      A change introduced in setuptools version 70.0.0 causes tests under
      test_moduleregistry.py to fail with "InvalidVersion". Pin the setuptools
      version for Python >= 3.8 until this is investigated and resolved.
      
      Change-Id: I534d7a6d9992780cd8de4f8460190caf5c3bde12
      ed2c3730
  13. Jun 01, 2024
  14. May 20, 2024
  15. May 15, 2024
    • Stephen Boyd's avatar
      githuborg: Pull build strategies into parent xml · f62ec53e
      Stephen Boyd authored
      Either Jenkins seems to have made an update where the build strategy
      properties have been moved, or this never worked. When generating the
      XML using the Jenkins UI, the build strategies appear at the top level.
      Prior to this patch, when using jjb, the configuration was completely
      ignored, causing some charming build storms.
      
      Breaking change: The legacy github org output is no longer correct.
      
      Change-Id: Idb5bf025f9bcbf9d9588465713ea5a29ff069e6d
  16. May 10, 2024
    • Evgeni Golov's avatar
      Require setuptools for pkg_resources · 7160c2d8
      Evgeni Golov authored
      
      In 67645a46 the requirement on
      setuptools was removed in favor of the version implementation in
      python-jenkins. However, other code (regsitry.py, xml_config.py) is
      still using pkg_resources, which leads to errors like this:
      
          % jenkins-jobs
          ERROR:stevedore.extension:Could not load 'delete': No module named 'pkg_resources'
          ERROR:stevedore.extension:Could not load 'delete-all': No module named 'pkg_resources'
          ERROR:stevedore.extension:Could not load 'get-plugins-info': No module named 'pkg_resources'
          ERROR:stevedore.extension:Could not load 'list': No module named 'pkg_resources'
          ERROR:stevedore.extension:Could not load 'test': No module named 'pkg_resources'
          ERROR:stevedore.extension:Could not load 'update': No module named 'pkg_resources'
          Traceback (most recent call last):
            File "/tmp/tmp.qQ9GsQCSeH/venv/bin/jenkins-jobs", line 8, in <module>
              sys.exit(main())
                       ^^^^^^
            File "/tmp/tmp.qQ9GsQCSeH/venv/lib64/python3.12/site-packages/jenkins_jobs/cli/entry.py", line 177, in main
              jjb = JenkinsJobs(argv)
                    ^^^^^^^^^^^^^^^^^
            File "/tmp/tmp.qQ9GsQCSeH/venv/lib64/python3.12/site-packages/jenkins_jobs/cli/entry.py", line 60, in __init__
              self.parser = create_parser()
                            ^^^^^^^^^^^^^^^
            File "/tmp/tmp.qQ9GsQCSeH/venv/lib64/python3.12/site-packages/jenkins_jobs/cli/parser.py", line 112, in create_parser
              extension_manager.map(parse_subcommand_args, subparser)
            File "/tmp/tmp.qQ9GsQCSeH/venv/lib64/python3.12/site-packages/stevedore/extension.py", line 276, in map
              raise NoMatches('No %s extensions found' % self.namespace)
          stevedore.exception.NoMatches: No jjb.cli.subcommands extensions found
      
      I could only reproduce this on Python 3.12, as on 3.11 and earlier a
      `python -m venv` installs setuptools already (to bootstrap pip?).
      
      Fixes: 67645a46
      Change-Id: I679bbfd4b178094585587b5f47d56da37c663b5c
      Signed-off-by: default avatarEvgeni Golov <evgeni@golov.de>
      7160c2d8
  17. May 08, 2024
    • Victor Seva's avatar
      Story 2011112: include-raw-verbatim fails on job-template · 4897d5e0
      Victor Seva authored
      don't expand IncludeRawVerbatim twice
      
      > FAILED tests/loader/test_loader.py::test_include_job[include002] - jenkins_jobs.errors.JenkinsJobsException: While formatting string "#!/bin/bash\n#\n# sample script to check that variables aren't expanded\n# when usi...": Missing parameter: 'VAR1'
      > FAILED tests/loader/test_loader.py::test_include[include002] - jenkins_jobs.errors.JenkinsJobsException: While formatting string "#!/bin/bash\n#\n# sample script to check that variables aren't expanded\n# when usi...": Missing parameter: 'VAR1'
      
      Change-Id: I88b22987eabe99f00d99755299256d4aba8a1c76
      4897d5e0
  18. May 07, 2024
Loading