Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

[WIP] Auto-deploy to NPM and S3 using Travis CI #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jankeromnes
Copy link
Contributor

@jankeromnes jankeromnes commented Nov 15, 2018

This is a follow-up to #30. As discussed in #30 (comment), we'd like to automate the deployments to NPM and S3.

This commit is a work-in-progress Travis CI configuration to achieve this.

TODO for NPM:

TODO for S3:

  • same for S3's access_key_id and secret_access_key credentials (might have to ask security first though)
  • figure out how to configure the other S3 options/commands in deploy.sh:
    • --profile code.cdn.mozilla.net
    • s3 cp
    • --acl public-read
    • --cache-control max-age=86400
    • --content-type application/json
    • devices.json
    • s3://code-origin-cdn-mozilla-net/devices/devices.json

@martinbalfanz
Copy link
Collaborator

@jankeromnes maybe an addition: can we make sure that deployment only happens if all tests succeed?

@jankeromnes
Copy link
Contributor Author

jankeromnes commented Nov 19, 2018

maybe an addition: can we make sure that deployment only happens if all tests succeed?

By default, Travis CI runs npm test (i.e. node test.js) first, and only deploys if the first step succeeds. Additionally, I've also set it up to only try to deploy new Git tags, instead of every commit, so you have to manually npm version patch && git push --tags origin master to even attempt a release, and then node test.js needs to succeed for it to work.

We could confirm that assumption by purposefully breaking the tests and trying to deploy. I can help with that if you'd like.

@martinbalfanz
Copy link
Collaborator

Thanks, that sounds good! I can also test this once we get there. Thanks for helping with the setup!

Copy link

@samoyemen samoyemen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants