jfrog / jenkins-artifactory-plugin

Jenkins artifactory plugin
http://jenkins-ci.org/
115 stars 186 forks source link

rtMavenRun delayed for a minute before executing maven #883

Open tginiotis-at-work opened 11 months ago

tginiotis-at-work commented 11 months ago

I have a Jenkinsfile that is roughly:

docker.image(dockerImageName).inside() {
    rtMavenRun(
        pom: 'pom.xml',
        goals: "...",
        opts: "...",
        resolverId: '...'
        deployerId: '...'
    )
}

docker.image(dockerImageName).inside() {
    rtMavenRun(
        pom: 'pom.xml',
        goals: "...",
        opts: "...",
        resolverId: '...'
        deployerId: '...'
    )
}
...

I.e. multiple rtMavenRun invocations in different docker containers one after another.

Each rtMavenRun invocation the Jenkins log almost immediately shows:

Executing command: /bin/sh -c git log --pretty=format:%s -1
Jenkins Artifactory Plugin version: 3.18.9
Couldn't find Maven home at /usr/share/maven on agent JNLP4-connect connection from 10-194-46-29.felix-metrics-svc.kube-system.svc.cluster.local/10.194.46.29:21664. This could be because this build is running inside a Docker container.
Artifactory integration is enabled

and then seemingly pauses for a minute. After a minute it continues with executing maven.

I have noticed that the minute delay does not happen if rtMavenRun is executed again in the same docker container.

What is rtMavenRun doing on first execution in a container that takes a minute before mvn is even executed? Is there some way to work around the delay? As in save and pass in some state or disable something?