-
Notifications
You must be signed in to change notification settings - Fork 34
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
add a new nexus repository to proxy grade services distribution site #919
Comments
@stitakis Could Gradle be downloaded through an existing repo? Or do none of the current repos distribute Gradle? |
this is super tricky,... especially because you need to pass nexus credentials ... one idea I have though of was to swith to gradle rather than the wrapper - which is already installed on the agent?! |
@clemensutschig not sure about your idea because we only have a certain gradle version on the agent installed. If someone requires a later gradle version or uses old outdated gradle stuff that the installed version does not support anymore their build will fail. |
@michaelsauter I have verified this, gradle could not be downloaded through an existing repo. Apart from this, the current maven repos that are setup in nexus are of format @clemensutschig thanks for the link, it is very useful. I'll test the suggested solution to add the properties Apart from this, it looks to me that in the corporate environment the download of artifacts in build pipelines works. From security point of view this shouldn't be the case. |
@stitakis - we can seed a raw repo - that's not a big deal .. (we do this already with the quickstarter pipeline is not the issue here, but the build pipeline .. (https://github.com/opendevstack/ods-quickstarters/blob/master/be-java-springboot/Jenkinsfile.template#L28) |
yeah, the build pipeline could cause troubles... something like this would work;
With this approach we will be able to inject in @clemensutschig @michaelsauter @renedupont It looks bit tricky for me but doable... what do you think? |
@stitakis looks good so far, the only thing that I'm not sure about yet is the case when someone wants to run it locally and also use nexus. This wouldn't work because the distributionUrl is altered in the Jenkinsfile which is not used locally. Or is this a case we specifically don't want to cover? |
@renedupont well spotted case! There are 2 scenarios for the nexus runs on a local environment:
In the 2nd scenario: once we introduce the new nexus repo proposed by this issue, we could adapt the spring boot quickstarter to modify the |
@stitakis Thinking about it again I'm not quite convinced for the following couple of reasons:
Looking at threads about the same discussion: I don't see a good solution or workaround currently as the My hope and preferred solution would be that they introduce a gradle env var for the Regarding
I am not sure if we will reach the goal to have the quickstarter working locally out of the box this way because nexus settings still need to be configured in |
@renedupont it was quite a long time since I created this ticket... I think, we need first to define the goal we want to achieve and from there find the best suitable solution. From my point of view, every dependency should be downloaded over nexus, also the gradle wrapper.
|
I meant by this, that it would be my prefered solution to this. This is not implemented (as far as I know). |
Maybe gradle/gradle#8477 is of interest here? |
support request +1 |
Problem: missing nexus repository for the gradle service distribution site.
Background:
The spring boot quickstarter uses the gradle wrapper as build tool.
The gradle wrapper downloads the gradle binary from internet.
The url that points to the gradle internet site is defined by the property
distributionUrl
defined ingradle/wrapper/gradle-wrapper.properties
. It current value is:Problem is that developers cannot change this property to point to nexus because a repository for that is missing.
This feature request is for adding automatically on nexus deployment a new repository in nexus that proxies
https://services.gradle.org/distributions
The text was updated successfully, but these errors were encountered: