在 gitlab 中为单个 bitbucket 存储库为多个项目创建 cic cd 管道

create cic cd pipeline for multiple projects for single bitbucket repository in gitlab

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

有两个文件夹 web(前端项目- angular)和后端(后端项目- .net core)

您可以使用 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