Skip to content

Commit

Permalink
refactor: rename crabimport api to import api
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneD committed Jul 15, 2024
1 parent d28dc70 commit 702cf2f
Show file tree
Hide file tree
Showing 22 changed files with 29 additions and 89 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
services: ['postal-api', 'postal-projections', 'postal-producer', 'postal-producer-snapshot-oslo']
services: ['postal-api', 'postal-import-api', 'postal-projections', 'postal-producer', 'postal-producer-snapshot-oslo']
steps:
- name: CD
env:
Expand Down
42 changes: 7 additions & 35 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,17 @@ jobs:
dotnet-version: ${{ vars.VBR_DOTNET_VERSION_8 }}
secrets: inherit

build-api-crab-import:
name: Build Api CrabImport
build-api-import:
name: Build Api Import
uses: Informatievlaanderen/build-pipeline/.github/workflows/build-image.yml@main
needs: [ set-release-version ]
if: ${{ (github.repository_owner == 'Informatievlaanderen') && (needs.set-release-version.outputs.version != 'none') }}
with:
registry: ${{ vars.VBR_DEVOPS_DOCKER_REGISTRY }}/postal-registry
image-file: pr-api-crab-import-image.tar
image-name: api-crab-import
image-file: pr-api-import-image.tar
image-name: api-import
test-project: PostalRegistry.Tests
build-project: PostalRegistry.Api.CrabImport
build-project: PostalRegistry.Api.Import
semver: ${{ needs.set-release-version.outputs.version }}
dotnet-version: ${{ vars.VBR_DOTNET_VERSION_8 }}
secrets: inherit
Expand Down Expand Up @@ -214,19 +214,6 @@ jobs:
dotnet-version: ${{ vars.VBR_DOTNET_VERSION_8 }}
secrets: inherit

pack-api-crab-import:
name: Pack Api CrabImport
uses: Informatievlaanderen/build-pipeline/.github/workflows/pack.yml@main
needs: [ set-release-version ]
if: ${{ (github.repository_owner == 'Informatievlaanderen') && (needs.set-release-version.outputs.version != 'none') }}
with:
pack-file: Be.Vlaanderen.Basisregisters.PostalRegistry.Api.CrabImport
test-project: PostalRegistry.Tests
build-project: PostalRegistry.Api.CrabImport
semver: ${{ needs.set-release-version.outputs.version }}
dotnet-version: ${{ vars.VBR_DOTNET_VERSION_8 }}
secrets: inherit

release:
if: ${{ (github.repository_owner == 'Informatievlaanderen') && (needs.set-release-version.outputs.version != 'none') }}
name: Semantic Release
Expand All @@ -235,11 +222,10 @@ jobs:
pack-api-legacy,
pack-api-oslo,
pack-api-extract,
pack-api-crab-import,
build-api-legacy,
build-api-oslo,
build-api-extract,
build-api-crab-import,
build-api-import,
build-projector,
build-projections-syndication,
build-producer,
Expand Down Expand Up @@ -319,13 +305,6 @@ jobs:
name: nuget-Be.Vlaanderen.Basisregisters.PostalRegistry.Api.Extract-${{ needs.set-release-version.outputs.version }}
path: dist/nuget/

- name: Download NuGet Api CrabImport
uses: actions/download-artifact@v4
continue-on-error: false
with:
name: nuget-Be.Vlaanderen.Basisregisters.PostalRegistry.Api.CrabImport-${{ needs.set-release-version.outputs.version }}
path: dist/nuget/

- name: Run Semantic Release
shell: bash
run: npx semantic-release
Expand Down Expand Up @@ -386,19 +365,12 @@ jobs:
name: nuget-Be.Vlaanderen.Basisregisters.PostalRegistry.Api.Extract-${{ needs.release.outputs.version }}
path: ~/

- name: Download NuGet package api-crab-import
uses: actions/download-artifact@v4
with:
name: nuget-Be.Vlaanderen.Basisregisters.PostalRegistry.Api.CrabImport-${{ needs.release.outputs.version }}
path: ~/

- name: Publish packages to NuGet
shell: bash
run: |
dotnet nuget push ~/Be.Vlaanderen.Basisregisters.PostalRegistry.Api.Legacy.$SEMVER.nupkg --source nuget.org --api-key $NUGET_API_KEY
dotnet nuget push ~/Be.Vlaanderen.Basisregisters.PostalRegistry.Api.Oslo.$SEMVER.nupkg --source nuget.org --api-key $NUGET_API_KEY
dotnet nuget push ~/Be.Vlaanderen.Basisregisters.PostalRegistry.Api.Extract.$SEMVER.nupkg --source nuget.org --api-key $NUGET_API_KEY
dotnet nuget push ~/Be.Vlaanderen.Basisregisters.PostalRegistry.Api.CrabImport.$SEMVER.nupkg --source nuget.org --api-key $NUGET_API_KEY
env:
SEMVER: ${{ needs.release.outputs.version }}
WORKSPACE: ${{ github.workspace }}
Expand Down Expand Up @@ -472,7 +444,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
image: ['api-legacy', 'api-oslo', 'api-crab-import', 'api-extract', 'projections-syndication', 'projector', 'producer', 'producer-snapshot-oslo']
image: ['api-legacy', 'api-oslo', 'api-import', 'api-extract', 'projections-syndication', 'projector', 'producer', 'producer-snapshot-oslo']
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4.0.2
Expand Down
2 changes: 1 addition & 1 deletion PostalRegistry.sln
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PostalRegistry", "src\Posta
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PostalRegistry.Api.Legacy", "src\PostalRegistry.Api.Legacy\PostalRegistry.Api.Legacy.csproj", "{7F47CB53-84F6-4D0D-8380-306E95E1DE56}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PostalRegistry.Api.CrabImport", "src\PostalRegistry.Api.CrabImport\PostalRegistry.Api.CrabImport.csproj", "{8F47CB53-84F6-4D0D-8380-306E95E1DE56}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PostalRegistry.Api.Import", "src\PostalRegistry.Api.Import\PostalRegistry.Api.Import.csproj", "{8F47CB53-84F6-4D0D-8380-306E95E1DE56}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PostalRegistry.Infrastructure", "src\PostalRegistry.Infrastructure\PostalRegistry.Infrastructure.csproj", "{488B07C6-FEDE-4F8D-A6E2-A7DFED79BBA1}"
EndProject
Expand Down
32 changes: 0 additions & 32 deletions src/PostalRegistry.Api.CrabImport/paket.template

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace PostalRegistry.Api.CrabImport.BPostImport
namespace PostalRegistry.Api.Import.BPostImport
{
using System;
using System.Threading;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace PostalRegistry.Api.CrabImport.BPostImport.Requests
namespace PostalRegistry.Api.Import.BPostImport.Requests
{
using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace PostalRegistry.Api.CrabImport.CrabImport
namespace PostalRegistry.Api.Import.CrabImport
{
using System;
using System.Threading;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace PostalRegistry.Api.CrabImport.CrabImport.Requests
namespace PostalRegistry.Api.Import.CrabImport.Requests
{
using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace PostalRegistry.Api.CrabImport.Infrastructure
namespace PostalRegistry.Api.Import.Infrastructure
{
using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace PostalRegistry.Api.CrabImport.Infrastructure.Configuration
namespace PostalRegistry.Api.Import.Infrastructure.Configuration
{
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace PostalRegistry.Api.CrabImport.Infrastructure
namespace PostalRegistry.Api.Import.Infrastructure
{
using System.Reflection;
using Asp.Versioning;
Expand All @@ -15,6 +15,6 @@ public class EmptyController : ApiController
public IActionResult Get()
=> Request.Headers[HeaderNames.Accept].ToString().Contains("text/html")
? (IActionResult)new RedirectResult("/docs")
: new OkObjectResult($"Welcome to the Basisregisters Vlaanderen Postal Information CrabImport Api {Assembly.GetEntryAssembly().GetVersionText()}.");
: new OkObjectResult($"Welcome to the Basisregisters Vlaanderen Postal Information Import Api {Assembly.GetEntryAssembly().GetVersionText()}.");
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace PostalRegistry.Api.CrabImport.Infrastructure.Modules
namespace PostalRegistry.Api.Import.Infrastructure.Modules
{
using Autofac;
using Autofac.Extensions.DependencyInjection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace PostalRegistry.Api.CrabImport.Infrastructure
namespace PostalRegistry.Api.Import.Infrastructure
{
using Be.Vlaanderen.Basisregisters.Api;
using Microsoft.AspNetCore.Hosting;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace PostalRegistry.Api.CrabImport.Infrastructure
namespace PostalRegistry.Api.Import.Infrastructure
{
using System;
using System.Linq;
Expand Down Expand Up @@ -135,12 +135,12 @@ public void Configure(
Info = groupName => $"Basisregisters.Vlaanderen - Postal Information Registry API {groupName}",
CSharpClientOptions =
{
ClassName = "PostalRegistryCrabImport",
ClassName = "PostalRegistryImport",
Namespace = "Be.Vlaanderen.Basisregisters"
},
TypeScriptClientOptions =
{
ClassName = "PostalRegistryCrabImport"
ClassName = "PostalRegistryImport"
}
},
Server =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@
<PropertyGroup>
<ServerGarbageCollection>true</ServerGarbageCollection>
<EnableDefaultContentItems>false</EnableDefaultContentItems>
<RootNamespace>PostalRegistry.Api.Import</RootNamespace>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>bin\Debug\net8.0\PostalRegistry.Api.CrabImport.xml</DocumentationFile>
<DocumentationFile>bin\Debug\net8.0\PostalRegistry.Api.Import.xml</DocumentationFile>
<NoWarn>1701;1702;1705;1591</NoWarn>
<DefineConstants>TRACE;DEBUG;NETCOREAPP;NET8_0</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DocumentationFile>bin\Release\net8.0\PostalRegistry.Api.CrabImport.xml</DocumentationFile>
<DocumentationFile>bin\Release\net8.0\PostalRegistry.Api.Import.xml</DocumentationFile>
<NoWarn>1701;1702;1705;1591</NoWarn>
</PropertyGroup>

<ItemGroup>
<Content Include="Dockerfile" CopyToOutputDirectory="Always" />
<Content Include="appsettings.json" CopyToOutputDirectory="Always" />
<Content Include="appsettings.*.json" CopyToOutputDirectory="Always" />
<Content Include="paket.template" CopyToOutputDirectory="Always" />
<Content Include="init.sh" CopyToOutputDirectory="Always" />
</ItemGroup>

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[assembly: AssemblyProduct("Basisregisters Vlaanderen")]
[assembly: AssemblyCopyright("Copyright (c) Vlaamse overheid")]
[assembly: AssemblyCompany("Vlaamse overheid")]
[assembly: AssemblyDescription("PostalRegistry CrabImport API")]
[assembly: AssemblyDescription("PostalRegistry Import API")]

[assembly: ComVisible(false)]
[assembly: Guid("ceaf80c8-7f68-426b-aaa1-eb913dadd6a7")]
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"PostalRegistry.Api.CrabImport": {
"PostalRegistry.Api.Import": {
"commandName": "Project",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
}
],
"Properties": {
"Application": "PostalRegistry - CrabImport API",
"Application": "PostalRegistry - Import API",
"ContainerId": "REPLACE_CONTAINERID"
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/PostalRegistry.Api.CrabImport/init.sh → src/PostalRegistry.Api.Import/init.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ CONTAINERID=$(curl -s http://169.254.170.2/v2/metadata | jq -r ".Containers[] |

sed -i "s/REPLACE_CONTAINERID/$CONTAINERID/g" appsettings.json

./PostalRegistry.Api.CrabImport
./PostalRegistry.Api.Import
File renamed without changes.

0 comments on commit 702cf2f

Please sign in to comment.