Skip to content
Snippets Groups Projects
Commit 56b63400 authored by N5608's avatar N5608
Browse files

Update .gitlab-ci.yml

parent dc1e770b
No related branches found
No related tags found
Loading
#This declares the pipeline stages
image: node:13.1
stages:
- build
- test
- deploy
cache:
paths:
- node_modules/
build:
stage: build
script:
- npm install
- npm run-script build
tags:
- docker
test:
stage: test
script:
- echo "Running react test suite......"
tags:
- docker
license_management:
stage: test
image:
name: "registry.gitlab.labranet.jamk.fi//gitlab-org/security-products/license-management:$CI_SERVER_VERSION_MAJOR-$CI_SERVER_VERSION_MINOR-stable"
entrypoint: [""]
variables:
SETUP_CMD: $LICENSE_MANAGEMENT_SETUP_CMD
allow_failure: true
build_image:
script:
- /run.sh analyze .
artifacts:
reports:
license_management: $CI_PROJECT_DIR/gl-license-management-report.json
expire_in: 1 week
dependencies: []
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
- docker build -t $CI_REGISTRY_IMAGE .
- docker push $CI_REGISTRY_IMAGE
only:
refs:
- branches
variables:
- $GITLAB_FEATURES =~ /\blicense_management\b/
except:
variables:
- $LICENSE_MANAGEMENT_DISABLED
- master
tags:
- docker
code_quality:
stage: test
image: docker:stable
allow_failure: true
services:
- docker:stable-dind
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
script:
- |
if ! docker info &>/dev/null; then
if [ -z "$DOCKER_HOST" -a "$KUBERNETES_PORT" ]; then
export DOCKER_HOST='tcp://localhost:8080'
fi
fi
- docker run
--env SOURCE_CODE="$PWD"
--volume "$PWD":/code
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.labranet.jamk.fi/gitlab-org/security-products/codequality:12-0-stable" /code
artifacts:
reports:
codequality: $CI_PROJECT_DIR/gl-code-quality-report.json
expire_in: 1 week
when: always
dependencies: []
only:
refs:
- branches
- tags
except:
variables:
- $CODE_QUALITY_ENABLE
tags:
- docker
deploy:
stage: deploy
script:
- echo 'Deploy'
tags:
- docker
- general
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