Skip to content

Commit

Permalink
#docker : build docker cli-publisher and update travis script
Browse files Browse the repository at this point in the history
  • Loading branch information
thomrick committed Jan 24, 2018
1 parent 210e175 commit 5abd68d
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
registry=https://registry.npmjs.org/
registry=https://registry.npmjs.org/
25 changes: 13 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
language: node_js
node_js:
- "8"
sudo: required
dist: trusty
group: deprecated-2017Q4
services:
- docker

jobs:
include:
- stage: test
script: npm test -s
- stage: build
script: npm run -s build
before_install:
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce

script: docker build -t nestjs/cli-publisher --build-arg NPM_TOKEN=$NPM_TOKEN .

deploy:
skip_cleanup: true
provider: npm
email: $NPM_USER_MAIL
api_key: $NPM_API_TOKEN
provider: script
script: docker run nestjs/cli-publisher
on:
branch: master
tags: true
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM node:carbon-alpine as bootstrap
ARG NPM_TOKEN
WORKDIR /usr/local/app
COPY . .
RUN npm install
RUN npm install && echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}">>.npmrc

FROM node:carbon-alpine as tester
WORKDIR /usr/local/app
Expand All @@ -13,3 +14,8 @@ WORKDIR /usr/local/app
COPY --from=bootstrap /usr/local/app .
RUN npm run -s build

FROM node:carbon-alpine as publisher
WORKDIR /usr/local/app
COPY --from=builder /usr/local/app .
ENTRYPOINT ["npm", "publish"]

20 changes: 0 additions & 20 deletions Vagrantfile

This file was deleted.

6 changes: 0 additions & 6 deletions bootstrap.sh

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nestjs/cli",
"version": "2.0.0-rc1",
"version": "2.0.0-rc.1",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand Down

0 comments on commit 5abd68d

Please sign in to comment.