Skip to content

Instantly share code, notes, and snippets.

@maxmckenzie
Created July 13, 2019 09:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxmckenzie/609e7b4d9c954f7003090dcd5faa32bb to your computer and use it in GitHub Desktop.
Save maxmckenzie/609e7b4d9c954f7003090dcd5faa32bb to your computer and use it in GitHub Desktop.
gitlab-ci-yml example config with sonar cube.
image: node:latest
stages:
- build
- test
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
build:
stage: build
variables:
NODE_ENV: development
script:
- npm i && npm run build
artifacts:
paths:
- /build/static
expire_in: 2 weeks
sonar_cube:
stage: test
script:
- npm i sonarqube-scanner -g
- sonar-scanner -Dsonar.host.url=https://sonarcube.seam.es -Dsonar.login=$SONAR_LOGIN -Dsonar.password=$SONAR_PASSWORD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment