Add linux slave node in the Jenkins

As per best practices, the master node should be only used for storing configuration and backup purposes. Only slaves should be used for build. In this blog post, we’ll discover steps required for adding slave node in the Jenkins farm. Most of these steps will cover how to prepare linux slave server for Jenkins usage. The below commands are for CentOS 7 server but these can be easily translated to other linux distros.

Install Java on the Slave server

Run below command on the server:

sudo yum update
sudo yum install openjdk-8-jre
sudo yum install openjdk-8-jdk

You can check if jvm is installed properly using java -version.Read More »

Securing your Jenkins environment and configure for auditing

In large organization, an application team would be responsible for installing Jenkins and configuring it and other tasks such as creating jobs or workflows or pipelines is done by other users. In a previous blog post, we have learned how to configure user authentication for Jenkins. In this post, we will discover how to secure your Jenkins environment and configure it for proper auditing purposes.Read More »

Configuring backup for Jenkins

Backup configuration is one of the most important tasks associated with Jenkins server. You should always take regular backup of the Jenkins configuration, plugins, jobs and associated job configuration. In Jenkins, all the settings, build logs and archives of the artifacts are stored under the JENKINS_HOME directory. The easiest way is to just make a copy of the directory and whenever the same needs to be used, restore the contents from copy.Read More »

Configure user authentication in Jenkins

In previous blog post, we discussed how to configure Jenkins for first time use. In large organizations, generally there is a separate team to manage and configure Jenkins and there is a separate team to manage and run jobs and do other stuff with it. As such it becomes important that you need to share Jenkins in a secure way with the other users and make sure that it is configured properly. In older versions of Jenkins, users could be authenticated anonymously and were able to do almost anything by default. This is not a default behavior as of now. This blog post is intended to cover how to configure user authentication in Jenkins in variety of ways.Read More »

Install Jenkins and configure for first time use on Windows Server/ Ubuntu/ CentOS

As you might be aware, Jenkins is an open-source software originally forked from Hudson. Jenkins is very much popular in DevOps community as it intends to automate software development part for continuous integration and continuous delivery and supports various source code management tools. There are a number of plugins available to not only build code in different programming languages, but also to execute scripts on various OS platforms, perform automated testing etc. In this post, we’ll explore how to install and setup Jenkins for first time usage on various Operating System platforms.Read More »

The “CompileWorkflowTask” task failed unexpectedly – Jenkins build failure

Consider this scenario:

  1. You have installed Jenkins on a windows server
  2. You are building visual studio project using msbuild plugin in Jenkins
  3. Your build keeps failing with below message:
error MSB4018: The "CompileWorkflowTask" task failed unexpectedly. 
error MSB4018: System.IO.DirectoryNotFoundException: Could not find a part of the 
path 'C:\Windows\system32\config\systemprofile\AppData\Local\Temp\it1lwybv.tmp'. 
error MSB4018: at System.IO.__Error.WinIOError(Int32 errorCode, 
String maybeFullPath) 
error MSB4018: at System.IO.FileStream.Init(String path, FileMode mode, 
FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 
bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, 
Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)

There are two reasons this could happenRead More »