[JIRA] (JENKINS-61091) Missing deployed artifacts using getGeneratedArtifacts()

已查看 0 次
跳至第一个未读帖子

ricard4each@gmail.com (JIRA)

未读,
2020年2月14日 03:14:052020/2/14
收件人 jenkinsc...@googlegroups.com
Ricard F created an issue
 
Jenkins / Bug JENKINS-61091
Missing deployed artifacts using getGeneratedArtifacts()
Issue Type: Bug Bug
Assignee: Cyrille Le Clerc
Components: pipeline-maven-plugin
Created: 2020-02-14 08:13
Environment: Jenkins 2.204.1
Pipeline Maven Integration Plugin 3.8.2
Labels: maven
Priority: Major Major
Reporter: Ricard F

Hello, 

I'm trying to get all the list of deployed artifacts and save their url to be able to report them, or even to add this information into an artifactory buildinfo object.

I'm using the code statedin the wiki:

 

 

def deployed = ''
 Collection<org.jenkinsci.plugins.pipeline.maven.MavenArtifact> generatedArtifacts = currentBuild.rawBuild.getAction(org.jenkinsci.plugins.pipeline.maven.publishers.MavenReport.class).getGeneratedArtifacts();

 for (org.jenkinsci.plugins.pipeline.maven.MavenArtifact generatedArtifact:generatedArtifacts) {
 if (generatedArtifact.isDeployed()) { }

 

 

The mvn deploy command is currently deploying 4 artifacts (jar, sources, javadoc and pom as 0.6.3-SNAPSHOT), those 4 artifacts are currently archived to jenkins if I do not disable the option, but when going to the list or to the generated artifacts list, I only get 3 downloadable artifacts and 5 in the list (pom is uploaded but missing from the list):

maven-test-0.6.3-20200213.132009-3.jar
maven-test-0.6.3-20200213.132009-3-sources.jar
maven-test-0.6.3-20200213.132009-3-javadoc.jar
maven-test-0.6.3-SNAPSHOT.jar
maven-test-0.6.3-SNAPSHOT.pom

 I assume that if 4 artifacts are deployed to the maven repository, I would get 4 artifacts in the deployedArtifacts list and the link in the maven section should allow to download the 4 of them.

I also don't undestand why in the list there is the jar and pom SNAPSHOT artifacts but not sources and javadoc (I would assume to show them all, or none of them), as in jenkins they are archived as 6.3.0-SNAPSHOT all of them.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

ricard4each@gmail.com (JIRA)

未读,
2020年2月14日 03:15:032020/2/14
收件人 jenkinsc...@googlegroups.com
Ricard F updated an issue
Change By: Ricard F
Hello, 

I'm trying to get all the list of deployed artifacts and save their url to be able to report them, or even to add this information into an artifactory buildinfo object.

I'm using the code statedin the wiki:

 

 
{code:java}

def deployed = ''
Collection<org.jenkinsci.plugins.pipeline.maven.MavenArtifact> generatedArtifacts = currentBuild.rawBuild.getAction(org.jenkinsci.plugins.pipeline.maven.publishers.MavenReport.class).getGeneratedArtifacts();

for (org.jenkinsci.plugins.pipeline.maven.MavenArtifact generatedArtifact:generatedArtifacts) {
if (generatedArtifact.isDeployed()) { }
{code}

 

 

The mvn deploy command is currently deploying 4 artifacts (jar, sources, javadoc and pom as 0.6.3-SNAPSHOT), those 4 artifacts are currently archived to jenkins if I do not disable the option, but when going to the list or to the generated artifacts list, I only get 3 downloadable artifacts and 5 in the list (pom is uploaded but missing from the list):

{color:#0747a6}maven-test-0.6.3-20200213.132009-3.jar{color}
{color:#0747a6}maven-test-0.6.3-20200213.132009-3-sources.jar{color}
{color:#0747a6}maven-test-0.6.3-20200213.132009-3-javadoc.jar{color}

maven-test-0.6.3-SNAPSHOT.jar
maven-test-0.6.3-SNAPSHOT.pom

 I assume that if 4 artifacts are deployed to the maven repository, I would get 4 artifacts in the deployedArtifacts list and the link in the maven section should allow to download the 4 of them.

I also don't undestand why in the list there is the jar and pom SNAPSHOT artifacts but not sources and javadoc (I would assume to show them all, or none of them), as in jenkins they are archived as 6.3.0-SNAPSHOT all of them.
回复全部
回复作者
转发
0 个新帖子