Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make $version and $revison unnecessary #18

Open
tmclaugh opened this issue May 7, 2014 · 2 comments
Open

Make $version and $revison unnecessary #18

tmclaugh opened this issue May 7, 2014 · 2 comments

Comments

@tmclaugh
Copy link
Contributor

tmclaugh commented May 7, 2014

When realizing the nexus class a version and revision parameter must be passed. Those values are used to construct the download URL and determine the name of the directory the application was extracted to. This means that the Nexus module does not work OOB and requires configuration and heading to the Nexus website on the first try to figure out the version and revision. Additionally, that information is found on the download archive page and not the main page.

I'd like to instead default version and revision to 'latest'. When version is set to latest it will download from the following URL:
http://download.sonatype.com/nexus/oss/nexus-latest-bundle.tar.gz

If version is set to a version and revision is still latest it will download from the following URL:
http://download.sonatype.com/nexus/oss/nexus-${version}-bundle.tar.gz

If both version and revision are set it will download from the following URL:
http://download.sonatype.com/nexus/oss/nexus-${version}-${revision}-bundle.tar.gz

An inline function will then determine the version that was downloaded and set $full_version in nexus::package appropriately.

Thoughts @Saheba and @sstarcher?

@tmclaugh tmclaugh self-assigned this May 7, 2014
@sstarcher
Copy link

The only caveat to latest and version when not specifying the revision is that it will require you to re-download the tar.gz to assess the version and check for updates, but I would say that's a reasonable drawback and if that is not desired a person could always specify version and revision.

@tmclaugh
Copy link
Contributor Author

tmclaugh commented May 7, 2014

We can prevent the resource from flapping so long as we create a file to satisfy the wget::fetch resource's destination value. If we fetch 'http://download.sonatype.com/nexus/oss/nexus-latest-bundle.tar.gz' then we'll download nexus-2.8.0-05-bundle.tar.gz. We could symlink nexus-latest-bundle.tar.gz to nexus-2.8.0-05-bundle.tar.gz then. We should also probably default version to 'present' instead of 'latest'. Maybe 'present' creates the symlink while 'latest' doesn't and flaps on every run.

@tmclaugh tmclaugh removed their assignment Feb 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants