question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reusable Travis CI setup

See original GitHub issue

Thanks for commitlint and for the CI setup tutorial! I like the pre-prepared shell script, which counts with all the possibilities which can happen when using GitHub and Travis CI, but currently I can only use it as part of my project by copy-pasting from the docs.

Since it’s not two lines, but a bunch of them, many if/elses included, I’m wondering whether it would make sense to turn it into a separate package. I want to install commitlint on multiple repositories and I believe being able to do just sth like npm i commitlint-travis --save-dev instead of copy-pasting the script would make the maintenance of the repos easier as well as doing any updates if e.g. Travis CI or GitHub make any changes and the flow breaks.

What do you think? I’m happy to help.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:21 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
felixfbeckercommented, Nov 22, 2017

@honzajavorek what if the PR base is not master?

1reaction
honzajavorekcommented, Nov 7, 2017

So far I came up with following simplification: https://github.com/apiaryio/dredd-transactions/pull/116

#!/bin/bash
set -e
git remote set-branches origin master
git fetch --unshallow --quiet
git checkout master --quiet
git checkout - --quiet
./node_modules/.bin/commitlint --from=master --to="$TRAVIS_COMMIT"

I’m not sure whether this can be further simplified, but it seems to work for all the scenarios when I played with it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Customizing the Build - Travis CI Docs
Builds on Travis CI are configured mostly through the build configuration stored in the file .travis.yml in your repository. This allows your configuration...
Read more >
CI with Travis CI - SymfonyCasts
With the Travis config file in place, the next step is to activate CI for the repo. Go to travis-ci.org and make sure...
Read more >
Reuse (or Lack Thereof) in Travis CI Specifications
Should reuse be ... analysis conducted by GitHub, Travis CI is the most popular ... needs to be installed), notification settings, and scripts...
Read more >
5 Tips to Optimise your Travis CI File | by Jamie Hewland
At Praekelt.org we use Travis CI for almost all of our projects for continuous integration. Because most of the work we do is...
Read more >
Migrate From Travis CI - CircleCI
Orbs: Rather than proprietary integrations, CircleCI offers orbs, which are reusable, templated configuration. On top of connecting to services and tools, orbs ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found