From 1b73551209da4d68e33f1e98cfa80a7674307617 Mon Sep 17 00:00:00 2001 From: Martin Heistermann <git@mheistermann.de> Date: Sat, 15 Feb 2025 18:35:33 +0100 Subject: [PATCH] component CI --- .gitlab-ci.yml | 35 +++++++++++++++++++++++++++++++++++ README.md | 14 +++++++++++++- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9ca3d59..66614dd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,15 @@ +stages: + - builder-container + - component + - test + - release + +include: + # include the component located in the current project from the current SHA + - component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/vs22-cmake@$CI_COMMIT_SHA + inputs: + stage: component + .template-docker-windows: tags: - cgg @@ -58,4 +70,27 @@ x64-vs2022: # TOOLSET: "v142" # 142: VS 2019 # TOOLSET: "v143" # 143: VS 2022 +ensure-job-added: + stage: test + image: badouralix/curl-jq + script: + - | + route="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/pipelines/${CI_PIPELINE_ID}/jobs" + count=`curl --silent "$route" | jq 'map(select(.name | contains("component job of vs22-cmake"))) | length'` + if [ "$count" != "1" ]; then + echo "Count $count" + exit 1; else + echo "Component Job present" + fi +# If the pipeline is for a new tag with a semantic version, and all previous jobs succeed, +# create the release. +create-release: + stage: release + image: registry.gitlab.com/gitlab-org/release-cli:latest + script: echo "Creating release $CI_COMMIT_TAG" + rules: + - if: $CI_COMMIT_TAG + release: + tag_name: $CI_COMMIT_TAG + description: "Release $CI_COMMIT_TAG of components repository $CI_PROJECT_PATH" diff --git a/README.md b/README.md index 9dec37e..53b13cc 100644 --- a/README.md +++ b/README.md @@ -1 +1,13 @@ -visual studio based CI builds. +# BuildBox-Windows (experimental) + +## Containers + +- VS 2022 based on servercore:ltsc2022 container + +## Components + +This project also publishes CI components to build cmake based projects. + +### vs22-cmake + +- ninja and msbuild based build -- GitLab