Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
I have the problem to backup jenkins jobs from a Jenkins server that is running in a NAT network in a private cloud. I want to control it from outside from my host machine, as there is my cloned git repository.
My Gruntfile.js has a different IP address and port as Jenkins uses within the private cloud network for its Jenkins slaves.
If I list the jobs, you can see that the response from Jenkins returns a different IP address. That's the internal network for the jenkins swarm clients to connect to.
So the backup will hang as from my host machine I can't connect directly to that internal IP address. The result is this error after a long timeout:
I have changed the code that it reuses the given serverUrl from the Gruntfile.js and patches the responded urls for all jenkins jobs to have a correct url to connect to:
And then also the backup works from my host machine:
The regex in the code replaces the protocol+host+port part and prepends the serverUrl. With that little change, which should work for all other 'normal' scenarios as well, I am even happier about this great automation tool!