Skip to content

Commit

Permalink
Example Project Completed
Browse files Browse the repository at this point in the history
  • Loading branch information
serkanaplan committed Sep 14, 2024
0 parents commit 50a8e8f
Show file tree
Hide file tree
Showing 299 changed files with 12,462 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .azure/azure-pipelines.development.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
trigger:
branches:
include:
- development

pool:
vmImage: 'ubuntu-latest'

variables:
dotnetConfiguration: 'Debug'
dotnetSolution: '$(System.DefaultWorkingDirectory)/RentACarCleanArchitecture.sln'
dotnetStartupProject: '$(System.DefaultWorkingDirectory)/src/rentACarCleanArchitecture/WebAPI/WebAPI.csproj'
dotnetEnvironmentName: 'Development'

steps:
- script: git submodule update --init --recursive
name: 'DownloadGitSubmodules'
displayName: 'Download Git Submodules'

- task: NuGetToolInstaller@1
name: 'InstallNuGet'
displayName: 'Install NuGet Tool'

- task: NuGetCommand@2
name: 'RestoreNuGetPackages'
displayName: 'Restore NuGet Packages'
inputs:
command: 'restore'
restoreSolution: '$(dotnetSolution)'
feedsToUse: 'select'

# - task: DotNetCoreCLI@2
# name: 'RestoreDotnetTools'
# displayName: 'Restore Dotnet Tools'
# inputs:
# command: 'custom'
# custom: 'tool'
# arguments: 'restore'

- task: DotNetCoreCLI@2
name: 'RunTests'
displayName: 'Run Tests'
inputs:
command: 'test'
projects: '$(dotnetSolution)'
arguments: '--configuration $(dotnetConfiguration)'

- task: DotNetCoreCLI@2
name: 'PublishApp'
displayName: 'Publish Application'
inputs:
command: 'publish'
publishWebProjects: false
projects: '$(dotnetStartupProject)'
arguments: '--configuration $(dotnetConfiguration) --output $(Build.ArtifactStagingDirectory)'
zipAfterPublish: false

# - task: DotNetCoreCLI@2
# name: 'CreateSQLScripts'
# displayName: 'Create SQL Scripts'
# inputs:
# command: 'custom'
# custom: 'ef'
# arguments: 'migrations script --project $(System.DefaultWorkingDirectory)/src/rentACarCleanArchitecture/Persistence/Persistence.csproj --context BaseDbContext --startup-project $(dotnetStartupProject) --idempotent --output $(Build.ArtifactStagingDirectory)/SQL/migration.sql -- --environment $(dotnetEnvironmentName)'

- task: PublishBuildArtifacts@1
name: 'PublishArtifacts'
displayName: 'Publish Artifacts'
68 changes: 68 additions & 0 deletions .azure/azure-pipelines.production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
trigger:
branches:
include:
- production

pool:
vmImage: 'ubuntu-latest'

variables:
dotnetConfiguration: 'Release'
dotnetSolution: '$(System.DefaultWorkingDirectory)/RentACarCleanArchitecture.sln'
dotnetStartupProject: '$(System.DefaultWorkingDirectory)/src/rentACarCleanArchitecture/WebAPI/WebAPI.csproj'
dotnetEnvironmentName: 'Production'

steps:
- script: git submodule update --init --recursive
name: 'DownloadGitSubmodules'
displayName: 'Download Git Submodules'

- task: NuGetToolInstaller@1
name: 'InstallNuGet'
displayName: 'Install NuGet Tool'

- task: NuGetCommand@2
name: 'RestoreNuGetPackages'
displayName: 'Restore NuGet Packages'
inputs:
command: 'restore'
restoreSolution: '$(dotnetSolution)'
feedsToUse: 'select'

# - task: DotNetCoreCLI@2
# name: 'RestoreDotnetTools'
# displayName: 'Restore Dotnet Tools'
# inputs:
# command: 'custom'
# custom: 'tool'
# arguments: 'restore'

- task: DotNetCoreCLI@2
name: 'RunTests'
displayName: 'Run Tests'
inputs:
command: 'test'
projects: '$(dotnetSolution)'
arguments: '--configuration $(dotnetConfiguration)'

- task: DotNetCoreCLI@2
name: 'PublishApp'
displayName: 'Publish Application'
inputs:
command: 'publish'
publishWebProjects: false
projects: '$(dotnetStartupProject)'
arguments: '--configuration $(dotnetConfiguration) --output $(Build.ArtifactStagingDirectory)'
zipAfterPublish: false

# - task: DotNetCoreCLI@2
# name: 'CreateSQLScripts'
# displayName: 'Create SQL Scripts'
# inputs:
# command: 'custom'
# custom: 'ef'
# arguments: 'migrations script --project $(System.DefaultWorkingDirectory)/src/rentACarCleanArchitecture/Persistence/Persistence.csproj --context BaseDbContext --startup-project $(dotnetStartupProject) --idempotent --output $(Build.ArtifactStagingDirectory)/SQL/migration.sql -- --environment $(dotnetEnvironmentName)'

- task: PublishBuildArtifacts@1
name: 'PublishArtifacts'
displayName: 'Publish Artifacts'
68 changes: 68 additions & 0 deletions .azure/azure-pipelines.staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
trigger:
branches:
include:
- staging

pool:
vmImage: 'ubuntu-latest'

variables:
dotnetConfiguration: 'Debug'
dotnetSolution: '$(System.DefaultWorkingDirectory)/RentACarCleanArchitecture.sln'
dotnetStartupProject: '$(System.DefaultWorkingDirectory)/src/rentACarCleanArchitecture/WebAPI/WebAPI.csproj'
dotnetEnvironmentName: 'Staging'

steps:
- script: git submodule update --init --recursive
name: 'DownloadGitSubmodules'
displayName: 'Download Git Submodules'

- task: NuGetToolInstaller@1
name: 'InstallNuGet'
displayName: 'Install NuGet Tool'

- task: NuGetCommand@2
name: 'RestoreNuGetPackages'
displayName: 'Restore NuGet Packages'
inputs:
command: 'restore'
restoreSolution: '$(dotnetSolution)'
feedsToUse: 'select'

# - task: DotNetCoreCLI@2
# name: 'RestoreDotnetTools'
# displayName: 'Restore Dotnet Tools'
# inputs:
# command: 'custom'
# custom: 'tool'
# arguments: 'restore'

- task: DotNetCoreCLI@2
name: 'RunTests'
displayName: 'Run Tests'
inputs:
command: 'test'
projects: '$(dotnetSolution)'
arguments: '--configuration $(dotnetConfiguration)'

- task: DotNetCoreCLI@2
name: 'PublishApp'
displayName: 'Publish Application'
inputs:
command: 'publish'
publishWebProjects: false
projects: '$(dotnetStartupProject)'
arguments: '--configuration $(dotnetConfiguration) --output $(Build.ArtifactStagingDirectory)'
zipAfterPublish: false

# - task: DotNetCoreCLI@2
# name: 'CreateSQLScripts'
# displayName: 'Create SQL Scripts'
# inputs:
# command: 'custom'
# custom: 'ef'
# arguments: 'migrations script --project $(System.DefaultWorkingDirectory)/src/rentACarCleanArchitecture/Persistence/Persistence.csproj --context BaseDbContext --startup-project $(dotnetStartupProject) --idempotent --output $(Build.ArtifactStagingDirectory)/SQL/migration.sql -- --environment $(dotnetEnvironmentName)'

- task: PublishBuildArtifacts@1
name: 'PublishArtifacts'
displayName: 'Publish Artifacts'
30 changes: 30 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "8.0.0",
"commands": [
"dotnet-ef"
]
},
"csharpier": {
"version": "0.27.2",
"commands": [
"dotnet-csharpier"
]
},
"roslynator.dotnet.cli": {
"version": "0.5.0",
"commands": [
"roslynator"
]
},
"narchitecture.gen": {
"version": "1.1.0",
"commands": [
"nArchGen"
]
}
}
}
10 changes: 10 additions & 0 deletions .csharpierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"printWidth": 130,
"useTabs": false,
"tabWidth": 4,
"preprocessorSymbolSets": [
"",
"DEBUG",
"DEBUG,CODE_STYLE"
]
}
Loading

0 comments on commit 50a8e8f

Please sign in to comment.