1

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.

Niranjan
  • 2,601
  • 8
  • 43
  • 54
  • This has nothing to do with puppet and everything to do with your shell script. – Mateusz M. Jul 23 '15 at 13:30
  • The script `download-artifact-from-nexus.sh` is not mine; it is provided by Puppet Labs. – Niranjan Jul 23 '15 at 14:40
  • Is it [this file](https://github.com/cescoffier/puppet-nexus/blob/master/files/download-artifact-from-nexus.sh)? You are using that module then (although it does not seem to be available from the Forge). The script was not provided by Puppet Labs, it's from a third party contributor. You might wish to raise the issue with them. – Felix Frank Jul 24 '15 at 11:15
  • @FelixFrank, yes, perhaps I saw this file from GitHub and misunderstood. Thanks for clarifying. Could you please let me know without this script, how Puppet would have downloaded latest artifacts from nexus? And, yes, I should raise a bug against the script provider. – Niranjan Jul 24 '15 at 16:11
  • 1
    @Niranjan well, Puppet has no native support for `nexus`, so you will have to rely on a module. There are [some alternatives](https://forge.puppetlabs.com/modules?utf-8=%E2%9C%93&sort=rank&q=nexus) available from the Forge. I suggest you try some of them, your mileage may vary. – Felix Frank Jul 24 '15 at 19:26

0 Answers0