Commit 4f32bdaf authored by Jonas Verhoelen's avatar Jonas Verhoelen

initial commit

parent 90201274
image: node:8.12.0
variables:
DOCKER_DRIVER: overlay2
GITLAB_CI_USER_NAME: jverhoelen
stages:
- security-and-setup
- test
- dockerize
# SECURITY CHECKS & SETUP
npm-audit-security-check:
stage: security-and-setup
script: npm audit
retire-security-check:
stage: security-and-setup
script: npm run retire
install-dependencies:
stage: security-and-setup
script: npm install --progress=false --production
cache:
paths:
- node_modules/
# TEST
lint:
stage: test
script: npm run lint
unit-test:
stage: test
script: npm run test
# DOCKERIZE
lint-dockerfile:
stage: build
image: hadolint/hadolint:latest-debian
script:
- hadolint Dockerfile
docker-build-and-push:
stage: build
image: gitlab/dind
script:
- IMAGE_TAG=$CI_REGISTRY_IMAGE:latest
- docker login -u $GITLAB_CI_USER_NAME -p ${PRIVATE_ACCESS_TOKEN_JVERHOELEN} ${CI_REGISTRY}
- docker build --disable-content-trust=false -t $IMAGE_TAG .
- docker push $IMAGE_TAG
only:
- master
v8.12.0
This diff is collapsed.
{
"name": "javascript-secure-pipeline",
"name": "javascript-secure-gitlab-pipeline",
"version": "0.1.0",
"private": true,
"dependencies": {
......@@ -7,11 +7,15 @@
"react-dom": "^16.5.2",
"react-scripts": "2.0.5"
},
"devDependencies": {
"retire": "2.0.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
"eject": "react-scripts eject",
"retire": "./node_modules/.bin/retire -p"
},
"eslintConfig": {
"extends": "react-app"
......
This diff is collapsed.
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