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

feat(release): replace semantic-release dep with Travis build stages #95

Merged
merged 1 commit into from
Sep 1, 2018

Conversation

orangejulius
Copy link
Member

This change moves semantic-release out of dev-dependencies, but keeps
its functionality by calling semantic-release as usual in a release
TravisCI build stage. There are several advantages to this method:

1.) semantic-release is run only after all builds succeed. Our previous
approach could have theoretically run semantic-release when some Node.js
versions failed with the current code
2.) semantic-release (and it's many dependencies) are removed from
node_modules. This increases the speed of npm install in all cases,
and reduces the size of our Docker images by 20MB (from 284MB to 264MB)!
Since the only time semantic-release is needed is on TravisCI anyway, it
seems pointless that every installation of Pelias should include it.
3.) Because semantic-release is not in package.json, Greenkeeper will
not attempt to update it. Semantic release updates very frequently,
and each update attempt seems to have a decent chance of experiencing a
random TravisCI failure, causing unwanted notifications.

This change also lets us configure the script to run in one place, the
new pelias/ci-repo.

Connects pelias/api#1187, where this was first
tried.

This change moves semantic-release out of dev-dependencies, but keeps
its functionality by calling semantic-release as usual in a `release`
TravisCI build stage. There are several advantages to this method:

1.) semantic-release is run only after all builds succeed. Our previous
approach could have theoretically run semantic-release when some Node.js
versions failed with the current code
2.) semantic-release (and it's many dependencies) are removed from
`node_modules`. This increases the speed of `npm install` in all cases,
and reduces the size of our Docker images by 20MB (from 284MB to 264MB)!
Since the only time semantic-release is needed is on TravisCI anyway, it
seems pointless that every installation of Pelias should include it.
3.) Because semantic-release is not in `package.json`, Greenkeeper will
not attempt to update it. Semantic release updates _very_ frequently,
and each update attempt seems to have a decent chance of experiencing a
random TravisCI failure, causing unwanted notifications.

This change also lets us configure the script to run in one place, the
new pelias/ci-repo.

Connects pelias/api#1187, where this was first
tried.
@orangejulius orangejulius merged commit fcd3784 into master Sep 1, 2018
@orangejulius orangejulius deleted the semantic-release-build-stage branch September 1, 2018 18:07
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.

1 participant