Skip to content
This repository has been archived by the owner on Apr 20, 2022. It is now read-only.

Add functions for downloading artifacts from nexus #150

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

malston
Copy link
Contributor

@malston malston commented Mar 6, 2018

PR covers using the current beta version of the API for Nexus (v3) and the legacy api for Nexus. Still need to create docker images and run through the example pipelines using both versions of Nexus.

@marcingrzejszczak
Copy link
Contributor

Where do we set the type of binary storage from the point of view of the pipeline itself?

@malston
Copy link
Contributor Author

malston commented Mar 6, 2018

So your params would look something like this:

repo-with-binaries: https://nexus.example.com/repository/maven-releases

artifact-repo: nexus-3
artifact-repo-id: maven-releases
nexus-api-base-url: https://nexus.example.com

And params in the pipeline would be declared as:

 ...
  REPO_WITH_BINARIES: ((repo-with-binaries))
  ARTIFACT_REPO: ((artifact-repo))
  ARTIFACT_REPO_ID: ((artifact-repo-id))
  NEXUS_API_BASE_URL: ((nexus-api-base-url))

@marcingrzejszczak
Copy link
Contributor

But the params are env vars. Where do you pass the env var to a concrete function? Maybe you should change the function parameter to retrieve the value from an env var?

@marcingrzejszczak
Copy link
Contributor

I had another look at it (finally) and it looks great but I think we can try sth better (we'll see if it is better indeed). IMO the function params should be used only if sth can change at runtime (e.g. group id, artifact id). The binary storage type - nexus / artifactory is sth that we can set at the beginning as an env variable. That way we won't have to pass them as function parameters, which means that we're not breaking the compatibility and we're hiding such information that there are different types of binary storages.

How about we pass it as an environment variable and reason about this inside pipeline-jvm.sh ?

BTW I really liked the bats tests :) also remember to pull the changes from master cause there were quite a few changes.

@malston
Copy link
Contributor Author

malston commented Jun 28, 2018

That's fair. I didn't see the pattern for function parameters being intended for runtime only variables which makes a lot of sense. I like you're idea of reasoning about the repository inside the pipeline-jvm.sh.

@marcingrzejszczak
Copy link
Contributor

Ping @malston ;)

@marcingrzejszczak marcingrzejszczak removed this from the 1.0.0.M9 milestone Oct 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

2 participants