Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ci-cd): nuke setup #73

Merged
merged 27 commits into from
Apr 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
4372429
feat(build): first yml action
followynne Mar 19, 2023
21156ac
feat(build): add sonarcloud
followynne Mar 19, 2023
b524717
fix(build): improve with reporters
followynne Mar 19, 2023
844a2f9
feat(build): use ubuntu, add docker login, improve jest reporting
followynne Mar 19, 2023
86b0b68
chore(build): review steps sequence
followynne Mar 20, 2023
f4032c9
feat(build): add dotnet coverage
followynne Mar 20, 2023
4d90fe0
feat(build): review jest coverage
followynne Mar 20, 2023
1a18fe4
fix(build): update sonarscans data
followynne Mar 20, 2023
b115bff
chore(mongodb): mongo2go -> ephemeral (easier CI)
followynne Mar 26, 2023
af48eb5
chore(build): review sonar approach
followynne Mar 26, 2023
ec9d611
feat(nuke): convert existing pipelines
followynne Mar 26, 2023
05ff22f
feat(nuke): create github actions for js part
followynne Mar 26, 2023
1dd41ea
fix(nuke): launch actions on pr, fix build.cmd permissions
followynne Mar 26, 2023
c10df97
feat(nuke): add gh-action custom attribute
followynne Mar 27, 2023
cc133c9
chore(nuke): order up the current status
followynne Mar 27, 2023
ec7be35
fix(nuke): change output for reporter, add common pkgs
followynne Mar 27, 2023
b78651e
refactor(nuke): create directory.props shared refs
followynne Mar 27, 2023
2e2171b
fix(nuke): import build.props in nuke, fix serilog tests
followynne Mar 28, 2023
9cd0b48
fix(tests-elastic): creation of fake data
followynne Mar 28, 2023
b376314
chore(nuke): remove extra pieces, update yml
followynne Mar 28, 2023
375aeb1
fix(nuke): complete build setup
followynne Apr 1, 2023
a02e1b6
fix(build): remove npm build from csproj target
followynne Apr 1, 2023
bbf8e8f
chore(nuget): update nuspec urls
followynne Apr 1, 2023
8b4f0ff
fix(dotnet-build): correct sonar src inclusions
followynne Apr 1, 2023
9a3c904
fix(sonarcloud): make steps optional with options model
followynne Apr 2, 2023
a02307f
chore(sonar): use personal keys as temporary setup
followynne Apr 6, 2023
049bfd6
Merge branch 'master' into feat/ci-cd-with-nuke
mo-esmp Apr 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/DotNET-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# ------------------------------------------------------------------------------
# <auto-generated>
#
# This code was generated.
#
# - To turn off auto-generation set:
#
# [CustomGithubActions (AutoGenerate = false)]
#
# - To trigger manual generation invoke:
#
# nuke --generate-configuration GitHubActions_DotNET-build --host GitHubActions
#
# </auto-generated>
# ------------------------------------------------------------------------------

name: DotNET-build

on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev

jobs:
ubuntu-latest:
name: ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache .nuke/temp, ~/.nuget/packages
uses: actions/cache@v3
with:
path: |
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
- name: Run './build.cmd Backend_SonarScan_End'
run: ./build.cmd Backend_SonarScan_End
env:
SonarToken: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: phoenix-actions/test-reporting@v9
if: always()
with:
name: DotNET - Tests
output-to: checks
path: '**/test-results.trx'
reporter: dotnet-trx
fail-on-error: false
73 changes: 73 additions & 0 deletions .github/workflows/JS-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# ------------------------------------------------------------------------------
# <auto-generated>
#
# This code was generated.
#
# - To turn off auto-generation set:
#
# [CustomGithubActions (AutoGenerate = false)]
#
# - To trigger manual generation invoke:
#
# nuke --generate-configuration GitHubActions_JS-build --host GitHubActions
#
# </auto-generated>
# ------------------------------------------------------------------------------

name: JS-build

on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev

jobs:
ubuntu-latest:
name: ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache .nuke/temp, ~/.nuget/packages
uses: actions/cache@v3
with:
path: |
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
- name: Run './build.cmd Frontend_Tests_Ci'
run: ./build.cmd Frontend_Tests_Ci
env:
SonarTokenUi: ${{ secrets.SONAR_TOKEN_UI }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: SonarCloud run
uses: SonarSource/sonarcloud-github-action@master
if: ${{ false }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_UI }}
with:
args: >
-Dsonar.organization=
-Dsonar.projectKey=
-Dsonar.sources=src/Serilog.Ui.Web/assets/
-Dsonar.tests=src/Serilog.Ui.Web/assets/
-Dsonar.exclusions=src/Serilog.Ui.Web/assets/__tests__/**/*
-Dsonar.test.inclusions=src/Serilog.Ui.Web/assets/__tests__/**/*
-Dsonar.javascript.lcov.reportPaths=./src/Serilog.Ui.Web/coverage/lcov.info

- uses: phoenix-actions/test-reporting@v9
if: always()
with:
name: JS - Tests
output-to: checks
path: '**/jest-*.xml'
reporter: jest-junit
fail-on-error: false
102 changes: 102 additions & 0 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# ------------------------------------------------------------------------------
# <auto-generated>
#
# This code was generated.
#
# - To turn off auto-generation set:
#
# [CustomGithubActions (AutoGenerate = false)]
#
# - To trigger manual generation invoke:
#
# nuke --generate-configuration GitHubActions_Release --host GitHubActions
#
# </auto-generated>
# ------------------------------------------------------------------------------

name: Release

on:
workflow_dispatch:
inputs:
ElasticProvider:
description: "Elastic Provider"
required: true
MongoProvider:
description: "Mongo Provider"
required: true
MsSqlProvider:
description: "Ms Sql Provider"
required: true
MySqlProvider:
description: "My Sql Provider"
required: true
PostgresProvider:
description: "Postgres Provider"
required: true
Ui:
description: "Ui"
required: true

jobs:
ubuntu-latest:
name: ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache .nuke/temp, ~/.nuget/packages
uses: actions/cache@v3
with:
path: |
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
- name: Run './build.cmd Publish'
run: ./build.cmd Publish
env:
ElasticProvider: ${{ github.event.inputs.ElasticProvider }}
MongoProvider: ${{ github.event.inputs.MongoProvider }}
MsSqlProvider: ${{ github.event.inputs.MsSqlProvider }}
MySqlProvider: ${{ github.event.inputs.MySqlProvider }}
PostgresProvider: ${{ github.event.inputs.PostgresProvider }}
Ui: ${{ github.event.inputs.Ui }}
SonarTokenUi: ${{ secrets.SONAR_TOKEN_UI }}
SonarToken: ${{ secrets.SONAR_TOKEN }}
NugetApiKey: ${{ secrets.NUGET_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: phoenix-actions/test-reporting@v9
if: always()
with:
name: DotNET - Tests
output-to: checks
path: '**/test-results.trx'
reporter: dotnet-trx
fail-on-error: false

- name: SonarCloud run
uses: SonarSource/sonarcloud-github-action@master
if: ${{ false }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_UI }}
with:
args: >
-Dsonar.organization=
-Dsonar.projectKey=
-Dsonar.sources=src/Serilog.Ui.Web/assets/
-Dsonar.tests=src/Serilog.Ui.Web/assets/
-Dsonar.exclusions=src/Serilog.Ui.Web/assets/__tests__/**/*
-Dsonar.test.inclusions=src/Serilog.Ui.Web/assets/__tests__/**/*
-Dsonar.javascript.lcov.reportPaths=./src/Serilog.Ui.Web/coverage/lcov.info

- uses: phoenix-actions/test-reporting@v9
if: always()
with:
name: JS - Tests
output-to: checks
path: '**/jest-*.xml'
reporter: jest-junit
fail-on-error: false
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -349,5 +349,9 @@ MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
nuget.exe

.vshistory/

coverage.xml
coverage/

.nuke/temp/
Loading