Why puppet is not able to download latest from snapshot repo

asked 2015-07-23 02:24:18 -0500

_NN_ gravatar image

We are using Puppet and mCollective for our server deployments. For both of our dev and test environments, we release the artifacts (from two different branches) to the same nexus snapshot repo (we use maven classifier to distinguish between dev and test artifacts). The artifact details look like:

Dev Artifact

<groupId>my.group</groupId>
<artifactId>my-app</artifactId>
<version>1.0-SNAPSHOT</version>
<classifier>dev</classifier>

Test Artifact

<groupId>my.group</groupId>
<artifactId>my-app</artifactId>
<version>1.0-SNAPSHOT</version>
<classifier>test</classifier>

These artifacts are released through two Jenkins jobs. For Puppet/mCollective we use LATEST as the version; however, for some reason it ignores the classifier while determining the latest. What I meant was, lets assume in nexus snapshot repo dev artifact was created at 21-July-2015 1PM GMT and test artifact was created at 21-July-2015 2PM GMT. On server, if we want to do a dev deploy, mCollective agent downloads the test artifact from nexus repo (even after we provide the classifier as dev in puppet configuration).

I see a script download-artifact-from-nexus.sh which I believe is used to download the artifact from nexus repo. This script uses Nexus REST APIs to download the artifact. I am not aware of these REST APIs, but I feel this script does not use maven-metadata.xml which clearly mentions which artifact is latest based on classifier. I am new to puppet/mCollective and not sure how to resolve this. Appreciate if somebody can provide some help.

edit retag flag offensive close merge delete

Comments

Can someone help me? I am kind of blocked.

_NN_ gravatar image_NN_ ( 2015-07-24 04:23:27 -0500 )edit

Can you post your Puppet code that's not working correctly somewhere? It's difficult to tell what's going wrong without more information.

GregLarkin gravatar imageGregLarkin ( 2015-07-24 13:13:44 -0500 )edit