Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
boco-frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
idatt2106_2022_02
boco-frontend
Commits
d261177d
Commit
d261177d
authored
2 years ago
by
Erik Borgeteien Hansen
Browse files
Options
Downloads
Patches
Plain Diff
try something new
parent
d1086735
No related branches found
No related tags found
1 merge request
!31
Cicd
Pipeline
#176665
failed
2 years ago
Stage: install
Stage: build
Stage: quality
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+135
-13
135 additions, 13 deletions
.gitlab-ci.yml
with
135 additions
and
13 deletions
.gitlab-ci.yml
+
135
−
13
View file @
d261177d
#
image
:
node:lts-alpine
# https://gitlab.com/gitlab-org/gitlab/-/tree/master/lib/gitlab/ci/templates/Nodejs.gitlab-ci.yml
#
image
:
node:latest
# Cache modules in between jobs
stages
:
cache
:
-
install
key
:
$CI_COMMIT_REF_SLUG
-
build
paths
:
-
quality
-
.npm/
# - deploy
-
audit
before_script
:
variables
:
-
npm
ci --cache .npm --prefer-offline
npm
_config_cache
:
"
$CI_PROJECT_DIR/.npm"
test_async
:
install
:
stage
:
install
script
:
script
:
-
npm run test:unit
-
npm ci
\ No newline at end of file
artifacts
:
name
:
"
artifacts"
untracked
:
true
expire_in
:
60 mins
paths
:
-
.npm/
-
node_modules/
build
:
stage
:
build
script
:
-
CI=false npm run build
artifacts
:
paths
:
-
build
expire_in
:
60 mins
dependencies
:
-
install
linting
:
stage
:
quality
script
:
-
npm run lint
dependencies
:
-
install
test:unit
:
stage
:
quality
script
:
-
npm run test:unit
dependencies
:
-
install
coverage
:
/All files[^|]*\|[^|]*\s+([\d\.]+)/
# test:e2e:
# stage: quality
# image: cypress/browsers:chrome69
# dependencies:
# - install
# - build
# script:
# - npm run e2e:ci
# artifacts:
# paths:
# - cypress/screenshots
# - cypress/videos
# expire_in: 1 day
# .deploy:
# stage: deploy
# before_script:
# - npm install -g firebase-tools
# - (if [ -d "build" ]; then echo ok; else exit "no build folder, try to run pipeline again"; fi);
# script:
# - firebase deploy --token $FIREBASE_TOKEN --non-interactive --only hosting:$ENV
# when: manual
# deploy_to_alpha:
# environment:
# name: alpha
# url: $ALPHA_URL
# extends: .deploy
# variables:
# ENV: alpha
# except:
# - develop
# - main
# deploy_to_beta:
# environment:
# name: beta
# url: $BETA_URL
# extends: .deploy
# variables:
# ENV: beta
# only:
# - develop
# deploy_to_prod:
# environment:
# name: prod
# url: $PROD_URL
# extends: .deploy
# variables:
# ENV: prod
# only:
# refs:
# - main
.lighthouse
:
image
:
markhobson/node-chrome
stage
:
audit
before_script
:
-
npm i -g lighthouse
script
:
-
lighthouse --chrome-flags="--headless --no-sandbox" $LIGHTHOUSE_TEST_URL --output html --output-path ./report.html
artifacts
:
paths
:
-
./report.html
expire_in
:
1 week
when
:
manual
# run_lighthouse_alpha:
# extends: .lighthouse
# variables:
# LIGHTHOUSE_TEST_URL: $ALPHA_URL
# except:
# - develop
# - main
# run_lighthouse_beta:
# extends: .lighthouse
# variables:
# LIGHTHOUSE_TEST_URL: $BETA_URL
# only:
# - develop
run_lighthouse_prod
:
extends
:
.lighthouse
variables
:
LIGHTHOUSE_TEST_URL
:
$PROD_URL
only
:
-
main
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment