Jenkins CI clang scan-build with prefix environment - jenkins

I'm using Jenkins CI on Mac Server with clang scan-build plugin.
After I build an iOS app, and run scan-build command, Then the graph will appear on right corner. When I click the edge on the graph, page says "404 Not found" because of the prefix /jenkins is not in URL. How can I fix this issue and it this a bug of this plugin?

Double check the settings of Jenkins Location in the Manage Jenkinstool, under Configure System.
This should be set to the base URL for your Jenkins server, which should include /jenkins/ according to your post. Make sure to leave the trailing slash in the URL.

Related

Azure Devops Specify a shorter path error

We are using the new DevOps build server (on premise) to build a .Net project using the Visual Build Step. When we run the build we get the following error and the build stops during the checkout step:
TF400889: The following path contains more than the allowed 259 characters "long path" Specify a shorter path.
We used to get this error in the older XAML builds but the build continued running. Is there a way to ignore this error in DevOps as well?
build stops during the checkout step. Is there a way to ignore this error in DevOps as well?
No, there is no way to ignore this error. Since it cause the build failed to check out source directory for future tasks.
For this kind of long path issue, the common workaround is to shorten the build path on the server.
For example: instead of \xx\Build\Drop\ProjectName, just use \xx\Build\Drop (or \xx\Builds) since the project name is also in the build name.
Windows imposes the 25x character limit, so if you are running against windows-based agents, you will definitely still run into that. This is not related to XAML or new build system in TFS.
Your best bet would be to refactor you application so it doesn't have long paths but if you are running your agent on windows 2016 or better, you can always try this: https://www.howtogeek.com/266621/how-to-make-windows-10-accept-file-paths-over-260-characters/ (article mentions Windows 10 but it works for Server 2016 also).
Good luck,
Etienne

run sonarQube via jenkins Task 'my-task' does not exist. Please use 'list' task to see all available tasks

I've got a server in work which has sonarQube, Gitlab and jenkins running side by side with Maven also on the box. I have also a project on this box i wish to test with sonarqube (located on this same box in /home/{user}/live/{sitename}/htdocs). I created a job in sonarqube, the only options i had where to call it something and I've no idea how this links to the actual project or where it is expecting to find the project to scan. in jenkins I added build step for sonarqube, again no option on where to find the code. i ran it anyway and to no surprise it failed asking me to use list to see all available, not being funny but where do i do this?
So I have 2 questions really:
where is sonarQube looking for this code, i presume symbolic links are good in this location to the actual code right?
where do i find and use this list command? is this in jenkins or sonarqube?
sonarqube jankins and gitlab are all accessible on our intranet with different default ports (8080, 8008 and 9000) i have the sonarqube scanner plugin on jenkins and it is using maven? Does anyone know of any good tutorials to setup this kind of scenario?
thanks
Craig
Configure your current Job and set below.
Under Build->Execute SonarQube Scanner
Task to run : leave it blank
Path to project properties: Specify your sonar project properties file
path
Before doing above changes make sure that below configurations are set
Jenkins->Manage Jenkins->Sonar Servers
Name:Sonarqube
Server URL: http://localhost:9000/sonarqube
Server authentication token: Generate in SonarQube in specify here
Jenkins->Manage Jenkins->Global Tool Configuration->SonarQube Scanner
SonarQube Scanner installations:
Name: SonarScanner
Install automatically: Tick checkbox
Install from Maven Center: Choose compatible SonarScanner version
I was able to get this working in the end but after upgrading sonarqube we decided to use the new pipelines feature, this took a while to configure but we are now able to do code analysis on our builds, see this link for details

Team Foundation 2015 Environment variable PATH not recognized

I have a TFS 2015 build in which I want to run command 'dotnet restore'. On my build machine, the path to dotnet.exe is part of my environment variable 'Path'. When running the command from command prompt window, it works fine. When trying to run it via a TFS build step of type 'Command line' dotnet is not recognized. My path variable containing dotnet.exe path is at system level, so every users, including the one on which my build agent is running, should see it.
I have tested with TFS 2015.3, after adding dotnet.exe path in Environment Variables and add Command Line step in build definition, dotnet.exe can be recognized in the following setting. You may compare it with yours:
FYI, this is still an issue with TFS 2017 as well. From my tests, it appears TFS doesn't like when the PATH variable is over 900 characters. After shortening the PATH variable and closing the dialog windows, restart the VSO/VSTS agent services and you should see the Path variable appear as a capability for the agent. Hopefully this helps someone else.

MS Build Configuration not be shown on the Jenkins screen

I am trying to introduce continuous integration in the Xamarin.iOS project. I am following the method that is mentioned on the Xamarin website which is given here
https://developer.xamarin.com/guides/cross-platform/ci/jenkins_walkthrough/#Configuring_the_MSBuild_Plugin .
This is the screenshot of what is expected from the process
The problem is that the http://localhost:8080/configure link does not shows the MS Build configuration part in which I need to put the path of the xbuild which is "/Library/Frameworks/Mono.framework/Commands/xbuild" .
I have checked the following things on the Mac:
MS Build has been installed in the jenkins
Xamarin.iOS has been installed.
I have restarted jenkins
I have checked whether the plugin is present in the the location that is mentioned in the application "/Users/username/.jenkins/"
Is there some other way to go about this continuous integration ?
I have used Jenkins_49.zip in order to install it on the Mac
It seems the Xamarin documentation contains an error there. The correct URL is /configureTools, not /configure, i. e. the menu item "Global Tool Configuration".
Maybe the link was correct in an earlier version of Jenkins?

How to automatically login to Jenkins on Active Directory?

I have an Active Directory plugin installed that allows logging in to Jenkins portal with my directory credentials by typing them in on the Login page.
But is there a way to automatically log in users if they are on a domain-joined machine? (Obviously, given the browser is configured to allow providing credentials to the site.)
There's a thread on Jenkins Dev group in which a guy mentions that he developed an SSO plugin that worked for him on Windows. He posted it on GitHub under name NegotiateSSO.
First you need to build it to get the hpi file. (Clone the project to your machine, cd into the directory and run mvn (Maven) in it).
The problem is that when I tried to install it, it broke my Jenkins configuration section/page. There's an exception happening inside the plugin that breaks the entire page.
So it didn't work for me, but hopefully it will get fixed at some point and we'll be able to use it.

Resources