{"id":20735367,"url":"https://github.com/candoumbe/pipelines","last_synced_at":"2025-04-23T23:43:08.935Z","repository":{"id":61883888,"uuid":"555892705","full_name":"candoumbe/Pipelines","owner":"candoumbe","description":"A starter development kit to CI/CD based on Nuke","archived":false,"fork":false,"pushed_at":"2025-04-09T17:48:23.000Z","size":303,"stargazers_count":8,"open_issues_count":15,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-04-09T18:22:30.072Z","etag":null,"topics":["ci-cd","developer-tools","devexperience","devops"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/candoumbe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-22T15:26:25.000Z","updated_at":"2025-03-31T09:05:55.000Z","dependencies_parsed_at":"2023-02-18T23:31:13.474Z","dependency_job_id":"56c34c4b-f188-4fb0-9459-ea798b21c644","html_url":"https://github.com/candoumbe/Pipelines","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/candoumbe%2FPipelines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/candoumbe%2FPipelines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/candoumbe%2FPipelines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/candoumbe%2FPipelines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/candoumbe","download_url":"https://codeload.github.com/candoumbe/Pipelines/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250535060,"owners_count":21446503,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci-cd","developer-tools","devexperience","devops"],"created_at":"2024-11-17T05:37:23.501Z","updated_at":"2025-04-23T23:43:08.615Z","avatar_url":"https://github.com/candoumbe.png","language":"C#","readme":"# Candoumbe.Pipelines\n\n[![GitHub Workflow Status (main)](https://img.shields.io/github/actions/workflow/status/candoumbe/pipelines/delivery.yml?branch=main\u0026label=main)](https://github.com/candoumbe/Pipelines/actions/workflows/delivery.yml?query=branch%3Amain)\n[![GitHub Workflow Status (develop)](https://img.shields.io/github/actions/workflow/status/candoumbe/pipelines/integration.yml?branch=develop\u0026label=develop)](https://github.com/candoumbe/Pipelines/actions/workflows/integration.yml?query=branch%3Adevelop)\n[![GitHub raw issues](https://img.shields.io/github/issues-raw/candoumbe/pipelines)](https://github.com/candoumbe/pipelines/issues)\n[![Nuget](https://img.shields.io/nuget/vpre/candoumbe.pipelines)](https://nuget.org/packages/candoumbe.pipelines)\n\nA starter development kit to script your CI/CD using [Nuke].\n\n## Give a star\n\n⭐ If you like or are using this project please give it a star. Thanks! ⭐\n\n## Disclaimer\n\nThis project adheres to [semantic versioning]. Major version zero (0.y.z) is for initial development.\n\n**Anything MAY change at any time**.\n\nThe public **API SHOULD NOT** be considered stable.\n\n## The problem\n\nMost of the time, to set up a CI/CD for your .NET project, you have two options :\n\n### 1. **Going through your repository and use its embedded GUI to create the pipeline**\n\nThis approach is nice and helpful to get started. But most of the time, the history of changes made to the pipeline\nis separated from the history of the code base.\n\n### 2. **Writing a pipeline file of some sort**\n\nMost of the time in YAML, the file that describes the steps required to build a project are providers specific.\nSo even though you can write YAML, knowing how to write an Azure DevOps pipeline does not really help when it comes to writing a pipeline for GitHub Actions.\n\n## The solution\n\n[Nuke] is a library written by [Matthias Koch] that helps to create builds.\n\nThis project offers an opinionated way at writing pipelines by giving a set of components (more on that later) with the following benefits :\n\n1. no need to go your code management tool to set up your project CI/CD.\n2. no more YAML file : yeah YAML is great but the tooling is not great and the structure itself is error-prone.\n3. it's just a C# project that every team member can contribute to !\n4. it sits right with your source code so that each change to the pipeline is just a commit into your\ncodebase.\n\n### Try it out\n\nTo get started you'll have to :\n\n1. install [Nuke.GlobalTool] dotnet tool (locally or globally)\n2. run `dotnet nuke :setup` to set up your pipeline project\n3. replace the `Nuke.Common` nuget dependency with [Candoumbe.Pipelines]\n\nFrom this point, you should be able to customize your pipeline by adding [components] \\o/.\n\n### How does it work ?\n\nThis library is built on top of [Nuke], an open source library started by [Matthias Koch].\nIt provides a set of components that, when added to a pipeline, bring clever default features.\n\nComponents are C# interfaces that come with a default / opinionated implementation.\nThey are grouped in namespaces which correspond to their main task.\n\n- `Candoumbe.Pipelines.Components` : contains the core components needed for general required tasks.\n\nLet's say you have the following `Build.cs` class as your starting pipeline\n\n```csharp\nclass Build : NukeBuild\n{\n    public static void Main() =\u003e Execute\u003cBuild\u003e(x =\u003e x.Compile());\n\n    Target Compile =\u003e _ =\u003e _\n        .Executes(() =\u003e {\n\n            // Code omitted for brievity\n\n        });\n}\n```\n\nyou can get rid of the `Compile` property and use the [ICompile] component instead.\n\n```csharp\nclass Build : NukeBuild, ICompile\n{\n    public static void Main() =\u003e Execute\u003cBuild\u003e(x =\u003e ((ICompile)x).Compile());\n\n}\n```\n\nIn the example above, the build pipeline benefits from the [ICompile] component which comes with a default implementation of the `Compile` target.\n\n#### `Candoumbe.Pipelines.Components.Workflows`\n\nThis workspace contains components related to branching strategies and providing tools that can help normalize how teams works.\n\n[IGitFlow] and [IGitHubFlow] are two main components that helps handle branching strategy locally.\n\nSome components are used to set the workflow to use throughout a repository and streamline the work of a developer and a team.\n\n#### working on a feature / hotfix\n\n```mermaid\n%%{init: {\"flowchart\": {\"htmlLabels\": false}} }%%\nflowchart\n    A((start)) --\u003e B[[\"./build feature\"]]\n    A --\u003eO[[\"./build hotfix\"]]\n    O --\u003e P{is on 'hotfix' branch ?}\n    P -- yes --\u003e finish-hotfix\n    P -- no --\u003e Q{{computes semver}}\n    Q --\u003e R{{creates 'hotfix/\u003csemver\u003e' branch}}\n    R --\u003e S[work on your hotfix]\n    S --\u003e T{Are you done}\n    T -- yes --\u003e O\n    T -- not yet --\u003e S\n    B --\u003e C{is on 'feature/*' branch ?}\n    C -- yes --\u003e finish-feature\n    C -- no --\u003e D[Creates a new feature/* branch]\n    D --\u003e E[Work on your feature]\n    E --\u003e F{Are you done ?}\n    F --yes --\u003e B\n    F -- not yet --\u003e E\n\n    subgraph finish-feature[Finish feature]\n      N{{Merges changes to develop branch}}\n    end\n    \n    subgraph finish-hotfix[Finish hotfix]\n       Y{{Merges changes to main branch}}\n    end\n\n    finish-hotfix --\u003e Z\n    finish-feature --\u003e Z((end))\n```\n\nusing [IGitFlowWithPullRequest] or [IGitHubFlowWithPullRequest] components, the library can automagically create\na pull request once you're done working on your feature / hotfix.\n\n```csharp\nclass Build : NukeBuild, IGitFlowWithPullRequest\n{\n    public static void Main() =\u003e Execute\u003cBuild\u003e(x =\u003e x.Compile());\n\n    Target Compile =\u003e _ =\u003e _\n        .Executes(() =\u003e {\n\n            // Code omitted for brievity\n\n        });\n}\n```\n\nor\n\n```csharp\nclass Build : NukeBuild, IGitHubFlowWithPullRequest\n{\n    public static void Main() =\u003e Execute\u003cBuild\u003e(x =\u003e x.Compile());\n\n    Target Compile =\u003e _ =\u003e _\n        .Executes(() =\u003e {\n\n            // Code omitted for brievity\n\n        });\n}\n```\n\ndepending on the workflow that better suits you.\n\n#### working on a release\n\nTo start working on a release, simply call `./build.cmd release` and your pipeline will trigger the appropriate commands to get you started.\n\nCalling `./build.cmd release` from the release branch created will trigger\nthe appropriate command to finish your release.\n\n```mermaid\n%%{init: {\"flowchart\": {\"htmlLabels\": false}} }%%\nflowchart\n    A((start)) --\u003e B[\"./build release\"]\n    B --\u003e C{is on 'release/*' branch ?}\n    C -- no --\u003e create-branch\n    subgraph create-branch[Create a release branch]\n        G{{computes semver version}} --\u003e H{{create release/version branch}}\n    end\n    create-branch --\u003e D[Work on your release]\n    C -- yes --\u003e finish-release\n    D --\u003e E{Are you done ?}\n    E --yes --\u003e B\n    E -- not yet --\u003e D\n\n    subgraph finish-release[Finish release]\n      J[Update changelog] --\u003e K{{validate changelog modifications}}\n      K --\u003e M{{create tag}}\n      M --\u003e N{{Merges changes to main branch}}\n      N --\u003e O{{Merges changes to develop branch}}\n    end\n\n    finish-release --\u003e Z((end))\n```\n\n#### `Candoumbe.Pipelines.Components.NuGet`\n\nContains classes required to push nuget packages to repositories.\n\n#### `Candoumbe.Pipelines.Components.GitHub`\n\nContains classes and components needed to interact with GitHub repositories (creating pull requests).\n\n#### `Candoumbe.Pipelines.Components.Docker`\n\nContains classes and components needed to build and push docker images.\n\n⚠️ **Some components may require additional packages and/or tools to be installed in order to be fully functional.**\n**For example, the default implementation of the [IMutationTest] component uses [`Stryker`](https://nuget.org/packages/stryker) to run mutation tests**.\n\nYou can refer to [Nuke's documentation](https://www.nuke.build/docs/common/cli-tools/) to see how to reference required tools.\n\n### Want to contribute ?\n\nYou can contribute by opening an [issue](https://github.com/candoumbe/Pipelines/issues/new/choose) or submitting a [feature request](https://github.com/candoumbe/Pipelines/issues/new/choose).\n\nPRs are welcome, check out the [contribution guidelines] if you want to contribute to this project !\n\n## Special thanks\n\n- [Matthias Koch] for the marvelous [Nuke] library. This project would never exist without its work.\n\n[Nuke]: https://github.com/nuke/\n[Nuke.GlobalTool]: https://nuget.org/packages/Nuke.GlobalTool\n[Matthias Koch]: https://github.com/matkoch\n[Candoumbe.Pipelines]: https://nuget.org/packages/Candoumbe.Pipelines\n[contribution guidelines]: CONTRIBUTING.md\n[semantic versioning]: https://semver.org/spec/v2.0.0.html\n[ICompile]: ./src/Candoumbe.Pipelines/Components/ICompile.cs\n[IMutationTest]: ./src/Candoumbe.Pipelines/Components/IMutationTest.cs\n[IGitFlow]: ./src/Candoumbe.Pipelines/Components/Workflows/IGitFlow.cs\n[IGitHubFlow]: ./src/Candoumbe.Pipelines/Components/Workflows/IGitHubFlow.cs\n[IGitFlowWithPullRequest]: ./src/Candoumbe.Pipelines/Components/GitHub/IGitFlowWithPullRequest.cs\n[IGitHubFlowWithPullRequest]: ./src/Candoumbe.Pipelines/Components/GitHub/IGitHubFlowWithPullRequest.cs\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcandoumbe%2Fpipelines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcandoumbe%2Fpipelines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcandoumbe%2Fpipelines/lists"}