3838 # Additional properties to be passed to the scanner.
3939 parameters : >-
4040 -d:sonar.exclusions='**/obj/**,**/bin/**'
41- -d:sonar.sources='src/'
42- -d:sonar.tests='test/'
4341` ` `
4442
4543### Outputs
@@ -61,205 +59,30 @@ steps:
6159 version : ${{ needs.build.outputs.version }}
6260` ` `
6361
64- ### Sample workflow for .NET Class Library
62+ ## Caller workflows to showcase the Codebelt experience
6563
66- ` ` ` yaml
67- name : Generic CI/CD Pipeline (.NET Library)
68- on :
69- push :
70- branches : [main]
71- paths-ignore :
72- - .codecov
73- - .docfx
74- - .github
75- - .nuget
76- pull_request :
77- branches : [main]
78- workflow_dispatch :
79- inputs :
80- configuration :
81- type : choice
82- description : The build configuration to use in the deploy stage.
83- required : true
84- default : Release
85- options :
86- - Debug
87- - Release
88-
89- jobs :
90- build :
91- name : 🛠️ Build
92- runs-on : ubuntu-22.04
93- outputs :
94- version : ${{ steps.minver-calculate.outputs.version }}
95- steps :
96- - name : Checkout
97- uses : codebeltnet/git-checkout@v1
98-
99- - name : Install .NET
100- uses : codebeltnet/install-dotnet@v1
101-
102- - name : Install MinVer
103- uses : codebeltnet/dotnet-tool-install-minver@v1
104-
105- - id : minver-calculate
106- name : Calculate Version
107- uses : codebeltnet/minver-calculate@v1
108-
109- - name : Download strongname.snk file
110- uses : codebeltnet/gcp-download-file@v1
111- with :
112- serviceAccountKey : ${{ secrets.GCP_TOKEN }}
113- bucketName : ${{ secrets.GCP_BUCKETNAME }}
114- objectName : strongname.snk
115-
116- - name : Restore Dependencies
117- uses : codebeltnet/dotnet-restore@v1
118-
119- - name : Build for Preview
120- uses : codebeltnet/dotnet-build@v1
121- with :
122- configuration : Debug
123-
124- - name : Build for Production
125- uses : codebeltnet/dotnet-build@v1
126- with :
127- configuration : Release
128-
129- pack :
130- name : 📦 Pack
131- runs-on : ubuntu-22.04
132- strategy :
133- matrix :
134- configuration : [Debug, Release]
135- needs : [build]
136- steps :
137- - name : Pack for ${{ matrix.configuration }}
138- uses : codebeltnet/dotnet-pack@v1
139- with :
140- configuration : ${{ matrix.configuration }}
141- uploadPackedArtifact : true
142- version : ${{ needs.build.outputs.version }}
143-
144- test :
145- name : 🧪 Test
146- needs : [build]
147- strategy :
148- matrix :
149- os : [ubuntu-22.04, windows-2022]
150- runs-on : ${{ matrix.os }}
151- steps :
152- - name : Checkout
153- uses : codebeltnet/git-checkout@v1
154-
155- - name : Install .NET
156- uses : codebeltnet/install-dotnet@v1
157-
158- - name : Install .NET Tool - Report Generator
159- uses : codebeltnet/dotnet-tool-install-reportgenerator@v1
160-
161- - name : Test with Debug build
162- uses : codebeltnet/dotnet-test@v1
163- with :
164- configuration : Debug
165- buildSwitches : -p:SkipSignAssembly=true
64+ ### Basic CI/CD Pipeline
16665
167- - name : Test with Release build
168- uses : codebeltnet/dotnet-test@v1
169- with :
170- configuration : Release
171- buildSwitches : -p:SkipSignAssembly=true
66+ - Bootstrapper API - https://github.com/codebeltnet/bootstrapper/blob/main/.github/workflows/pipelines.yml
67+ - Extensions for Asp.Versioning API - https://github.com/codebeltnet/asp-versioning/blob/main/.github/workflows/pipelines.yml
68+ - Extensions for AWS Signature Version 4 API - https://github.com/codebeltnet/aws-signature-v4/blob/main/.github/workflows/pipelines.yml
69+ - Extensions for Globalization API - https://github.com/codebeltnet/globalization/blob/main/.github/workflows/pipelines.yml
70+ - Extensions for Newtonsoft.Json API - https://github.com/codebeltnet/newtonsoft-json/blob/main/.github/workflows/pipelines.yml
71+ - Extensions for Swashbuckle.AspNetCore API - https://github.com/codebeltnet/swashbuckle-aspnetcore/blob/main/.github/workflows/pipelines.yml
72+ - Extensions for xUnit API - https://github.com/codebeltnet/xunit/blob/main/.github/workflows/pipelines.yml
73+ - Extensions for YamlDotNet API - https://github.com/codebeltnet/yamldotnet/blob/main/.github/workflows/pipelines.yml
74+ - Shared Kernel API - https://github.com/codebeltnet/shared-kernel/blob/main/.github/workflows/pipelines.yml
75+ - Unitify API - https://github.com/codebeltnet/unitify/blob/main/.github/workflows/pipelines.yml
17276
173- sonarcloud :
174- name : 🔬 Code Quality Analysis
175- needs : [build,test]
176- runs-on : ubuntu-22.04
177- steps :
178- - name : Checkout
179- uses : codebeltnet/git-checkout@v1
77+ ### Intermediate CI/CD Pipeline
18078
181- - name : Install .NET
182- uses : codebeltnet/install-dotnet@v1
79+ - Savvy I/O - https://github.com/codebeltnet/savvyio/blob/main/.github/workflows/pipelines.yml
18380
184- - name : Install .NET Tool - Sonar Scanner
185- uses : codebeltnet/dotnet-tool-install-sonarscanner@v1
81+ ### Advanced CI/CD Pipeline
18682
187- - name : Restore Dependencies
188- uses : codebeltnet/dotnet-restore@v1
83+ - Cuemon for .NET - https://github.com/gimlichael/Cuemon/blob/main/.github/workflows/pipelines.yml
18984
190- - name : Run SonarCloud Analysis
191- uses : codebeltnet/sonarcloud-scan@v1
192- with :
193- token : ${{ secrets.SONAR_TOKEN }}
194- organization : your-sonarcloud-organization
195- projectKey : your-sonarcloud-project-key
196- version : ${{ needs.build.outputs.version }}
197-
198- - name : Build
199- uses : codebeltnet/dotnet-build@v1
200- with :
201- buildSwitches : -p:SkipSignAssembly=true
202- uploadBuildArtifact : false
203-
204- - name : Finalize SonarCloud Analysis
205- uses : codebeltnet/sonarcloud-scan-finalize@v1
206- with :
207- token : ${{ secrets.SONAR_TOKEN }}
208-
209- codecov :
210- name : 📊 Code Coverage Analysis
211- needs : [build,test]
212- runs-on : ubuntu-22.04
213- steps :
214- - name : Checkout
215- uses : codebeltnet/git-checkout@v1
216-
217- - name : Run CodeCov Analysis
218- uses : codebeltnet/codecov-scan@v1
219- with :
220- token : ${{ secrets.CODECOV_TOKEN }}
221- repository : your-github-repository
222-
223- codeql :
224- name : 🛡️ Security Analysis
225- needs : [build,test]
226- runs-on : ubuntu-22.04
227- steps :
228- - name : Checkout
229- uses : codebeltnet/git-checkout@v1
230-
231- - name : Install .NET
232- uses : codebeltnet/install-dotnet@v1
233-
234- - name : Restore Dependencies
235- uses : codebeltnet/dotnet-restore@v1
236-
237- - name : Prepare CodeQL SAST Analysis
238- uses : codebeltnet/codeql-scan@v1
239-
240- - name : Build
241- uses : codebeltnet/dotnet-build@v1
242- with :
243- buildSwitches : -p:SkipSignAssembly=true
244- uploadBuildArtifact : false
245-
246- - name : Finalize CodeQL SAST Analysis
247- uses : codebeltnet/codeql-scan-finalize@v1
248-
249- deploy :
250- name : 🚀 Deploy v${{ needs.build.outputs.version }}
251- runs-on : ubuntu-22.04
252- needs : [build,pack,test,sonarcloud,codecov,codeql]
253- environment : Production
254- steps :
255- - uses : codebeltnet/nuget-push@v1
256- with :
257- token : ${{ secrets.NUGET_TOKEN }}
258- configuration : ${{ inputs.configuration == '' && 'Release' || inputs.configuration }}
259-
260- ```
261-
262- ## Contributing to Analyze with SonarCloud
85+ ## Contributing to Analyze with SonarCloud from Codebelt
26386
26487Contributions are welcome!
26588Feel free to submit issues, feature requests, or pull requests to help improve this action.
@@ -268,24 +91,5 @@ Feel free to submit issues, feature requests, or pull requests to help improve t
26891
26992This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
27093
271- ### Other Actions
272-
273- :bookmark : [ Analyze with Codecov] ( https://github.com/codebeltnet/codecov-scan ) \
274- :bookmark : [ Analyze with CodeQL] ( https://github.com/codebeltnet/codeql-scan ) \
275- :bookmark : [ Finalyze with CodeQL] ( https://github.com/codebeltnet/codeql-scan-finalize ) \
276- :bookmark : [ Docker Compose] ( https://github.com/codebeltnet/docker-compose ) \
277- :bookmark : [ .NET Build] ( https://github.com/codebeltnet/dotnet-build ) \
278- :bookmark : [ .NET Pack] ( https://github.com/codebeltnet/dotnet-pack ) \
279- :bookmark : [ .NET Restore] ( https://github.com/codebeltnet/dotnet-restore ) \
280- :bookmark : [ .NET Test] ( https://github.com/codebeltnet/dotnet-test ) \
281- :bookmark : [ Install .NET SDK] ( https://github.com/codebeltnet/install-dotnet ) \
282- :bookmark : [ Install .NET Tool - MinVer] ( https://github.com/codebeltnet/dotnet-tool-install-minver ) \
283- :bookmark : [ Install .NET Tool - Report Generator] ( https://github.com/codebeltnet/dotnet-tool-install-reportgenerator ) \
284- :bookmark : [ Install .NET Tool - Sonar Scanner] ( https://github.com/codebeltnet/dotnet-tool-install-sonarscanner ) \
285- :bookmark : [ GCP Download File] ( https://github.com/codebeltnet/gcp-download-file ) \
286- :bookmark : [ Git Checkout] ( https://github.com/codebeltnet/git-checkout ) \
287- :bookmark : [ MinVer Calculate] ( https://github.com/codebeltnet/minver-calculate ) \
288- :bookmark : [ NuGet Push] ( https://github.com/codebeltnet/nuget-push ) \
289- :bookmark : [ Shell Globbing] ( https://github.com/codebeltnet/shell-globbing ) \
290- :bookmark : [ Analyze with SonarCloud] ( https://github.com/codebeltnet/sonarcloud-scan ) \
291- :bookmark : [ Finalyze with SonarCloud] ( https://github.com/codebeltnet/sonarcloud-scan-finalize )
94+ > [!TIP]
95+ > To learn more about the Codebelt experience and offerings, visit our [organization page](https://github.com/codebeltnet) on GitHub.
0 commit comments