After giving initial admin password in jenkins to Unlock Jenkins i am getting issue - jenkins

As i am trying to install Jenkins on cloud server and i installed that but after installation when it is asking for the /var/lib/jenkins/secrets/initialAdminPassword i am providing that also but after that i should get a plugin page but i am directly coming into Jenkins home page.
I have tried the installing jenkins again but still i am getting this below error.
Jenkins root URL is empty but is required for the proper operation of many Jenkins features like email notifications, PR status update, and environment variables such as BUILD_URL.
Please provide an accurate value in Jenkins configuration.
can any one tell me why this happening.enter image description here

Related

gitlab plugin test connection issue on jenkins

Im having issue with gitlab plugin test connection on jenkins. it gives error when I hit the "test connection" button with the given values.
GitLab user is maintainer and has full access on it. GitLab API token belongs to this user.
unfortunately it seems no way to track this error. I checked the logs files in jenkins machine as well.
GitLab Plugin Version is -> 1.5.27
you may see screenshot of the page here
alternative link:
https://gyazo.com/2b81c4310c7a144651fda54c6b1462c1

Jira trigger plugin for Jenkins doesn't work

I'm trying to use JIRA Trigger Jenkins plugin. I've read maybe all similar issues but can't understand why it doesn't work.
I want to build when an issue status changed. I troubleshooted but it didn't help me. My web hook works I checked it as it shows in documentation, the plugin for Jenkins is installed, firewall checked (I have whitelisted 3 Jira cloud IPs for Jenkins instance on AWS), ssl checks on Jenkins passes. Also I configured logs on Jenkins from Jira, but can't get anything.
In trigger configuration I inserted my Jira user's email (my-email#gmail.com) as user and password. The user has administrator privileges. What else can be wrong? Please any idea.

Jenkins resets username and password in Gerrit\Sonar plugin after autorestart

I use Jenkins with Gerrit-Sonar plugin and face a very weird issue:
I configure the plugin to handle Gerrit REST API with my username\password
When I run the job the first time, it passes, but after it Jenkins goes to auto-restart, saying "Please wait, Jenkins is getting ready to work."
After this my credentials in plugin are reset to default ("jenkins"\"gibberish").
Build fails due to 401 to Gerrit
When I re-save the credentials, they are stored only till the next weird auto-restart.
Has anyone seen this issue before or what could be the cause of it?
Thanks!
It is not an answer for your question, but it may be a workaround: in the 1.0.8 version of Sonar-Gerrit plugin it has become possible to override Gerrit credentials on the plugin level.

SSH errors with Jenkins git plugin

There are lots of question on here about Permission denied (publickey) errors when using the Jenkins git plugin.
Can someone explain the authentication flow this plugin uses to check out a repository? I can't find a good description on the plugin page.
I want to just SSH into the build slave, checkout the repository there, then run my job, but clearly that is not how it works.
I guess I could add my credentials to the jenkins master, but I dont want any code there. I want it on my build slave.
Issue has nothing to do with git really. As their documentation states, it relies on git runtime which in its turn relies on system environment when it comes to secure connections. Ssh requires client to have valid key to connect and fails to that message if client does not provide one. Without any additional actions, key is not injected into environment, so client could not provide any valid key.
What you actually can use is ssh agent plugin. That allows to add key to ssh-agent on slave that will be catched up by git.

Jenkins doesn't verify/review change on Gerrit

I'm trying to configure a local installation of Jenkins to review uploaded changes on Gerrit. So far, I've gotten Jenkins to detect uploaded changes and build them (using Gerrit Trigger). However, while the build concludes successfully on Jenkins, it doesn't post any reviews on Gerrit, even though it is configured to do so. Interestingly, in Gerrit change history, I can see Jenkins having started a build:
Jenkins Patch Set 1: Build Started http://localhost:8080/job/TestProject/70/
but that's it. No results are shown after this, like successful conclusion of the build etc. Since I can see the build started result, I'm assuming I've configured the review settings correctly, but something else is causing a hold up. I've checked in the Gerrit error_log file and it doesn't show any errors. What maybe the issue?
By the way I've been able to verify/review the code as jenkins using the command line.
To make code verification possible, you have to go through the following steps:
Allow label “Verified” on Gerrit server (also see here or here);
Read this and make sure your job configured properly, because you will not build latest changesets instead;
Give access to labels Code-Review and Verified in your Gerrit project for user Jenkins;
I was able to resolve this by adding the 'Verified Label' to the Gerrit Server. The version of Gerrit I used (2.11.3) explicitly asks you to install the Verified Label, and the default option is set at No and as a result I didn't install it. I simply reinstalled my Gerrit, this time choosing Yes on Install Verified Label. If you're facing this issue, simply reinstall your Gerrit. If re-installation is not an option, read this:
http://blog.bruin.sg/2013/04/how-to-edit-the-project-config-for-all-projects-in-gerrit/
Some basic information can be found also in Jenkins plugin
Create the profile through in Gerrit web interface for your Jenkins user, and set up a SSH key for that user.
Gerrit web interface > Admin > Groups > Non-Interactive Users > Add your jenkins user.
Admin > Projects > ... > Access > Edit
Reference: refs/*
Read: ALLOW for Non-Interactive Users
Reference: refs/heads/*
Label Code-Review: -1, +1 for Non-Interactive Users
Label Verified: -1, +1 for Non-Interactive Users

Resources