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

[KOGITO-2374] Setup Maven repo url #173

Merged
merged 1 commit into from
Jun 10, 2020
Merged

Conversation

radtriste
Copy link
Contributor

@radtriste radtriste commented Jun 4, 2020

https://issues.redhat.com/browse/KOGITO-2374

Consider the given repo-url in local and remote builds.

  • Refactored a bit the way scripts are updating version / env
  • KOGITO_MAVEN_REPO_URL is added if needed to change the default Kogito artifacts url (https://repository.jboss.org/nexus/content/groups/public/).
  • clone-repos.sh is using the configure & settings.xml from kogito-maven

Many thanks for submitting your Pull Request ❤️!

Please make sure your PR meets the following requirements:

  • You have read the contributors guide
  • Pull Request title is properly formatted: [KOGITO-XYZ] Subject
  • Pull Request contains link to the JIRA issue
  • Pull Request contains description of the issue
  • Pull Request does not include fixes for issues other than the main ticket
  • Your feature/bug fix has a testcase that verifies it
  • You've tested the new feature/bug fix in an actual OpenShift cluster

@radtriste radtriste force-pushed the kogito-2374 branch 7 times, most recently from 08fe22c to 643f221 Compare June 5, 2020 07:54
@radtriste radtriste marked this pull request as ready for review June 5, 2020 07:55
@radtriste radtriste force-pushed the kogito-2374 branch 2 times, most recently from 32becbf to 801c8e0 Compare June 5, 2020 08:03
@radtriste radtriste marked this pull request as draft June 5, 2020 12:37
@radtriste radtriste marked this pull request as ready for review June 8, 2020 10:05
@sutaakar
Copy link
Contributor

sutaakar commented Jun 8, 2020

I am not sure that we should use MAVEN_REPO_URL for our JBoss repo.
What will happen in case user will have some domain artifacts built in his own repository and will want to use both JBoss (for common Kogito artifacts) and his own repository in the build?

@radtriste
Copy link
Contributor Author

Good point but the user should use normally the Maven central artifacts by default and not the JBoss ones or ?
Jboss one should be used only for snapshot then.

Another concern is that if we have a staging repository or another repository containing the latest snapshot artifacts and JBoss repo is not yet updated (a mirror repository takes some time for the update...), who has precedence on the other ?
Will I get the latest snapshots ?
Or we should have a way to add and override a KOGITO_MAVEN_URL env ?
and leave the MAVEN_REPO_URL free ?

Another way would be to leverage the MAVEN_REPOS extension

@spolti
Copy link
Member

spolti commented Jun 8, 2020

I am not sure if remove the default repo is a good idea, maybe use -U to force download the latests artifacts?

@radtriste
Copy link
Contributor Author

@spolti yes and no because if I have 2 repositories both with those snapshots, the first one tried and answering ok will give the snapshots, and may be not up to date (mirroring in Maven can take time...)
But maybe I can define a KOGITO_MAVEN_URL with JBoss default which could be overriden ?

btw, for productive images, shouldn't the default repository be Maven central ?

@spolti
Copy link
Member

spolti commented Jun 8, 2020

maybe disable the snapshots on jboss central might be better.

btw, for productive images, shouldn't the default repository be Maven central ?

not really, jboss repo has been in use since beginning cloud effort, if there's a strong reason to change that, we can.

But maybe I can define a KOGITO_MAVEN_URL with JBoss default which could be overriden ?

Even better, we can remove the jboss central from settings.xml and, during build time, if no repo is set at all, we define the default one. this way, no other repo will be added if you correctly set the maven configuration envs

@radtriste
Copy link
Contributor Author

so will go for being able to change default Maven repo via KOGITO_MAVEN_REPO_URL and MAVEN_REPO_URL keeps its old behavior.

@radtriste
Copy link
Contributor Author

@spolti @sutaakar update to KOGITO_MAVEN_REPO_URL done. let me know what you think

@radtriste radtriste force-pushed the kogito-2374 branch 2 times, most recently from 28be97d to 6e7c417 Compare June 8, 2020 16:28
Copy link
Contributor

@sutaakar sutaakar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, one suggestion above.

@radtriste radtriste force-pushed the kogito-2374 branch 2 times, most recently from c58a4b6 to 2b1c83e Compare June 10, 2020 09:57
@radtriste
Copy link
Contributor Author

@spolti @Kaitou786 can you please review ?

@Kaitou786
Copy link
Contributor

@radtriste shouldn't we also change the update-artifacts.pyupdate-maven-information.py in Jenkinsfile-Nightly I know it is deprecated but we are also keeping it in place as the whole nightly is a bit unstable

@radtriste
Copy link
Contributor Author

you are right. Missed it. I will update it.

@radtriste
Copy link
Contributor Author

@Kaitou786 updated, as well as the README

@Kaitou786
Copy link
Contributor

Thanks :)

@spolti spolti merged commit 171c02b into apache:master Jun 10, 2020
@radtriste radtriste deleted the kogito-2374 branch June 11, 2020 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants