Update .gitlab-ci.yml file
This commit is contained in:
31
.gitlab-ci.yml
Normal file
31
.gitlab-ci.yml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
stages: # Define the stages of the pipeline.
|
||||||
|
- build
|
||||||
|
#- test
|
||||||
|
- deploy
|
||||||
|
|
||||||
|
install-job: # This job runs in the build stage, which runs first.
|
||||||
|
stage: build
|
||||||
|
image: node:24
|
||||||
|
script:
|
||||||
|
- npm install
|
||||||
|
- npm run build
|
||||||
|
artifacts: # Artifacts are files that are passed between stages.
|
||||||
|
paths:
|
||||||
|
- Web/dist/Web/browser # The 'dist' directory will be available in the next stage.
|
||||||
|
|
||||||
|
lint-test-job: # This job also runs in the test stage.
|
||||||
|
stage: test # It can run at the same time as unit-test-job (in parallel).
|
||||||
|
image: node:24-alpine3.21
|
||||||
|
variables:
|
||||||
|
CHROME_BIN: "/usr/bin/chromium-browser"
|
||||||
|
script:
|
||||||
|
- apk add chromium
|
||||||
|
- npm install
|
||||||
|
- npx ng test --watch=false --browsers=ChromeHeadless
|
||||||
|
|
||||||
|
deploy-job: # This job runs in the deploy stage.
|
||||||
|
stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
|
||||||
|
environment: production
|
||||||
|
script:
|
||||||
|
- echo "Deploying application..."
|
||||||
|
- echo "Application successfully deployed."
|
||||||
Reference in New Issue
Block a user