RiotGamesCookbooks/artifact-cookbook

Error when trying to download a Snapshot version from nexus

Closed this issue · 4 comments

When trying to download a snapshot version from nexus there seems to be a file naming problem. For example, when I try and download library 1.1-SNAPSHOT it does download it but it saves the file using the snapshot timestamp format.

/tmp/kitchen/cache/artifact_deploys/library/1.1-SNAPSHOT/library-1.1-20140210.180346-6.tar.gz

This causes artifact problems and generates this error.

Errno::ENOENT: artifact_deploy[library] (library::default line 43) had an error: 
Errno::ENOENT: artifact_file[/tmp/kitchen/cache/artifact_deploys/library/1.1-SNAPSHOT/library-1.1-SNAPSHOT.tar.gz] (library::none line 582) had an error: 
Errno::ENOENT: No such file or directory - /tmp/kitchen/cache/artifact_deploys/library/1.1-SNAPSHOT/library-1.1-SNAPSHOT.tar.gz

Is there a way to resolve that?

This sounds like it could be a bug (or series of them). I would think that if you redploy a new snapshot, it should have a new SHA, so this cookbook should download it. There must be another spot where its being ignored is my guess.

Just to clarify....

  • This is the initial install, not a redeploy
  • The file is being, the filename is just incorrect

Same issue here,

Errno::ENOENT
-------------
No such file or directory - /var/chef/cache/artifact_deploys/mymodule/trunk-SNAPSHOT/mymodule-trunk-SNAPSHOT-sql.zip
Compiled Resource:
------------------
artifact_file("/var/chef/cache/artifact_deploys/mymodule/trunk-SNAPSHOT/mymodule-trunk-SNAPSHOT-sql.zip") do
 action [:create]
  retries 0
  retry_delay 2
  cookbook_name :*****
  location "my_group:my_artifact:zip:sql:trunk-SNAPSHOT"
[...]
/var/chef/cache/artifact_deploys/mymodule# tree
.
`-- release-SNAPSHOT
    `-- mymodule-trunk-20140311.094813-58-sql.zip

artifact_deploy can't handle maven "-SNAPSHOT" specific version syntax.
The resource seems trying to consider "
-SNAPSHOT" as a full version string and replace it in unzip/untar further steps.
artifact_deploy should assumes "*-SNAPSHOT" version being ''moving version'' and not static one. and then following metadatas to work with good file.

thx

#121 fixes this issue for artifact_deploy.