speckleworks / SpeckleServer

Check a brand new Speckle at: https://github.com/specklesystems
http://speckle.systems
MIT License
110 stars 29 forks source link

feat(continuous deployment): implement semantic-release #141

Closed AntoineDao closed 5 years ago

AntoineDao commented 5 years ago

Semantic-release now creates github releases and deploys new versioned docker containers.

This PR proposed we start using semantic release as discussed in #131 in order to automatically deploy versioned containers (it will also create github releases automatically based on commit messages).

If this is something we are happy to merge then the following must be done:

  1. Add secure env vars for GH_TOKEN and DOCKER_PASSWORD (for @botsalot ) here. I don't have access to the appveyor settings so cannot do it unfortunately
  2. The hardest part => Convince all the people contributing to SpeckleServer to start using Angular commit style so versions get bumped automatically and release notes get generated by semantic-release. Following this commit style is really easy if using comittizen, which can be installed running the following command:
    npm install -g commitizen cz-conventional-changelog && echo '{ "path": "cz-conventional-changelog" }' > ~/.czrc

Commits can then be made by typing the following command on your command line:

git add .
git cz
# Follow comittizen prompts

solves #131

AntoineDao commented 5 years ago

Please feel free to pull in anyone who is relevant to this conversation 😄

didimitrie commented 5 years ago

I haven't forgotten about this, it's just a pain recently to make time for this. We need to ping @mswaidan for sure, and any other server maintainers out there. will do on slack...

AntoineDao commented 5 years ago

No rush and no worries. I'd talked about it in that issue and only just got around to pinging a proposed fix for it. If anyone's interested in getting a feel for what semantic release looks like in practice check out some of the ladybug tools repos. Honeybee, Ladybug, Dragonfly for example all use it (courtesy of yours truly!)

mswaidan commented 5 years ago

I'm on board

didimitrie commented 5 years ago

Cool, then i think we can go ahead. @AntoineDao, i've invited you to the the org team on appveyor. i've installed commitizen, and it seems fine. A question: would this be worth it?

Or something on the lines of :)

AntoineDao commented 5 years ago

I haven't set it up as a Dev dependency before but it seems worth it judging by this article

AntoineDao commented 5 years ago

I'll do it just now after setting up appveyor.

AntoineDao commented 5 years ago

Right, that's the appveyor.yml file fixed. Please someone double check I didn't break anything in the process :see_no_evil: I have also added the required env vars to the appveyor config so if we merge this into master we should be good to go! (famous last words...)

didimitrie commented 5 years ago

let's find out what breaks :)

AntoineDao commented 5 years ago

Somehow env vars aren't happening... BOOO! I'll set them up outside of the appveyor file and see what gives.

didimitrie commented 5 years ago

yeah, was just fiddling with that now, but need to run to work. Somehow it fails at the npm publish moment, which is actually not really needed (i was trying to see how we can skip that step)