Nexus connection not happening from jenkins Nexus Platform plugin 3.x - jenkins

I want to integrate jenkins(2.157) with nexus for uploading / downloading artifacts and using Nexus Platform plugin with version 3.3.20190108-134259.b70ae43. When trying to connect to nexus repository manager(3.7) from jenkins using uname and password, its not connecting, resulting in error - Nexus Repository Manager 3.x connection failed.
Gone through similar issues in stackoverflow and jenkins support but no luck.
Expecting Test Connection should be success as a first step when connecting from jenkins.
enter image description here

Related

SonarQube server [http://localhost:9000] can not be reached :Unable to execute SonarQube: Fail to download libraries from server:

Sonarqube dev edition is running in container its accessible through public ip:9000(aws ec2 ubuntu).github apps configuration is valid, added sonar token and sonar host url values as given by sonarqube integration with github actions workflow , No idea why its pointing to localhostenter image description here
issue got resolved when i run my Sonarqube with https and open to public access

How to place an artifact in a remote server and unzip

Hi have requirement to Continous deployment using Jenkins and below are the steps to achieve.
1.Jenkins job download the artifact from Nexus and place it in a remote server
2.Unzip the artifact present in the remote server.
3.Perform Gradle task in remote server
You could try using Ansible maybe https://docs.ansible.com/ansible/latest/modules/copy_module.html
If it is Windows:
https://docs.ansible.com/ansible/latest/modules/win_unzip_module.html
You have modules for every situation:
https://docs.ansible.com/ansible/latest/modules/modules_by_category.html
You could do it with Jenkins, scripting the code, and probably storing the login in the Jenkins credentials.

Jenkins updates using Nexus repo

I have Jenkins server that is not allowed to connect to the internet for security reasons. But Jenkins can connect to our internal Nexus repository. Is there a way to set up a nexus repository as an update server for plugins for Jenkins? If anyone has set this up I would love to see how they did it?
Thanks,

Not able to download war file from artifactory by the link created in jenkins console output log

I have added Artifactory plugin in Jenkins and was trying to move the build to Artifactory with the help of the Jenkins Artifactory plugin. I have created a sample Maven project.
The build creation is successful and I am getting a URL of Artifactory on console output of Jenkins which tells that my build has been sent to Artifactory. If I am clicking the URL it, I should get my war downloaded but this is not happening. I am getting 404.
I am using Jenkins 1.617 and JFrog Artifactory 3.8.0
If I am using jfrog artifactory 2.6.4 its working but with other release its not working.
below is the log
Waiting for Jenkins to finish collecting data
[JENKINS] Archiving /root/.jenkins/jobs/TestJob/workspace/pom.xml to org.ABC/testapp/0.0.1-SNAPSHOT/testapp-0.0.1-SNAPSHOT.pom
[JENKINS] Archiving /root/.jenkins/jobs/TestJob/workspace/target/testapp-0.0.1-SNAPSHOT.war to org.ABC/testapp/0.0.1-SNAPSHOT/testapp-0.0.1-SNAPSHOT.war
channel stopped
Deploying artifacts to http:192.168.X.X:8080
Deploying artifacts of module: org.ABC:testapp
Deploying artifact: http://192.168.X.X:8080/libs-snapshot-local/org/ABC/testapp/0.0.1-SNAPSHOT/testapp-0.0.1-SNAPSHOT.war
Deploying artifact: http://192.168.X.X:8080/libs-snapshot-local/org/ABC/testapp/0.0.1-SNAPSHOT/testapp-0.0.1-SNAPSHOT.pom
Deploying build info to: http192.168.X.X:8080/test/build
I looks like the log output is buggy. The url http192.168.X.X:8080/test/build should, of course, be http://192.168.X.X:8080/test/build.
Please report it in GitHub Jenkins plugin repo.
Thanks!

Jenkins & Artifactory

On a server running ubuntu 12.04 I have installed jenkins 1.532.1 and artifactory 2.6.4.
Both of then are running fine separately. I also have maven 2.
With jenkins, I can build maven java project with sources on subversion.
With maven I can use Artifactory.
The problem is with the artifactory plugin for jenkins.
I added an artifactory server with credentials. Using connection check tell me : "Found Artifactory 2.6.4". It seems to be ok.
But when I create a maven job, in post build actions, I choose Deploy artifacts to artifactory. My server is already selected in the artifactory server but nothing is available in the repositories.
What can I do. Do I have to configure something special in Artifactory ?
I had also this issue, the problem comes from a refresh of Jenkins Plugin.
To deal with that issue, you should:
open your job
add a task for artifactory
save your job
Open again your job
Now you should be able to see your repositories.
Conclusion: You should add/save and reload your job to see your list of repo of artifactory.
I also have this problem, when switching from one artifactory server to another and it looks like a bug for me.
But if I save the settings once without a "non-selectable" repository and access the configuration of the job again, the repositories will be shown.
Ok, so after a very long time I tried again and ... I don't know why but now (I'm quite sure it was not working few months ago) the solution given by aorfevre and user3424040 are working.
I have also upgraded jenkins to 1.565.1 and the artifactory plugin to 2.2.3 and now there is a Refresh Repositories button in the Deploy artifacts to Artifactory task.
For the "Generic-Artifactory Integration" I had to configure Artifactory a bit. I added a group 'deployers' and a user 'deploy' in that group. Also I added a Permission Target for the LOCAL repositories where the group was granted deploy permissions.

Resources