This repository was archived by the owner on Dec 15, 2018. It is now read-only.
Conversation
gr2m
reviewed
Jan 2, 2018
| - The job configured with the [latest Node version](https://docs.travis-ci.com/user/languages/javascript-with-nodejs/#Specifying-Node.js-versions) (`node_js: node`). | ||
| - The job configured with the [lts Node version](https://docs.travis-ci.com/user/languages/javascript-with-nodejs/#Specifying-Node.js-versions) (`node_js: lts/*`). | ||
| - The job with the highest node version | ||
| - The job with the highest job number if none of the jobs specify a node version |
Member
There was a problem hiding this comment.
Maybe reference this pull request for further information? I’d add a (see [#42](https://github.com/semantic-release/travis-deploy-once/pull/42)) for people who are confused about rule
gr2m
reviewed
Jan 2, 2018
| 'There is no job in this build defining a node version, please set BUILD_LEADER_ID to define the build leader yourself.' | ||
| ); | ||
| return null; | ||
| logger.log(`There is no job in this build defining a node version, Elect job ${jobs.length} as build leader.`); |
Member
There was a problem hiding this comment.
- , Elect job ${jobs.length}
+ . Electing last job (#${jobs.length}) as build leader
Member
Author
There was a problem hiding this comment.
I made the change suggested, and I ported it on all other occurrences of similar logs
gr2m
approved these changes
Jan 2, 2018
Member
gr2m
left a comment
There was a problem hiding this comment.
just a few comments. If you agree you can make the changes and merge it in
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.
Every Travis images (no matter the language selected) comes with Node and nvm installed.
Currently if there is no job job explicitly defining a Node version we don't select any build leader and the script is never ran anywhere.
That prevent to do something like this:
That config will fails because no job has the
node_jsparam. Even when settingnode_jsintravis.ymlit's not in the config retrieved by the API, as we have the Go version instead.But it's still possible to run some Javascript as Node and nvm are always installed no matter the language selected.
With this PR the config above will run the script
echo scripton the the 4th job after the first 3 jobs are completed, without having to set theBUILD_LEADER_ID.Users can still specify the
BUILD_LEADER_IDto force running on a specific job.