In this tutorial, we will go through some of the Tips and Tricks during automating the builds and results.
Mainly, This Article will address some of the issues which we face during setup and configuring Jenkins.
If you want to configure MSbuild using jenkins follow this article.
How to restart the Jenkins?
- Open command prompt with ADMIN privilege
- Go to the installation location of Jenkins <Install-location>\jenkins.exe restart. Default Location is C:\Program Files (x86)\Jenkins
- jenkins --help will list all the options
How to change the Jenkins Port?
- After the installation, just go to the <install-location> and edit the jenkins.xml file and change the port and
- restart jenkins
Where is the .nuget packages restored from on Jenkins job?
- Folder msbuild will check at compile time will be C:\Windows\system32\config\systemprofile\.nuget\packages.
Refer this link for more info.
How to configure the email notifications in jenkins? "Client does not have permissions to send as this sender" Error
- It is IMPORTANT to note that BOTH the "E-mail Notification" section User Name AND the "Jenkins Location" section System Admin e-mail address must be valid smtp.office365.com users.
- If either one is not found in smtp.office365.com, you will get a "Client does not have permissions to send as this sender" error.
System Admin e-mail address:
SMTP server: smtp.office365.com
Use SMTP Authentication: checked
User Name: ValidUser@mydomain.com
Password: [ValidUser's email password]
Use SSL: [UNCHECKED!!]
SMTP Port: 587
- Also, Add these entries in the Jenkins.xml file
How to trigger the email and edit the content, subject of the email?
- Using an administrative account, click on Manage Jenkins option on the left menu and in the new screen click on Configure System on the right column.
- These actions will take you to the configuration page of your Jenkins installation (e.g. http://jenkins:8080/configure).
Scroll down to the category Extended E-mail Notification
From the drop down menu,
- change the value of Default Content Type to HTML (text/html).
- Update the value of Default Subject to [$BUILD_STATUS] - $PROJECT_NAME - Build # $BUILD_NUMBER ($BUILD_ID).
How to change the theme of the Jenkins page?
- Go To Manage Jenkins –> Manage Plugins. Click Available Tab And Search For SimpleTheme Plugin.
- Install the theme and restart Jenkins.
- Go to Manage Jenkins –> Configure and search for Theme configuration and in the CSS field enter the following URL and save it.