Can we execute one pipeline from Jenkins and trigger another pipeline with inputdata from previous pipeline? If Yes, will you please provide me how? Answer Yes, you can do that. Let’s say there are two pipeline i.e. jobA and jobB. Let us assume jobA is the upstream pipeline for jobB i.e. jobB will be called or build by jobA with
Tag: jenkins
Maven dependencies are failing with a 501 error
Recently Maven build jobs running in Jenkins are failing with the below exception saying that they couldn’t pull dependencies from Maven Central and should use HTTPS. I’m not sure how to change the requests from HTTP to HTTPS. Could someone guide me on this matter? [ERROR] Unresolveable build extension: Plugin org.apache.maven.wagon:wagon-ssh:2.1 or one of its dependencies could not be resolved:
Running Jenkins Node/Agent as a Windows Service with OpenJDK
I have a Windows virtual machine with OpenJDK 13 installed that I would like to setup as a Jenkins node/agent. When I create the node configuration using the Jenkins UI and select Launch Method: Launch Agent by connecting it to the master it provides a link to download slave-agent.jnlp On a system with the original jdk/jre older than version 9,
How to pass Spring profile to Spring Boot application run by Jenkins Job?
I need to run a Spring Boot app using different configuration files. In local I can do it with the following JVM Option: What’s the way to do this when I run the app from a Jenkins job? Answer With the assumption that user knows .jenkins file, I provide below the code snippet. For more details and reference, check below
Importing internal CA to Jenkins
I’m trying to use a Jenkins job (pipeline) to read some information from a json endpoint and do something based on that information then. The endpoint it is reading from is an internal one and the application is reachable via https with a certificate that is self-signed by our internal CA. Here’s the example code, that is run by the
How to get a jar file from nexus using Jenkins?
I have a Jenkins job which contains 3 parameters: ARTIFACT_ID, GROUP_ID, and APP_VERSION. I would like to use those 3 params to download any specific jar file from Nexus. Note that the Nexus URL is provided in the Jenkins config, so it will automatically know from where to lookup. Do you have an idea how to do that!! For example,
Maven not found in Jenkins
I am running my Maven/Spring project in Jenkins (just testing it out, first time) using the shell script option with: mvn spring-boot:run I get the build error: /Users/Shared/Jenkins/tmp/jenkins8087926087546049217.sh: line 2: mvn: command not found How can I fix this? Its a Spring-boot app. It works fine when I run mvn spring-boot:run via command line. Answer Try this, Navigate to Manage
Maven build fails ONLY when run with jenkins
I have a Java project that is committed to GitHub. The project consists of 3 modules. I have configured the Jenkins Workflow Multibranch Pipeline plugin to build the 3 modules. Maven builds the first 2 modules with no problem. But on the third module I get the following error: I have red that there may be a problem with the
Jenkins CLI connection refused
When executing I’m getting connection refused for some reason. Jenkins version is 1580.3, user has the permissions on Jenkins server, cli jar is up-to-date and ssh public key is configured properly. Any idea what might be causing this? Here’s the stack trace if it will help: Answer If the connection is refused, perhaps the CLI is disabled, but more likely
How to change the JDK for a Jenkins job?
I have imported the jenkins jobs from existing jenkins server from another machine. But the problem is, it has the JDK referenced as per the old machines and I want to change it to use the JDK configured in my new jenkins. But I am unable to find any way of doing this. So, please if you have come across