mapbox / node-cpp-skel

Skeleton for bindings to C++ libraries for Node.js using node-addon-api
Creative Commons Zero v1.0 Universal
72 stars 10 forks source link

Document how to set up credentials for publishing #41

Closed springmeyer closed 7 years ago

springmeyer commented 7 years ago

Context

node-cpp-skel offers a working example for how to create a node c++ module, including scaffolding for critical pieces like publishing the binaries with node-pre-gyp. So, node-cpp-skel is the home to docs on best practices and also a working example.

Need

We need to document how to setup credentials correctly for publishing. The assumption is that the docs will be followed primarily by Mapbox staff, but the could also be used by anyone to publish to any bucket.

TODO:

codecov-io commented 7 years ago

Codecov Report

Merging #41 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #41   +/-   ##
=======================================
  Coverage   97.61%   97.61%           
=======================================
  Files           5        5           
  Lines         126      126           
=======================================
  Hits          123      123           
  Misses          3        3

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update 7b7e678...555553c. Read the comment docs.

daniel-j-h commented 7 years ago

What's the progress here @springmeyer?

I was looking into this today and only found this as a guide on how to generate tokens.

Also there should maybe be a section on how to get the tokens in the node-pre-gyp readme, here: https://github.com/mapbox/node-pre-gyp#travis-automation It describes how to encrypt keys but not how to get the keys in the first place.

springmeyer commented 7 years ago

Update on this:

The next steps here are to:

mapsam commented 7 years ago

@springmeyer I made some edits and have synced with master. Should we attempt to publish a binary from this branch or wait until we're in master?

springmeyer commented 7 years ago

@springmeyer I made some edits and have synced with master.

πŸ™Œ

Should we attempt to publish a binary from this branch or wait until we're in master?

We should test that publishing works. Your call whether this is done before/after merge. Please run this out as you see fit.

One note is that I see a few travis failures that are mysterious:

not ok 2 test exited without ending
  ---
    operator: fail

I think these will have been resolved in master by removing node-pre-gyp from being used dynamically in the require after https://github.com/mapbox/node-cpp-skel/pull/44/files#diff-474b37290c5ca9ae5a02270ddfd00d96. So, I would recommend rebasing this branch against master and making sure travis passes after: git rebase -i master. Hopefully it should. If not, it is still not likely a problem with this branch and we can continue with a merge. Just would be nice to see things green.

mapsam commented 7 years ago

Hey @springmeyer - I synced with master yesterday and rerunning those two tests made them green, not sure why they failed. Looking good now!

We should test that publishing works.

Let's do this once we merge into master, as if we are doing a normal release.

springmeyer commented 7 years ago

Let's do this once we merge into master, as if we are doing a normal release.

πŸ‘ Okay, then please merge this now if you've landed all your edits. πŸŽ‰

I figure there might be glitches when this approach is applied to other repos (say the node-mapnik repo in a different org) but we can make fixes when/if we hit those.