diff --git a/.github/workflows/dev_atil-feecalculator.yml b/.github/workflows/dev_atil-feecalculator.yml index 672df5b..a4e01fa 100644 --- a/.github/workflows/dev_atil-feecalculator.yml +++ b/.github/workflows/dev_atil-feecalculator.yml @@ -16,13 +16,15 @@ jobs: - name: Install dependencies run: dotnet restore . - name: Build - run: dotnet publish --configuration Release --no-restore -o publish + run: dotnet publish ./src/ATIL.FeeCalculator.csproj --configuration Release --no-restore -o publish - name: checkout octopus uses: OctopusDeploy/install-octopus-cli-action@v1.1.8 - name: pack & push to octo run: | BRANCHNAME=${{github.ref_name}} MY_VAR="1.0.${{github.run_number}}-beta" + octo pack --basePath=infrastructure --id atil_feecalculator-infrastructure --version $MY_VAR --outFolder ./infra --format zip + octo push --package "./infra/atil_feecalculator-infrastructure.${MY_VAR}.zip" --server="${{ secrets.OCTOPUS_SERVER }}" --apiKey="${{ secrets.OCTOPUS_APIKEY }}" octo pack --basePath=publish --id atil_feecalculator --version $MY_VAR --outFolder ./out --format zip octo push --package "./out/atil_feecalculator.${MY_VAR}.zip" --server="${{ secrets.OCTOPUS_SERVER }}" --apiKey="${{ secrets.OCTOPUS_APIKEY }}" octo create-release --project="ATIL - Fee Calculator API" --server="${{ secrets.OCTOPUS_SERVER }}" --apiKey="${{ secrets.OCTOPUS_APIKEY }}" --channel=Dev diff --git a/.github/workflows/main_atil-feecalculator.yml b/.github/workflows/main_atil-feecalculator.yml index cc0013a..e95acc1 100644 --- a/.github/workflows/main_atil-feecalculator.yml +++ b/.github/workflows/main_atil-feecalculator.yml @@ -16,12 +16,14 @@ jobs: - name: Install dependencies run: dotnet restore . - name: Build - run: dotnet publish --configuration Release --no-restore -o publish + run: dotnet publish ./src/ATIL.FeeCalculator.csproj--configuration Release --no-restore -o publish - name: checkout octopus uses: OctopusDeploy/install-octopus-cli-action@v1.1.8 - name: pack & push to octo run: | MY_VAR="1.0.${{github.run_number}}" + octo pack --basePath=infrastructure --id atil_feecalculator-infrastructure --version $MY_VAR --outFolder ./infra --format zip + octo push --package "./infra/atil_feecalculator-infrastructure.${MY_VAR}.zip" --server="${{ secrets.OCTOPUS_SERVER }}" --apiKey="${{ secrets.OCTOPUS_APIKEY }}" octo pack --basePath=publish --id atil_feecalculator --version $MY_VAR --outFolder ./out --format zip octo push --package "./out/atil_feecalculator.${MY_VAR}.zip" --server="${{ secrets.OCTOPUS_SERVER }}" --apiKey="${{ secrets.OCTOPUS_APIKEY }}" octo create-release --project="ATIL - Fee Calculator API" --server="${{ secrets.OCTOPUS_SERVER }}" --apiKey="${{ secrets.OCTOPUS_APIKEY }}" --channel=Prod diff --git a/.github/workflows/test_atil-feecalculator.yml b/.github/workflows/test_atil-feecalculator.yml index a803d6c..569d3ff 100644 --- a/.github/workflows/test_atil-feecalculator.yml +++ b/.github/workflows/test_atil-feecalculator.yml @@ -1,4 +1,4 @@ -on: +on: push: branches: - "release/rc-*" @@ -11,19 +11,20 @@ jobs: - name: Set up .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: '6.0.x' + dotnet-version: "6.0.x" include-prerelease: true - name: Install dependencies run: dotnet restore . - name: Build - run: dotnet publish --configuration Release --no-restore -o publish + run: dotnet publish ./src/ATIL.FeeCalculator.csproj--configuration Release --no-restore -o publish - name: checkout octopus uses: OctopusDeploy/install-octopus-cli-action@v1.1.8 - - name: pack & push to octo + - name: pack & push to octo run: | BRANCHNAME=${{github.ref_name}} MY_VAR="1.0.${{github.run_number}}-${BRANCHNAME##*/}" + octo pack --basePath=infrastructure --id atil_feecalculator-infrastructure --version $MY_VAR --outFolder ./infra --format zip + octo push --package "./infra/atil_feecalculator-infrastructure.${MY_VAR}.zip" --server="${{ secrets.OCTOPUS_SERVER }}" --apiKey="${{ secrets.OCTOPUS_APIKEY }}" octo pack --basePath=publish --id atil_feecalculator --version $MY_VAR --outFolder ./out --format zip octo push --package "./out/atil_feecalculator.${MY_VAR}.zip" --server="${{ secrets.OCTOPUS_SERVER }}" --apiKey="${{ secrets.OCTOPUS_APIKEY }}" octo create-release --project="ATIL - Fee Calculator API" --server="${{ secrets.OCTOPUS_SERVER }}" --apiKey="${{ secrets.OCTOPUS_APIKEY }}" --channel=Test - diff --git a/ATIL.FeeCalculator.sln b/ATIL.FeeCalculator.sln index f0852cc..701e0a6 100644 --- a/ATIL.FeeCalculator.sln +++ b/ATIL.FeeCalculator.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.31424.327 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ATIL.FeeCalculator", "ATIL.FeeCalculator.csproj", "{AF0561E3-EEDE-4F28-90D3-1BD172D1F8D7}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ATIL.FeeCalculator", "src\ATIL.FeeCalculator.csproj", "{AF0561E3-EEDE-4F28-90D3-1BD172D1F8D7}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/ATIL.FeeCalculator.csproj b/src/ATIL.FeeCalculator.csproj similarity index 100% rename from ATIL.FeeCalculator.csproj rename to src/ATIL.FeeCalculator.csproj diff --git a/Controllers/AtilFeeCalculationController.cs b/src/Controllers/AtilFeeCalculationController.cs similarity index 100% rename from Controllers/AtilFeeCalculationController.cs rename to src/Controllers/AtilFeeCalculationController.cs diff --git a/Controllers/BaseController.cs b/src/Controllers/BaseController.cs similarity index 100% rename from Controllers/BaseController.cs rename to src/Controllers/BaseController.cs diff --git a/Data/Repository.cs b/src/Data/Repository.cs similarity index 100% rename from Data/Repository.cs rename to src/Data/Repository.cs diff --git a/Exceptions/IllegalTiltakstypeException.cs b/src/Exceptions/IllegalTiltakstypeException.cs similarity index 100% rename from Exceptions/IllegalTiltakstypeException.cs rename to src/Exceptions/IllegalTiltakstypeException.cs diff --git a/Middleware/ExceptionHandlingMiddleware.cs b/src/Middleware/ExceptionHandlingMiddleware.cs similarity index 100% rename from Middleware/ExceptionHandlingMiddleware.cs rename to src/Middleware/ExceptionHandlingMiddleware.cs diff --git a/Models/Area.cs b/src/Models/Area.cs similarity index 100% rename from Models/Area.cs rename to src/Models/Area.cs diff --git a/Models/Bygningstype.cs b/src/Models/Bygningstype.cs similarity index 100% rename from Models/Bygningstype.cs rename to src/Models/Bygningstype.cs diff --git a/Models/CalculationResult.cs b/src/Models/CalculationResult.cs similarity index 100% rename from Models/CalculationResult.cs rename to src/Models/CalculationResult.cs diff --git a/Models/CalculationResultBasis.cs b/src/Models/CalculationResultBasis.cs similarity index 100% rename from Models/CalculationResultBasis.cs rename to src/Models/CalculationResultBasis.cs diff --git a/Models/Category.cs b/src/Models/Category.cs similarity index 100% rename from Models/Category.cs rename to src/Models/Category.cs diff --git a/Models/Fee.cs b/src/Models/Fee.cs similarity index 100% rename from Models/Fee.cs rename to src/Models/Fee.cs diff --git a/Models/FeeCategoryDescription.cs b/src/Models/FeeCategoryDescription.cs similarity index 100% rename from Models/FeeCategoryDescription.cs rename to src/Models/FeeCategoryDescription.cs diff --git a/Models/Tiltakstype.cs b/src/Models/Tiltakstype.cs similarity index 100% rename from Models/Tiltakstype.cs rename to src/Models/Tiltakstype.cs diff --git a/Program.cs b/src/Program.cs similarity index 100% rename from Program.cs rename to src/Program.cs diff --git a/Properties/launchSettings.json b/src/Properties/launchSettings.json similarity index 100% rename from Properties/launchSettings.json rename to src/Properties/launchSettings.json diff --git a/Services/AtilFeeCalculationService.cs b/src/Services/AtilFeeCalculationService.cs similarity index 100% rename from Services/AtilFeeCalculationService.cs rename to src/Services/AtilFeeCalculationService.cs diff --git a/Startup.cs b/src/Startup.cs similarity index 97% rename from Startup.cs rename to src/Startup.cs index a9d905b..bfce90b 100644 --- a/Startup.cs +++ b/src/Startup.cs @@ -54,7 +54,6 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) app.UseMiddleware(typeof(ExceptionHandlingMiddleware)); app.UseEndpoints(endpoints => { - endpoints.MapGet("/ping", () => "pongers"); endpoints.MapControllers(); endpoints.MapHealthChecks("/health"); });