Skip to content
Snippets Groups Projects
Commit 6db560f4 authored by Matthias Konitzny's avatar Matthias Konitzny :fire:
Browse files

Gitlab ci now supports automatic builds.

parent 1bac070c
No related branches found
No related tags found
No related merge requests found
Pipeline #49518 failed
...@@ -16,34 +16,35 @@ ...@@ -16,34 +16,35 @@
stages: # List of stages for jobs, and their order of execution stages: # List of stages for jobs, and their order of execution
- test - test
- build - build
- deploy
image: node:latest image: node:latest
cache:
key: $CI_COMMIT_REF_SLUG
paths:
- .npm/
build-job: # This job runs in the build stage, which runs first. before_script:
stage: build - npm ci --cache .npm --prefer-offline
script:
- echo "Compiling the code..."
- echo "Compile complete."
unit-test-job: # This job runs in the test stage.
stage: test # It only starts when the job in the build stage completes successfully.
script:
- echo "Running unit tests... This will take about 60 seconds."
- sleep 60
- echo "Code coverage is 90%"
lint-test-job: lint-test-job:
stage: test stage: test
script: script:
- echo "Linting code with eslint." - echo "Linting code with eslint."
- npm i eslint # - npm i eslint
- node_modules/eslint/bin/eslint.js . - node_modules/eslint/bin/eslint.js .
build-job: # This job runs in the build stage, which runs first.
deploy-job: # This job runs in the deploy stage. stage: build
stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
script: script:
- echo "Deploying application..." - npm run build
- echo "Application successfully deployed." artifacts:
paths:
- release/knowledge-space.zip
# deploy-job: # This job runs in the deploy stage.
# stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
# script:
# - echo "Deploying application..."
# - echo "Application successfully deployed."
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment