Commit c1d0b332 authored by Christopher Mark Fullarton's avatar Christopher Mark Fullarton

Merge branch 'pipeline-caching' into 'master'

Pipeline caching

See merge request !2
parents a540a405 5281378d
stages:
- install
- test
- build
- deploy
tslint:
cache:
paths:
- node_modules
npm_install:
stage: install
tags:
- nodejs
script:
- npm install
ts_lint:
stage: test
tags:
- nodejs
script:
- npm install tslint typescript
- node_modules/tslint/bin/tslint -c tslint.json -p tsconfig.json
npmtest:
npm_test:
stage: test
tags:
- nodejs
......@@ -20,18 +31,17 @@ npmtest:
- echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
- apt-get -y update
- apt-get -y install google-chrome-stable
- npm install
- npm test
build:
stage: build
only:
- master
- pipeline-caching
tags:
- nodejs
script:
- echo $STAGING_SERVER_ENDPOINTS > src/assets/serverEndpoint.json
- npm install
- npm run build:SSR
artifacts:
paths:
......@@ -52,4 +62,3 @@ deploy:
- ssh-keyscan "$STAGING_FRONTEND_URL" >> ~/.ssh/known_hosts
- ssh-add <(echo "$STAGING_SSH_PRIVATE_KEY")
- scp -r dist/* "$STAGING_FRONTEND_SCP_URL"
......@@ -8,22 +8,22 @@
},
"description": "Version 2 of arsnova.click (Frontend WebApp)",
"scripts": {
"ng": "ng",
"ng": "./node_modules/.bin/ng",
"start:SSR": "cd dist && node server",
"start:DEV": "ng serve --host 0.0.0.0 --port 4200 --disable-host-check --aot",
"build:DEV": "ng serve --host 0.0.0.0 --port 4200 --disable-host-check --aot --prod",
"start:DEV": "npm run ng serve --host 0.0.0.0 --port 4200 --disable-host-check --aot",
"build:DEV": "npm run ng serve --host 0.0.0.0 --port 4200 --disable-host-check --aot --prod",
"build:SSR": "npm run build:PROD && npm run purify && npm run build:SERVER && npm run webpack:SERVER",
"build:SERVER": "ng run frontend:server",
"build:PROD": "ng build --prod",
"build:PROD-STATS": "ng build --prod --stats-json",
"build:SERVER": "npm run ng run frontend:server",
"build:PROD": "npm run ng build --prod",
"build:PROD-STATS": "npm run ng build --prod --stats-json",
"bundle-report": "webpack-bundle-analyzer dist/browser/stats.json",
"webpack:SERVER": "webpack --config webpack.server.config.js --progress --colors",
"test": "ng test --browsers=ChromeHeadless --watch=false --source-map=false",
"test:DEV": "ng test --browsers=Chrome --karma-config=src/karma.conf.dev.js --source-map=false",
"test:DEV:HEADLESS": "ng test --browsers=ChromeHeadless --karma-config=src/karma.conf.dev.js --source-map=false",
"lint": "ng lint",
"test": "npm run ng test --browsers=ChromeHeadless --watch=false --source-map=false",
"test:DEV": "npm run ng test --browsers=Chrome --karma-config=src/karma.conf.dev.js --source-map=false",
"test:DEV:HEADLESS": "npm run ng test --browsers=ChromeHeadless --karma-config=src/karma.conf.dev.js --source-map=false",
"lint": "npm run ng lint",
"pree2e": "webdriver-manager update --standalone false --gecko false",
"e2e": "ng e2e --no-webdriver-update",
"e2e": "npm run ng e2e --no-webdriver-update",
"purify": "node purifycss.js",
"compress": "gzip dist/browser/** -r",
"http-startup": "http-server dist/browser/ -p 4711 --gzip",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment