Setting up Plugins

From here, we need to install some plugins to help with our CICD pipeline. Navigate to Manage Jenkins | Manage Plugins as we need to download the following:

These plugins will be used to compile Go code (Go plugin), execute custom scripts for building (PostBuildScript Plugin), and publish it to a remote server and execute the commands (the Publish Over SSH plugin). After the plugins finish downloading, we need to configure them globally. To do this, from the main Jenkins dashboard, navigate to Manage Jenkins | Global Tool Configuration and search for the Go section and set up the version:

The next step is to configure our SSH keys for deployment. From the main Jenkins dashboard, choose Manage Jenkins | Configure System and navigate to the SSH section and enter the following:

  • Either the path of the key file or paste the private key content in the Key textbox
  • The server details

In the following screenshot, the key is hidden:

Here, since we have mapped port 32 to 22, make sure you go to SSH Servers | Advanced and set up the SSH Port as 32:

Once this is done, it is recommended to use the test connection button to ensure connectivity.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset