-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgitlab-ci-node-14.yml
More file actions
36 lines (31 loc) · 1.22 KB
/
gitlab-ci-node-14.yml
File metadata and controls
36 lines (31 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
image:
name: 'registry-gitlab.gog.com/docker/nodejs:14-slim-chrome'
build:
script:
- npm ci
- npm run ci:branch
except:
- master
publish:
script:
- npm ci
- echo //$NPM_REGISTRY/:_authToken="$AUTH_TOKEN">.npmrc
- npm run ci:master
only:
- master
sonarqube:
only:
- master
stage: test
allow_failure: true
script:
- docker pull registry-gitlab.gog.com/docker/sonar-scanner
- docker run --rm -i -v "${PWD}":/data/application -v "${PWD}/sonar-project.properties":/root/sonar-scanner-linux/conf/sonar-scanner.properties registry-gitlab.gog.com/docker/sonar-scanner sonar-scanner
sonarqube-merge-request:
except:
- master
stage: test
allow_failure: true
script:
- docker pull registry-gitlab.gog.com/docker/sonar-scanner
- docker run --rm $(env | grep -i gog | awk '{print "-e "$$1}') -i -v "${PWD}":/data/application -v "${PWD}/sonar-project.properties":/root/sonar-scanner-linux/conf/sonar-scanner.properties registry-gitlab.gog.com/docker/sonar-scanner sh -c "/root/sonar-scanner-linux/bin/sonar-scanner -Dsonar.analysis.mode=preview -Dsonar.gitlab.commit_sha=${CI_COMMIT_SHA} -Dsonar.gitlab.ref_name=${CI_COMMIT_REF_NAME} -Dsonar.gitlab.project_id=${CI_PROJECT_PATH}"