Enable HTTPS access from Jenkins to Gerrit

Enable HTTPS access from Jenkins to GerritΒΆ

By default, Jenkins uses the SSH connection to access Gerrit repositories. This section explains how to set up the HTTPS connection from Jenkins to Gerrit repositories.


This feature is available starting from the MCP 2019.2.5 maintenance update. Before enabling the feature, follow the steps described in Apply maintenance updates.

To enable access from Jenkins to Gerrit through HTTPS:

  1. Log in to the Salt Master node.

  2. Open the cluster level of your deployment model.

  3. In the cicd/control/leader.yml file:

    1. Replace the system.jenkins.client.credential.gerrit class with the system.jenkins.client.credential.gerrit_http class:

      - system.jenkins.client.credential.gerrit_http
    2. Redefine the jenkins_gerrit_url parameter as follows:

      jenkins_gerrit_url: "https://${_param:haproxy_gerrit_bind_host}:${_param:haproxy_gerrit_bind_port}"
  4. Refresh pillars:

    salt -C 'I@jenkins:client and not I@salt:master' saltutil.refresh_pillar
  5. Apply the changes:

    salt -C 'I@jenkins:client and not I@salt:master' state.apply jenkins.client