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.
Note
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:
Log in to the Salt Master node.
Open the cluster level of your deployment model.
In the cicd/control/leader.yml
file:
Replace the system.jenkins.client.credential.gerrit
class
with the system.jenkins.client.credential.gerrit_http
class:
classes:
...
- system.jenkins.client.credential.gerrit_http
Redefine the jenkins_gerrit_url
parameter as follows:
jenkins_gerrit_url: "https://${_param:haproxy_gerrit_bind_host}:${_param:haproxy_gerrit_bind_port}"
Refresh pillars:
salt -C 'I@jenkins:client and not I@salt:master' saltutil.refresh_pillar
Apply the changes:
salt -C 'I@jenkins:client and not I@salt:master' state.apply jenkins.client