Commit ad003380 authored by shRabbit's avatar shRabbit
Browse files

Test-only pipeline: build/publish off by default (component 1.0.5)

parent 212adf4c
Loading
Loading
Loading
Loading
Loading
+2 −26
Original line number Diff line number Diff line
# This file is a template, and might need editing before it works on your project.
# This is a sample GitLab CI/CD configuration file that should run without any modifications.
# It demonstrates a basic 3 stage CI/CD pipeline. Instead of real tests or scripts,
# it uses echo commands to simulate the pipeline execution.
#
# A pipeline is composed of independent jobs that run scripts, grouped into stages.
# Stages run in sequential order, but jobs within stages run in parallel.
#
# For more information, see: https://docs.gitlab.com/ee/ci/yaml/#stages
#
# You can copy and paste this template into a new `.gitlab-ci.yml` file.
# You should not add this template to an existing `.gitlab-ci.yml` file by using the `include:` keyword.
#
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/development/cicd/templates/
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml

stages:          # List of stages for jobs, and their order of execution
  - build
  - test
  - deploy

include:
  - component: $CI_SERVER_FQDN/pipelines/dotnet-build/[email protected].4
  - component: $CI_SERVER_FQDN/pipelines/dotnet-build/[email protected].5
    inputs:
      dotnet_version: "10.0"          # .NET SDK 版本(默认 8.0)
      solution_path: "TestV.sln"      # 你的解决方案路径
      tests_enabled: true            # 开启 dotnet-test,产 JUnit 报告
      publish_enabled: true          # 开启 dotnet-publish,产出 publish/** 目录
      publish_output: "publish"      # 发布输出目录
      stage: build                   # 组件 job 放的 stage
      configuration: Release
      build_artifact_paths: []       # 不保存 build 产物,节省服务器存储
      test_artifact_paths: []        # 不保存 test 产物
      tests_enabled: true            # 只跑测试;构建/发布按需开启