Testing git plugin 5.0.0 and git client plugin 4.0.0

Git plugin 5.0.0

Thanks to the initial work of Karl Schulz and some further work that I’ve done, the Jenkins git plugin is preparing the 5.0.0 release that will include symbols in the Pipeline definition. Symbols are easier to read and easier to understand in the Pipeline definition. They look better in the Pipeline snippet syntax generator and in the Jenkinsfile.

The git plugin 5.0.0 release will also upgrade the plugin from Java 8 to Java 11. It will require Jenkins 2.361.4 or newer.

Git client plugin 4.0.0

In addition to the git plugin 5.0.0 release, I’m preparing for the git client plugin 4.0.0 release. It will upgrade from Java 8 to Java 11 and will also require Jenkins 2.361.4 or newer. In addition, it will upgrade the JGit library from JGit 5.13.1 to JGit 6.4.0.

The upgrades are intended to be compatible with all uses of the git plugin in all Jenkins job types, including Pipeline, freestyle, and more. Previous Pipeline syntax will continue to work as it did in the past. Previous configuration as code definitions will continue to be honored as they were in the past.

Automated tests and interactive tests of both plugins have been run in environments that I find interesting, like:

  • Controllers running with Docker on Linux
  • Agents on Unix variants (CentOS 7, Debian 10, Debian 11, Debian testing, Debian unstable, FreeBSD 13, OpenBSD 7.2, openSUSE Leap 15.3, Red Hat Enterprise Linux 8, Rocky Linux 9, Ubuntu 18.04, Ubuntu 20.04, Ubuntu 22.04) using OpenSSH agents and swarm agents
  • Agents on Windows (Windows 10) using OpenSSH agents and inbound agents
  • Agents on various processor architectures, including amd64, aarch64, arm32, and s390x
  • Jenkins plugin bill of materials draft pull requests of git client plugin incremental build and git plugin incremental build

The git client plugin passes all the plugin bill of materials tests. The git plugin passes all the plugin bill of materials tests but one. That one test needs a change in the tests of the affected plugin.

How you can help

My first round of testing found a bug that would have caused problems for users of git submodules. The bug is fixed, but more testing is needed.

You can help by testing the incremental builds of the git plugin and the git client plugin in your pre-production or development environments. I’ve been using early builds of the git plugin for many months. I’ve been using the incremental builds of the git client plugin and the git plugin for the last two weeks.

If you use a docker container and the plugins.txt file to define your Jenkins plugin configuration, you can switch to testing the pre-release by replacing the git and git-client lines in your plugins.txt file with these lines:

git-client:incrementals;org.jenkins-ci.plugins;4.0.0-rc3322.fa_4f895a_c687
git:incrementals;org.jenkins-ci.plugins;5.0.0-rc5176.c6f6c0213fa_a

If you prefer to install the plugins from the advanced page of the Jenkins plugin manager, you can paste the following two URLs into the URL field of the plugin manager advanced page:

Run the plugin incremental builds in your test environment. Report any issues that you detect in this thread. Experiment with the Pipeline syntax snippet generator with the incremental builds. Explore configuration as code settings and confirm that your existing settings are retained.

I’m especially interested in testing from users that are running a Windows controller. I hope to have time myself for testing with a Windows controller, but that will be a fresh installation and may not detect the same types of issues as would be detected by a Windows controller with a history of jobs.

Code review opportunities

If you’d like to help with code review, feel free to review:

What’s next?

I hope to release the two plugins during the period between December 25, 2022 and January 3, 2023. However, that release schedule depends on what I learn from further testing and the results reported by others.

There is one open question related to configuration as code and the newly created scmGit symbol. It does not harm functionality but will need investigation before the plugin is released.

  • List item
1 Like

Hi Mark

what shall be the benefit for this 2 upgrades? Performance, more security?

thx

The changes upgrade the JGit library from JGit 5.13.1 to JGit 6.4.0 so that we’re using a JGit library version that is actively maintained and continuing its development. JGit 5.13.1 is the last JGit release to support Java 8. We were stuck on it because the plugin continued to support Java 8.

The changes allow simpler Pipeline syntax while continuing to support the previous Pipeline syntax. Pipeline checkout steps that looked like this:

checkout([$class: 'GitSCM',
    branches: [[name: 'master']],
    browser: [$class: 'GithubWeb',
        repoUrl: 'https://github.com/jenkinsci/git-plugin'],
    extensions: [
        [$class: 'CloneOption', depth: 1,
            honorRefspec: true,
            noTags: true,
            shallow: true],
        [$class: 'GitLFSPull'],
        [$class: 'LocalBranch', localBranch: 'master'],
        [$class: 'SubmoduleOption', depth: 1,
            disableSubmodules: false,
            parentCredentials: true,
            recursiveSubmodules: true,
            shallow: true,
            trackingSubmodules: true]],
    gitTool: 'jgit',
    userRemoteConfigs: [
        [url: 'https://github.com/jenkinsci/git-plugin.git']]])

can look like this:

checkout scmGit(
    branches: [[name: 'master']],
    browser: github('https://github.com/jenkinsci/git-plugin'),
    extensions: [
        cloneOption(
            depth: 1,
            honorRefspec: true,
            noTags: true,
            shallow: true),
        lfs(),
        localBranch('master'),
        submodule(
            depth: 1,
            disableSubmodules: false,
            parentCredentials: true,
            recursiveSubmodules: true,
            shallow: true,
            trackingSubmodules: true)],
    gitTool: 'jgit',
    userRemoteConfigs: [
        [url: 'https://github.com/jenkinsci/git-plugin.git']])

I tested the new git plugins in conjunction with my git-forensics plugin, and everything looks good! (Test the plugin with git 5.0.0-rc and git-client 4.0.0-rc by uhafner · Pull Request #552 · jenkinsci/git-forensics-plugin · GitHub, the failure is not relevant since the plugin is not yet ready for the latest Jenkins baselines)

BTW: since the links above were broken on ci.jenkins.io I replaced them with similar links to our artifactory instance.

Thanks @uhafner. I’ve updated the links and the plugins.txt file to point to the most recent pre-release builds of the git client plugin (unchanged) and git plugin (updated to now include a symbol for submodule section).

Git client plugin 4.0.0 and git plugin 5.0.0 have released.

If issues are detected, please report them to issues.jenkins.io for the appropriate plugin:

Testing included:

  • New Pipeline Syntax Snippet Generator automated tests in the git plugin (thanks to @jglick for a great technique to confirm snippet generation works as expected)
  • Jenkins plugin bill of materials compatibility checks for git plugin and for git client plugin
  • Interactive testing on Windows and Linux controllers using multiple operating system agents including
    • CentOS 7
    • Debian 10
    • Debian 11
    • Debian testing
    • Debian unstable
    • FreeBSD 13
    • OpenBSD 7.2
    • Red Hat Enterprise Linux 8
    • Rocky Linux 9
    • openSUSE Linux 15
    • Ubuntu 18
    • Ubuntu 20
    • Ubuntu 22
    • Windows 10

Thanks to all who assisted with the testing and thanks to Karl Shultz for his initial work on symbols for the Pipeline Snippet Syntax Generator. Thanks to the Eclipse JGit development team for making the upgrade from JGit 5.13.1 to JGit 6.4.0 so smooth.

1 Like