Skip to content
Snippets Groups Projects
Commit c1d85728 authored by Simon Rose's avatar Simon Rose
Browse files

Merge branch 'improve_ci' into 'main'

CE-616: Improve CI pipeline

See merge request !408
parents bb2201aa e127f633
No related branches found
No related tags found
2 merge requests!410CE-616: Merge main into develop, improve CI pipelines,!408CE-616: Improve CI pipeline
Pipeline #165661 passed
......@@ -8,10 +8,7 @@ stages:
- dependencies
- check
- build
- lint
- documentation
- test
- package
- release
- deploy
......@@ -34,30 +31,42 @@ pre-commit:
image: registry.esss.lu.se/ics-docker/pre-commit:latest
script:
- pre-commit run --all-files
build:
stage: build
image: $NODE_IMAGE
script:
- CI=false npm run build
artifacts:
paths:
- build
needs:
- job: dependencies
artifacts: true
lint:
stage: lint
stage: check
image: $NODE_IMAGE
script:
- npm run code-quality
needs:
- job: dependencies
artifacts: true
artifacts:
reports:
codequality: gl-codequality.json
build-image:
stage: build
image: docker:latest
needs:
- job: dependencies
artifacts: true
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build -t $CONTAINER_IMAGE --build-arg REACT_APP_MUI_PRO_LICENSE_KEY=${REACT_APP_MUI_PRO_LICENSE_KEY} .
- docker push $CONTAINER_IMAGE
build-storybook:
stage: documentation
stage: build
image: $NODE_IMAGE
script:
- npm run build-storybook
needs:
- job: dependencies
artifacts: true
artifacts:
paths:
- storybook-static
......@@ -67,26 +76,20 @@ test-components-chrome:
image: $CYPRESS_IMAGE
script:
- CHOKIDAR_USEPOLLING=true WATCHPACK_POLLING=true npx cypress run --component --browser chrome
needs:
- job: dependencies
artifacts: true
artifacts:
when: on_failure
paths:
- cypress/videos
- cypress/screenshots
build-image:
stage: package
image: docker:latest
dependencies: []
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build -t $CONTAINER_IMAGE --build-arg REACT_APP_MUI_PRO_LICENSE_KEY=${REACT_APP_MUI_PRO_LICENSE_KEY} .
- docker push $CONTAINER_IMAGE
release-image:
stage: release
image: docker:latest
dependencies: []
needs:
- build-image
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
......@@ -99,7 +102,8 @@ release-image:
deploy-test:
stage: deploy
image: registry.esss.lu.se/ics-docker/awxkit
dependencies: []
needs:
- build-image
script:
- >
awx job_templates launch deploy-ccce-test
......@@ -114,7 +118,8 @@ deploy-test:
deploy-demo:
stage: deploy
image: registry.esss.lu.se/ics-docker/awxkit
dependencies: []
needs:
- build-image
script:
- >
awx job_templates launch deploy-ccce-demo
......
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