I am new to Jenkins and trying to understand the use of Plugins.
I have installed Jenkins on a server which already has few software's like Git,terraform.
Do I still need to install Plugins for Jenkins explicitly?
No, if you use git as a shell command.
sh "git"
If you want to use a plugin functionality, you need to install it.
Related
I am new to jenkins. I want to know what is equivalent of
"npm publish --registry..." in Jenkins.
I have configured Artifactory plugin in Jenkins, but I don't know how to use that in my job.
When I do npm publish manually it automatically creates .tgz file with correct version number and add it to Artifactory.
How can I accomplish the same?
The Jenkins Artifactory plugin allows you to define the Artifactory server.
There is a deploy maven artifact section, but you could also simply consider a basic build step as an "Execute Windows batch command" or an "Execute shell" (for Linux), in which you can type the same command as the one you are typing manually.
You only need to make sure the environment variables used during that step by the account running Jenkins are the same as the account you are using when typing said command.
You can use the jfrog command line interface for this: https://www.jfrog.com/confluence/display/CLI/CLI+for+JFrog+Artifactory#CLIforJFrogArtifactory-BuildingNpmPackages
Just use jfrog rt npm-publish in place of npm publish and jfrog cli will take care of the rest.
is there any way to make a bakup of jenkins, all installed plugins and settings?
Or is there any way to install plugins via console?
Regards
n00n
You can backup your Jenkins jobs and configurations using the thinBackup Plugin.
For example, I have a Jenkins Master and two Jenkins slaves for two different projects, one project needs to use Github plugin, so I will install Github plugin in Master. But it is slave which will actually use the Github plugin, so does this means plugin will automatically be installed into slave??
Plugins only need to be installed on the Jenkins master; you don't need to worry about anything there.
But if you're using Git, you need to ensure that Git is installed on each of the build machines where you want to check out code. You can set up Git to be installed automatically via the main Jenkins settings, or you can install Git manually, e.g. via a package manager.
I'm using the rtyler/jenkins Puppet module to deploy my Jenkins instance. One thing I can't seem to find documentation on is how to use Puppet to configure the Jenkins plugins once I've installed them. Can someone point me to some documentation and/or write a quick example? Thanks.
the module he provides is only for managing/configuring jenkins and managing plugins. All plugins are vastly different, there is no possibility his scripts would be able to manage the wide breadth of jenkins plugins out there. You would want to try to capture that using jenkins backups or by looking into how each module allows configuration.
For anyone interested in how to pull this off, I'm using the Jenkins SCM plugin available here: https://wiki.jenkins-ci.org/display/JENKINS/SCM+Sync+configuration+plugin
This requires manually setting up Jenkins and having the plugin sync all the configuration settings to a repository. All future Jenkins instances provisioned by Puppet will need to have all the necessary plugins installed, but the SCM plugin will automatically download all the necessary settings. However, do note that some of the plugins will require you to manually add includes into the SCM to begin tracking them: https://wiki.jenkins-ci.org/display/JENKINS/SCM+Sync+Config+shared+additionnal+includes
How to integrate Jenkins with Puppet?
As of now i am integrating Jenkins with Puppet. But We dont know which puppet plugin will support for jenkins. Can you please help on us.
It depends on what you want to achieve. If you simply want to deploy the manifests, there is no need for a puppet plugin. You could use the Publish over SSH plugin or something that let you push your code to the puppet master.
To actually execute puppet commands a generic job configuration would be fine.
If you are looking for a full chain of source control, tests and deployment for your manifests, you should take a look at Gerrit and how to integrate it with Jenkins using the Gerrit Trigger plugin