Skip to content

Commit

Permalink
build: test npm publish, fix npm ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Dec 14, 2018
1 parent 03cb84a commit 5976d9f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 18 deletions.
44 changes: 27 additions & 17 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
stages:
- build
- image
- image-tag
- publish

# template jobs

Expand Down Expand Up @@ -32,6 +32,16 @@ stages:
DOCKER_HOST: tcp://localhost:2375
IMAGE_TAG: ssube/isolex:$CI_COMMIT_REF_SLUG

.build-node: &build-node
image: apextoaster/node:10.1
tags:
- platform:k8s
- runner:shared
allow_failure: false

before_script:
- echo "${NPM_SECRET}" | base64 -d > ${HOME}/.npmrc

.build-retag: &build-retag
stage: image-tag
script:
Expand All @@ -41,11 +51,8 @@ stages:

# build jobs
build-node:
image: apextoaster/node:10.1
<<: [*build-node]
stage: build
tags:
- platform:k8s
- runner:shared

variables:
GIT_SUBMODULE_STRATEGY: recursive
Expand All @@ -71,23 +78,26 @@ build-image:
- docker build -t $IMAGE_TAG .
- docker push $IMAGE_TAG

# tag releases
tag-latest:
<<: [*branch-deploy, *build-docker, *build-retag]
# publish jobs
publish-image:
<<: [*build-docker, *build-retag]
stage: publish
only:
- tags

dependencies: []
variables:
<<: *vars-docker
IMAGE_SRC: ssube/isolex:$CI_COMMIT_REF_SLUG
IMAGE_DST: ssube/isolex:latest
IMAGE_SRC: ${IMAGE_TAG}
IMAGE_DST: ssube/isolex:${CI_COMMIT_TAG}

tag-version:
<<: [*build-docker, *build-retag]
publish-npm:
<<: [*build-node]
stage: publish
only:
- tags

dependencies: []
variables:
<<: *vars-docker
IMAGE_SRC: ssube/isolex:latest
IMAGE_DST: ssube/isolex:${CI_COMMIT_TAG}
dependencies:
- build-node
script:
- npm publish
13 changes: 12 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
.awcache/
.github/
.nyc_output/

config/
deploy/
node_modules/
Expand All @@ -10,6 +13,14 @@ out/test-*
scripts/
src/
test/
vendor/

.codeclimate.yml
.gitlab-ci.yml
.gitmodules
.mdlrc

Dockerfile
Makefile
tsconfig.json
yarn.lock
yarn-*

0 comments on commit 5976d9f

Please sign in to comment.