当前位置: 首页 > news >正文

How to run angular CICD on gitlab-runner of wsl?

前提文件

.gitlab-ci.yml, .dockerignore, ci-funcs.sh, Dockerfile, karma.conf.js, nginx.conf, nginx-custom.conf, sonar-project.properties

1.test.ts

const context = require.context('./app/pages', true, /\.spec\.ts$/);

2.sonar-project.properties

sonar.sources=src/app/xxx
sonar.javascript.lcov.reportPaths=coverage/lcov.info

3.karma.conf.js

  coverageIstanbulReporter: {
      dir: require('path').join(__dirname, './coverage'),
      reports: ['html', 'lcovonly', 'text-summary'],
      fixWebpackSourcePaths: true
    },

4.angular.json

   "test": {
      ...,
      "codeCoverage": true
    },

5.config.toml

  [[runners]]
    name = "webapp-angular runner on wsl"
    url = "https://gitlab.xxx.com/"
    token = "..."
    executor = "docker"
    [runners.custom_build_dir]
    [runners.cache]
      [runners.cache.s3]
      [runners.cache.gcs]
      [runners.cache.azure]
    [runners.docker]
      tls_verify = false
      image = "harbor.xxx.com/base_image/alpine:latest"
      privileged = false
      disable_entrypoint_overwrite = false
      oom_kill_disable = false
      disable_cache = false
      volumes = ["/data/gitlab-runner/builds:/builds","/data/gitlab-runner/cache:/cache","/var/run/docker.sock:/var/run/docker.sock"]
      shm_size = 0

6.CI/CD Settings

  Test coverage parsing: Statements.*?(\d+(?:\.\d+)?)%

7.Command

  ng test --no-watch --code-coverage
  sonar-scanner -Dproject.settings=sonar-project.properties

8.Reference

  https://gitlab.xxx.com.cn/xxx/webapp-angular

http://www.lryc.cn/news/427128.html

相关文章:

  • 搭建Java集成开发环境IntelliJ IDEA
  • JS逆向浏览器脱环境专题:事件学习和编写、DOM和BOM结构、指纹验证排查、代理自吐环境通杀环境检测、脱环境框架、脱环境插件解决
  • 驾校预约学习系统--论文pf
  • 交叉编译ARM平台的OpenCV1.0
  • 牛客周赛 Round 56 AK
  • LeetCode 热题 HOT 100 (038/100)【宇宙最简单版】
  • SQLALchemy ORM 的关联关系之 ORM 中的一对一
  • 模型部署 - docker
  • 学懂C++(三十四):深入详解 C++ 高级多线程编程技术中的并发设计模式
  • 大数据产业链图谱_产业链全景图_大数据行业市场分析
  • photonserver 部署相关教程
  • GEE训练:sentinel-1数据的投影、显示和导出
  • 后端学习笔记(七)--MyBatis参数传递
  • uniapp 网络请求自动处理loading
  • 【Solidity】函数的使用
  • 详解golang内存管理
  • C++ 线程 一些同步方式
  • 【开发语言】编译型语言和解释性语言有啥区别?
  • 将A服务器上指定文件夹中的文件,批量同步到B服务器上
  • 2024.8.17
  • 十分钟搭建一个RTMP服务器
  • Spring Boot解决循环注入问题
  • 《数据挖掘》期末考核重点
  • Golang | Leetcode Golang题解之第334题递增的三元子序列
  • HarmonyOs编写一个案例实现一个照片选择(阶段进阶 四种需求 逐一完善)
  • 洗衣机洗衣服一些知识
  • 探索文件系统:高效、可靠的文件管理与访问机制
  • 启程与远征Ⅸ--优化生成式人工智能以满足业务需求的框架
  • canal数据同步工具介绍与应用
  • ubuntu18.04 设置静态地址