From c54fa18b50e7a1c76b1f5fa4a79e7e9782713dd2 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 22 Aug 2022 17:30:23 +0200 Subject: [PATCH] Created .gitlab-ci.yml --- .gitlab-ci.yml | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..48f7067 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,64 @@ +image: node:latest + +stages: + - test + - build + - package + +test_backend: + stage: test + script: + - npm ci + - npm run lint + +test_frontend: + stage: test + script: + - cd frontend + - npm ci + - npm run lint + +build_backend: + stage: build + needs: + - job: test_backend + artifacts: false + script: + - npm ci + - npm webpack + artifacts: + paths: + - dist/ + expire_in: 1h + +build_frontend: + stage: build + needs: + - job: test_frontend + artifacts: false + script: + - cd frontend + - npm ci + - npm run lint + artifacts: + paths: + - frontend/dist/ + expire_in: 1h + +package_server: + stage: package + needs: + - job: build_backend + artifacts: true + - job: build_frontend + artifacts: true + script: + - TMP=$(mktemp -d) + - mv dist/* "$TMP" + - mkdir "$TMP/frontend" + - mv frontend/dist/* "$TMP/frontend" + - rm -r * + - mv "$TMP/*" . + artifacts: + paths: + - .