【问题标题】:create cic cd pipeline for multiple projects for single bitbucket repository in gitlab在 gitlab 中为单个 bitbucket 存储库创建多个项目的 cic cd 管道
【发布时间】:2021-08-01 17:44:42
【问题描述】:

我正在尝试在 gitlab 中为我们的 bitbucket 存储库构建 ci cd 管道。单个 bitbucket 存储库前端(角度)和后端(.net 核心)中有两个项目。我正在尝试为该项目构建 gitlab 管道。但是如何编写 gitlab-ci.yaml 来构建、测试和部署 ci cd 管道。没有为这两个项目编写 .gitlab-ci.yaml 的选项。存储库层次结构如下:

有两个文件夹 web(frontend project-angular) 和 backend(backend project-.net core)

【问题讨论】:

    标签: gitlab continuous-integration devops gitlab-ci continuous-deployment


    【解决方案1】:

    您可以使用parent-child pipelines。

    因此,在您的管道中,您构建前端部分,然后为后端部分调用管道。

    stages:
      - frontend
      - backend
    
    frontend:
      stage: frontend
      script:
        - echo "build frontend"
    
    backend:
      stage: backend
      trigger:
        include:
          - project: 'tutorsinc'
            file: '.build-backend.yml'
        strategy: depend
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-07-31
      • 1970-01-01
      • 1970-01-01
      • 2015-04-09
      • 2021-12-21
      • 1970-01-01
      • 2021-11-17
      • 2023-01-12
      相关资源
      最近更新 更多