This repository was archived by the owner on Apr 29, 2020. It is now read-only.
Open
Conversation
With installing custom modules first, it's possible to override modules
from package.json.
The use case is dependencies that are not published yet, but are pushed
to some branch already. For example you have made a PR on js-ipfs that
also needs to have a test in interface-ipfs-core updated. You plan to have
this change released in the next version of interface-ipfs-core. So you
already update you package.json of js-ipfs to point to that new release.
If you would do an `npm install` it would fail as that version of
interface-ipfs-core isn't released yet. To make CI work though, you
can pass in the interface-ipfs-core branch that contains this change.
Just click on `Replay` in the classic Jenkins UI and change the
"Main Script" from
javascript()
to
javascript(node_modules: [
'interface-ipfs-core': 'ipfs/interface-ipfs-core#my-updated-tests'
])
Jenkins will now checkout js-ipfs from GitHub and then `npm install`
the custom interface-ipfs-core branch. This will override the
package.json file, so a subsequent `npm install` will work and
install everything else as usual.
Contributor
|
No, I don't think this will work as if you first install the custom version, then install the default ones, it'll override any custom versions. The reason the custom modules are after the normal install, is to override any default versions/modules installed. |
Contributor
Author
|
@victorbjelkholm It does work. I've used that extensively last week. Here's an example:
Without this change it won't work as the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
With installing custom modules first, it's possible to override modules
from package.json.
The use case is dependencies that are not published yet, but are pushed
to some branch already. For example you have made a PR on js-ipfs that
also needs to have a test in interface-ipfs-core updated. You plan to have
this change released in the next version of interface-ipfs-core. So you
already update you package.json of js-ipfs to point to that new release.
If you would do an
npm installit would fail as that version ofinterface-ipfs-core isn't released yet. To make CI work though, you
can pass in the interface-ipfs-core branch that contains this change.
Just click on
Replayin the classic Jenkins UI and change the"Main Script" from
to
Jenkins will now checkout js-ipfs from GitHub and then
npm installthe custom interface-ipfs-core branch. This will override the
package.json file, so a subsequent
npm installwill work andinstall everything else as usual.