From 63bfe4c6b9c693e9de5d542ecd1bea817a6c6697 Mon Sep 17 00:00:00 2001 From: Vladimir Volek Date: Mon, 22 Oct 2018 13:04:16 +0200 Subject: [PATCH] Build app using gitlab 2 --- .gitlab-ci.yml | 64 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 48 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bb3ca3f9..804b0445 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,30 +1,62 @@ image: node:8 +cache: + paths: + - node_modules + before_script: - yarn install -build site: - stage: build - script: - - yarn install --progress=false - - yarn run build - artifacts: - expire_in: 1 week - paths: - - build +stages: + - test + - build + - deploy -cache: - paths: - - node_modules/ +lint: + stage: test + script: + - yarn run lint flow: + stage: test script: - yarn run flow -test:lint: +test: + stage: test script: - - yarn run lint + - yarn run test -test:unit: +build-development: + stage: build script: - - yarn run test + - yarn run build:dev + artifacts: + expire_in: 1 month + paths: + - build/dev + +build-beta: + stage: build + script: + - yarn run build:beta + artifacts: + expire_in: 1 month + paths: + - build/beta + +build-production: + stage: build + script: + - yarn run build:prod + artifacts: + expire_in: 1 month + paths: + - build/production + +deploy_dev: + stage: echo "Deploy dev" + +deploy_staging: + stage: deploy + script: echo "Deploy staging" \ No newline at end of file