Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate docker and npm publish part #496

Merged
merged 2 commits into from
Nov 1, 2017
Merged

Conversation

XVincentX
Copy link
Member

@XVincentX XVincentX commented Nov 1, 2017

This PR should hopefully allevieate the amount of work we have to do when we want to
release a new express-gateway version.

It will listen on the master branch and if a new tag with vx.y.z pattern comes in, it will build and publish both npm package and docker images related, and update the 'latest' tag as well.

We need to set both docker and npm credentials through env variables (//cc @kevinswiber )

Unfortunately I can't test this properly without deploying something — so once merged we could give it a try on eg 1.4 or any bug fix that'll come along us.

Connects #495 closes #495

@codecov
Copy link

codecov bot commented Nov 1, 2017

Codecov Report

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

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #496   +/-   ##
=====================================
  Coverage      92%    92%           
=====================================
  Files         219    219           
  Lines        9280   9280           
=====================================
  Hits         8538   8538           
  Misses        742    742

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 45d0c41...84671a4. Read the comment docs.

@@ -20,9 +20,36 @@ jobs:
- run: npm install
- run: npm test

deploy:
docker:
- image: circleci/node:8
Copy link
Contributor

Choose a reason for hiding this comment

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

does it really has to be circleci node ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not really.
Technically it could be any docker image that has got npm; however I decided to reuse the same because

  1. As it has been already downloaded and built, it should start almost immediately.
  2. The deploy job has a transitive dependency on node8 build — therefore it's kind of a natural dependency.

If you have another idea around that feel free to shout them!

Copy link
Contributor

@DrMegavolt DrMegavolt Nov 1, 2017

Choose a reason for hiding this comment

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

I got it, this is image for build process, not for release. good

Copy link
Contributor

@DrMegavolt DrMegavolt left a comment

Choose a reason for hiding this comment

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

LGTM

@XVincentX XVincentX merged commit 64943a2 into master Nov 1, 2017
@XVincentX XVincentX deleted the feature/autodeploy branch November 1, 2017 18:23
gatherchou pushed a commit to yilu-tech/express-gateway that referenced this pull request Jul 29, 2021
…odeploy

Automate docker and npm publish part
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automate release based on tags
2 participants