From a16623d982fc9f24f0f3e917f73c9791f15e640e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wo=C5=BAniak?= Date: Wed, 21 Oct 2020 18:42:07 +0200 Subject: [PATCH] Added gitlabci MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcin Woźniak --- .gitlab-ci.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..82396a2 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,37 @@ +tages: + - build + - test + - deploy + +build: + stage: build + image: node + script: + - echo "Start building App" + - npm install typescript + - npm install + - npm audit fix + - npm run build + - echo "Build successfully!" + artifacts: + expire_in: 1 hour + paths: + - build + - node_modules/ + +test: + stage: test + image: node + script: + - echo "Testing App" + - CI=true npm test --passWithNoTests + - echo "Test successfully!" + +deploy_production: + stage: deploy + script: + - echo "Deploying to server" + - rsync --progress -r build/* --delete root@35.207.132.68:/var/www/plannaplan.pl + - echo "Deployed" + only: + - master