Can't find Docker Plugin on Jenkins - docker

I'm trying to build an image using docker.
Connecting with Jenkins, then moving to
Manage Jenkins > Plugins management, I don't found Docker plugin there.
Also, I tried Manage Jenkins > Global Tool Configuration, I can't see Docker Part as displayed bellow.
Could you please tell me what I missed ?.
Big thanks.

You can add that plugin using the download of docker-build-publish-1.3.2.hpi.
Then you have to restart Jenkins.
HTH

Download externally docker plugin which is .hpi file and place that file under /JENKINS_HOME/plugins folder

You could go to Manage Jenkins -> Manage Plugins -> search for docker in the search bar to the top right corner -> install docker.
You may choose to restart jenkins after the installation is complete. Once the docker plugin is fully installed, head over to Manage Jenkins -> Global Tool Configuration -> at the bottom you'll have docker available.

Related

How to install TFS plugin on jenkins?

I want to install TFS plugin on jenkins but I cannot to do it through Manage jenkins section as my company's network is not allowing me to do it.
Can you please suggest on how I can manually download the plugin and add it on jenkins folder?
thanks in advance
If you are talking about : https://github.com/jenkinsci/tfs-plugin, then you can try to download the tfs.hpi file from Github (The latest release is currently 5.157.1) and then manually install the plugin in Jenkins:
Manage Jenkins > Manage Plugins > Advanced > Upload Plugin and select the plugin file downloaded previously (Make sure to have git-plugin installed normally first so all additional dependencies are in place).

Configure NodeJs on Jenkins?

I installed the NodeJS plugin 1.3.7 on an installation of Jenkins 2.235.2. After restarting Jenkins I see the NodeJS options on job configuration screens, but there is nothing on the Jenkins configuration screen that makes any mention of Node, so I am not able to add any installations for the jobs to use. I've found several sources that say that clicking Check now on the Advanced tab of the Plugin Manager screen will solve this, but that has had no effect. Can anyone suggest what else I might try to be able to add Node installations, or explain what I'm missing?
Go to Manage Jenkins >> Global tool configuration
and configure node there according to you
and in your jenkinsfile use
tools {
nodejs "nodejs-2.x"
}

Update jenkins war on one machine and then move it to another one: possible?

I have a machine with blocked outgoing connections so it is not possible to update jenkins nor install the plugins I need for my work.
My idea is the following: I download the jenkins .war on my personal laptop and complete the installation + the plugin download.
Then I just move this .war to the machine where I need jenkins to be up and running.
Is it possible? Where are the plugins/updated data stored?
Also, would it be a problem the fact that my laptop has windows as os, while the destination machine is a linux RHEL?
Your solution sounds crazy :D
This could be help you:
Update Jenkins war
If you have shell access with root privilege, there is a manual way.
Download latest war file inside your linux, using wget , curl or just upload it using winscp from your windows.
Stop jenkins
Backup EVERYTHING: linux snapshot, jenkins workspace, jenkins war file, etc
Replace the old war with new war
Start jenkins
Detailed steps in this webs:
https://mohitgoyal.co/2017/02/15/upgrade-jenkins-server-to-a-new-version/
https://www.thegeekstuff.com/2016/06/upgrade-jenkins-and-plugins/
Plugin
Jenkins has an option to install plugins called Manage Plugins
This offer two options :
(1) Install plugins using available option
For official and compatible plugins, suggested by Jenkins :
(2) Install plugins using upload option
For custom plugins or when is not available on official repositories:

What is the right way to add Maven and Ant to a Jenkins Docker container?

I downloaded the jenkins/jenkins:lts image from docker hub which I got up and running on Ubuntu 16.04. The image doesn't seem to include Ant or Maven, and may also want to do builds against different versions of the jdk. I am wondering what is the right way to adress this - can I just run bash on the container and run apt-get or yum as the case may be to install extra stuff needed for my builds, or is there a better way?
Jenkins can automatically install Maven and Ant.
First, install the Ant Plugin by going to Manage jenkins > Manage Plugin > Available and install the Ant Plugin.
Next go to Manage jenkins > Global tool configuration then add Maven and Ant.
Once a build requires Maven or Ant, they will be downloaded and installed.
Installing your tools directly in the running container is probably a bad idea as changes won't persist. Instead, I see the following options:
Let jenkins manage your tools like proposed by yamenk
Clone the jenkinsci docker repository and build your custom jenkins image including build tools you need
Run build jobs in docker containers
I used option 3 with success just recently:
Run build jobs inside docker containers (look into Jenkins pipeline plugin, or just run it from a shell step)
Each build container has a single responsibility and provides all the tools your build environment needs
Support for different tools and versions is unlimited; new technologies can be added in no time
Another (more tricky) alternative is it to use Docker Containers for your tools.
I can recommend the following two articles:
https://jenkins.io/blog/2016/08/08/docker-pipeline-environments/
https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/

Jenkings on DCOS - Marathon-plugin missing after install

I added the Marathon plugin to Jenkins through the Jenkins management Web UI. It showed up as a list of available plugins to install. I also downloaded the HPI and added the plugin manually. In both cases, the Marathon option doesn't show up in my pipeline config. I'm following the steps here: https://dcos.io/docs/1.7/usage/tutorials/jenkins/#building-a-docker-image-and-deploying-it-to-marathon
Use version mesosphere/jenkins:3.0.1-2.32.2 in combination with persisting your Jenkins data on NFS. Installation and updates of plugins works for me with this combination.
You should consider missing functionality in older versions of Jenkins in DC/OS as described in this thread: https://github.com/mesosphere/dcos-jenkins-service/issues/105
Do you use a NFS share to persist your Jenkins data? In my experience you can not use DC/OS Jenkins properly without persisting Jenkins' data.

Resources