Skip to content

Using Travis with Echidna

Marcos Caceres edited this page Mar 25, 2015 · 3 revisions

This pages describes how you can use Travis to securely ping Echidna whenever there's a commit.

For this you will need:

A few notes on the .travis.yml:

  • It says "language: node_js". Ignore that. If you don't specify a language, Travis gives a warning. This is just to silence it.

  • Under branches/only you want to include the branch you are publishing from. I STRONGLY recommend that you publish only from one branch; hence the lines. Also, Travis ignored gh-pages unless you include this.

  • Under env/global you will want to change all three of URL (the URL of your file or manifest), DECISION (the decision to publish), and the weird-looking "secure" line.

The latter "secure" line is actually the encrypted token that you were given to publish with Echidna. It's probably a better idea to encrypt it, as done in the example above. Thankfully, it's very simple.

Basically, you install the travis tool (gem install travis), then run:

travis encrypt TOKEN=your.beautiful.token 

This will respond with: 
```Bash
secure: "some encrypted garbage" 

You can just paste the garbage on that line and it'll work. More details at http://docs.travis-ci.com/user/encryption-keys/.

That's all! With that in place, every commit you make to that branch gets you published in TR. You can see the build status at https://travis-ci.org/USER/REPO (e.g. https://travis-ci.org/w3c/manifest). Note that this can sometimes be slow, but it'll work eventually.

Also note that you won't be told through Travis if Echidna fails. That can only happen later.

As soon as the latest fix is deployed, I encourage you all to start using this. Let's make editors' drafts history!