2020-03-07 09:54:42 +00:00
|
|
|
image: node:latest
|
|
|
|
|
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- test
|
2020-03-17 13:44:05 +00:00
|
|
|
- deploy
|
2020-03-07 09:54:42 +00:00
|
|
|
|
|
|
|
cache:
|
|
|
|
paths:
|
2020-03-07 14:12:52 +00:00
|
|
|
- smart-hut/node_modules/
|
2020-03-07 09:54:42 +00:00
|
|
|
|
|
|
|
install_dependencies:
|
|
|
|
stage: build
|
|
|
|
script:
|
2020-03-07 11:47:43 +00:00
|
|
|
- cd smart-hut
|
2020-03-07 12:07:32 +00:00
|
|
|
- yarn install
|
2020-03-07 09:54:42 +00:00
|
|
|
artifacts:
|
2020-03-07 11:42:57 +00:00
|
|
|
paths:
|
2020-03-07 14:12:52 +00:00
|
|
|
- smart-hut/node_modules/
|
2020-03-07 09:54:42 +00:00
|
|
|
|
|
|
|
testing_testing:
|
|
|
|
stage: test
|
2020-03-17 13:44:05 +00:00
|
|
|
script:
|
2020-03-07 11:47:43 +00:00
|
|
|
- cd smart-hut
|
2020-03-17 13:44:05 +00:00
|
|
|
- yarn test
|
|
|
|
|
|
|
|
smartHut_deploy:
|
|
|
|
stage: deploy
|
2020-03-17 16:05:27 +00:00
|
|
|
tags:
|
|
|
|
- dind
|
2020-03-17 13:44:05 +00:00
|
|
|
image: docker:latest
|
|
|
|
services:
|
|
|
|
- docker:dind
|
|
|
|
variables:
|
|
|
|
DOCKER_DRIVER: overlay
|
|
|
|
before_script:
|
|
|
|
- docker version
|
|
|
|
- docker info
|
|
|
|
- docker login -u smarthutsm -p $CI_DOCKER_PASS #GiovanniRoberto
|
|
|
|
script:
|
|
|
|
- "docker build -t smarthutsm/smarthut:${CI_COMMIT_BRANCH} ."
|
|
|
|
- "docker push smarthutsm/smarthut:${CI_COMMIT_BRANCH}"
|
|
|
|
after_script:
|
|
|
|
- docker logout
|
2020-03-21 14:34:28 +00:00
|
|
|
only:
|
|
|
|
- dev
|
|
|
|
- master
|