提交 cce72825 创建 作者: 宋海霞's avatar 宋海霞

更新 .gitlab-ci.yml

上级 18e4fb14
...@@ -2,8 +2,9 @@ ...@@ -2,8 +2,9 @@
image: "registry.cn-hangzhou.aliyuncs.com/engintime/ubuntu_16.04_program:latest" image: "registry.cn-hangzhou.aliyuncs.com/engintime/ubuntu_16.04_program:latest"
stages: stages:
- case
- code-analysis - code-analysis
- case1
variables: variables:
...@@ -22,22 +23,10 @@ variables: ...@@ -22,22 +23,10 @@ variables:
- code-analysis - code-analysis
- intranet - intranet
code-analysis:
stage: code-analysis
<<: *codecode-analysis-runner
script:
- make
- mkdir -p build
- cppcheck -v --force --enable=all --xml -I./ ./ 2> ./build/cppcheck-report.xml
- bash -c 'find ./ -regex ".*\.c\|.*\.h" | vera++ -S -s -d -c ./build/vera-report.xml'
- valgrind --xml=yes --xml-file=./build/valgrind-report.xml ./app.exe < input1.txt > /dev/null
- sonar-scanner -Dsonar.projectKey=ProjectKey-$CI_PROJECT_ID -Dsonar.projectName=$CI_PROJECT_NAME -Dsonar.links.homepage=$CI_PROJECT_URL -Dsonar.host.url=$SONAR_URL -Dsonar.login=$SONAR_LOGIN -Dsonar.gitlab.commit_sha=$CI_COMMIT_SHA -Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME -Dsonar.gitlab.project_id=$CI_PROJECT_ID -Dsonar.gitlab.url=$CODECODE_PROTOCOL$CODECODE_DOMAIN
allow_failure: true
only:
- master
case1: case1:
stage: case1 stage: case
<<: *codecode-runner <<: *codecode-runner
script: script:
- python3 local_test.py ci - python3 local_test.py ci
...@@ -45,7 +34,7 @@ case1: ...@@ -45,7 +34,7 @@ case1:
- master - master
teacher-check1: teacher-check1:
stage: case1 stage: case
<<: *codecode-runner <<: *codecode-runner
script: script:
- make - make
...@@ -81,6 +70,19 @@ teacher-check1: ...@@ -81,6 +70,19 @@ teacher-check1:
when: manual when: manual
allow_failure: true allow_failure: true
code-analysis:
stage: code-analysis
<<: *codecode-analysis-runner
script:
- make
- mkdir -p build
- cppcheck -v --force --enable=all --xml -I./ ./ 2> ./build/cppcheck-report.xml
- bash -c 'find ./ -regex ".*\.c\|.*\.h" | vera++ -S -s -d -c ./build/vera-report.xml'
- valgrind --xml=yes --xml-file=./build/valgrind-report.xml ./app.exe < input1.txt > /dev/null
- sonar-scanner -Dsonar.projectKey=ProjectKey-$CI_PROJECT_ID -Dsonar.projectName=$CI_PROJECT_NAME -Dsonar.links.homepage=$CI_PROJECT_URL -Dsonar.host.url=$SONAR_URL -Dsonar.login=$SONAR_LOGIN -Dsonar.gitlab.commit_sha=$CI_COMMIT_SHA -Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME -Dsonar.gitlab.project_id=$CI_PROJECT_ID -Dsonar.gitlab.url=$CODECODE_PROTOCOL$CODECODE_DOMAIN
allow_failure: true
only:
- master
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论