SSH.NET compile Errors through jenkins - visual-studio

I have some issues when try to compile the project using Jenkins. Locally it works fine using SSH.NET, but when I put my code to the windows server 2012R2 and using Jenkins build there. It shows me an error:
"SSH.NET" has already has a dependency defined for "SshNet.Security.Cryptography".
and build fail. Anyone knows what happened in the server side? Why it works locally but has compile errors in the server side?
Thanks

Please check whether your Jenkins installed SSH related plugins. Following screenshot shows the SSH related plugins installed in my Jenkins.
Then please check your Jenkins Configurations whether you configure any SSH related build configurations. In my successful build, I don't choose any SSH related options in build configurations. Please check your Build Configurations based on following screenshot. My project also installed SSH.NET package and it clone from GitHub. Except the project Url and Repositories Url, other options are in the default value.

Related

SonarQube analysis works in IDE but not in Jenkins Pipeline

Which versions am I using (SonarQube, Scanner, Plugin, and any relevant extension):
SonarQube 7.9.1 (on a remote server)
Sonar maven plugin 3.7.0.1746 (in my pom.xml file)
Jenkins 2.222.1 (local server)
Maven 3.6.0
What am I trying to achieve:
I want to perform an analysis with a Jenkins Pipeline with my remote server
What have I tried so far to achieve this :
I have succeed to do an analysis with my IDE (intelliJ) and it works with the command :
mvn -B sonar:sonar
After that, the server note the last analysis with the Quality Gate.
Nevertheless, it does not work with my Jenkins Pipeline.
I do not understand why it works with the IDE and not with Jenkins.
I have put in my pom.xml a sonar.login which is a specific user token. This user has the right to execute an analysis on this particular project. In my ~/.m2/settings.xml, I have put the sonar.host.url.
I also tried to set up manually a SonarQube server in Jenkins (in system configuration). I put there the url and my token thanks to a secret text but it does not work to.
I have also generated a Webhook but this is for the qualitygate variable in the pipeline and I don’t think it matters here.
I don’t know what to test now…
Any idea ?
Thanks
It is ok now : I have added on a sonar installer in the settings. In addition I move the sonar.host.url from ~/.m2/settings.xml to my pom.xml file.

how to do force deploy maven project via jenkins..?

when I do deploy of maven project via jenkins the output says success but i cant see changes on the server. what i can see is the target folder on the jenkins server contain all the required changes but dont know why it is unable to deploy those files on the test server, below are some details.
command to deploy
clean package jboss-as:deploy -DjbossUser=${jbossUser} -DjbossPass=${jbossPass} -DjbossServer=${jbossServer} -DjbossServerPort=${jbossServerPort}
file type that contain the changes : *.html & *.js
Any help is appreciated
Thanks
Kapil
I also faced similar issue. It seems there are some deploy mechanism exists in Jenkins where the version is configured. It should take the build(snapshot) version from pom.xml

execute command mvn clean install failed when integrate with Jenkins

I try to build Jenkins with maven project and in goal I defined: clean install.
But it failed with the below reason:
I try to execute the command mvn clean install in command line but it works fine even with eclipse IDE.
I also check the network and see I can connect successfully.
Any solution in this case.
By default, Jenkins can't access the internet if you are under Proxy. So please configure proxy in jenkins. Here I am attaching a link to configure the jenkins. Hope this helps. If anything comes up, please comment below.

How to integrate maven framework with Jenkins

In order to integrate and run the Selenium Maven project on Jenkins 2.73.3, I set the option(s) as the following images:
Notice Goals and options with clean install; nothing else selected/checked, but Enable triggering of downstream projects.
Notice Install automatically is unchecked.
Jenkins project built successfully without opening any browser that shows any activity.
Please, let me know if there is/are any project setting(s) to solve this issue; i.e.: can we see the Web application run on browser as it does when it's run by the Maven project.
You are using Jenkins from services means you are using installable Jenkins version which not allow opening of any UI invocation.
You need to use jenkins.war
You can download war from below URL:
https://updates.jenkins-ci.org/download/war/
Use below command to start Jenkins server
java -jar jenkins.war --httpPort=9090

How to configure Maven local calling Sonar server?

I have a hudson server.
Everytime I build my project on Hudson, It triggers Sonar on other server to building too.
I checked the configuration on Hudson.
I am following some instructions in here , but seems it is not enough.
I have my setting.xml
And I have this issue:
What is wrong with my configuration or I missing something?
Thank.

Resources