Skip to content

Commit

Permalink
Many improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
amilochau committed Aug 8, 2024
1 parent 1b35548 commit cb0f8bb
Show file tree
Hide file tree
Showing 13 changed files with 67 additions and 105 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
build_api:
name: Build (API)
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
steps:
- uses: actions/checkout@v4
- name: Build solution
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
INFRA_AWS_ROLE_DEV: arn:aws:iam::266302224431:role/mil-management-shd-role-github-milochaucom
INFRA_AWS_ROLE_PRD: arn:aws:iam::266302224431:role/mil-management-shd-role-github-milochaucom
INFRA_AWS_REGION: eu-west-3
PROJECT_API_SOLUTION: './src/cv-api/Milochau.CV.Functions.sln'
PROJECT_API_SOLUTION: './src/cv-api/Milochau.CV.sln'
PROJECT_API_PUBLISH_FILTER: '*/bin/Release/net8.0/linux-x64/publish/bootstrap'
PROJECT_CLIENT_WORKSPACE: './src/cv-client'

Expand Down
2 changes: 2 additions & 0 deletions infra/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ module "functions_app" {
dynamodb_stream_triggers = v.dynamodb_stream_triggers
ses_accesses = v.ses_accesses
lambda_accesses = v.lambda_accesses
dynamodb_table_accesses = v.dynamodb_table_accesses
sns_topic_accesses = v.sns_topic_accesses
}
}
}
Expand Down
17 changes: 12 additions & 5 deletions infra/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ variable "lambda_settings" {
handler = optional(string, "bootstrap")
environment_variables = optional(map(string), {})
http_triggers = optional(list(object({
description = optional(string, null)
method = string
route = string
anonymous = optional(bool, false)
enable_cors = optional(bool, false)
description = optional(string, null)
method = string
route = string
request_parameters = optional(map(string), null)
anonymous = optional(bool, false)
enable_cors = optional(bool, false)
})), [])
sns_triggers = optional(list(object({
description = optional(string, null)
Expand All @@ -68,6 +69,12 @@ variable "lambda_settings" {
lambda_accesses = optional(list(object({
arn = string
})), [])
dynamodb_table_accesses = optional(list(object({
arn = string
})), [])
sns_topic_accesses = optional(list(object({
arn = string
})), [])
}))
})
}
Expand Down
36 changes: 36 additions & 0 deletions src/cv-api/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<Project>

<PropertyGroup>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<IsPackable>false</IsPackable>

<Company>Milochau</Company>
<Authors>Antoine Milochau</Authors>
<Copyright>Copyright © Milochau 2011-$([System.DateTime]::UtcNow.ToString(`yyyy`))</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>$(GITHUB_REPOSITORY)</PackageProjectUrl>
<RepositoryUrl>$(GITHUB_SERVER_URL)/$(GITHUB_REPOSITORY)</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<RepositoryBranch>$(GITHUB_REF)</RepositoryBranch>
<RepositoryCommit>$(GITHUB_SHA)</RepositoryCommit>
<PackageReadmeFile>README.md</PackageReadmeFile>

<Version>0.1.0-beta.1</Version>
<InformationalVersion Condition="('$(GITHUB_ACTION)' != '') And ('$(GITHUB_SHA)' != '')">$(Version)+$(GITHUB_ACTION)-$(GITHUB_SHA)</InformationalVersion>
<InformationalVersion Condition="('$(GITHUB_ACTION)' == '') Or ('$(GITHUB_SHA)' == '')">$(Version)+local</InformationalVersion>
</PropertyGroup>

<!-- Ensure InternalsVisibleTo for tests inside business assemblies only -->
<ItemGroup Condition="'$(IsTestProject)'!='true'">
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>$(AssemblyName).Tests</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>DynamicProxyGenAssembly2</_Parameter1>
</AssemblyAttribute>
</ItemGroup>

</Project>
69 changes: 0 additions & 69 deletions src/cv-api/Milochau.CV.Functions.sln

This file was deleted.

5 changes: 5 additions & 0 deletions src/cv-api/Milochau.CV.sln
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Milochau.CV.Http.Resumes.Po
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Milochau.CV.Shared.Data", "shared\data\Milochau.CV.Shared.Data.csproj", "{B03AE596-33A3-400C-AE06-FC2D52F0E430}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{658B9587-ADB9-4386-8DB9-CFEE69846BF1}"
ProjectSection(SolutionItems) = preProject
Directory.Build.props = Directory.Build.props
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<NuGetAudit>true</NuGetAudit>
<OutputType>exe</OutputType>
<AWSProjectType>Lambda</AWSProjectType>
<AssemblyName Condition=" '$(BuildSource)' == 'AwsCmd' ">bootstrap</AssemblyName>

<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Nullable>enable</Nullable>

<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<PublishAot>true</PublishAot>
<StripSymbols>true</StripSymbols>
Expand All @@ -29,7 +25,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Milochau.Core.Aws.ApiGateway" Version="0.2.16" />
<PackageReference Include="Milochau.Core.Aws.ApiGateway" Version="0.2.17-beta.4" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<NuGetAudit>true</NuGetAudit>
<OutputType>exe</OutputType>
<AWSProjectType>Lambda</AWSProjectType>
<AssemblyName Condition=" '$(BuildSource)' == 'AwsCmd' ">bootstrap</AssemblyName>

<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Nullable>enable</Nullable>

<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<PublishAot>true</PublishAot>
<StripSymbols>true</StripSymbols>
Expand All @@ -29,7 +25,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Milochau.Core.Aws.ApiGateway" Version="0.2.16" />
<PackageReference Include="Milochau.Core.Aws.ApiGateway" Version="0.2.17-beta.4" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<NuGetAudit>true</NuGetAudit>
<OutputType>exe</OutputType>
<AWSProjectType>Lambda</AWSProjectType>
<AssemblyName Condition=" '$(BuildSource)' == 'AwsCmd' ">bootstrap</AssemblyName>

<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Nullable>enable</Nullable>

<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<PublishAot>true</PublishAot>
<StripSymbols>true</StripSymbols>
Expand All @@ -29,7 +25,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Milochau.Core.Aws.ApiGateway" Version="0.2.16" />
<PackageReference Include="Milochau.Core.Aws.ApiGateway" Version="0.2.17-beta.4" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 2 additions & 6 deletions src/cv-api/shared/data/Milochau.CV.Shared.Data.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<NuGetAudit>true</NuGetAudit>
<IsPublishable>false</IsPublishable>

<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Nullable>enable</Nullable>

<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Milochau.Core.Aws.Abstractions" Version="0.2.16" />
<PackageReference Include="Milochau.Core.Aws.DynamoDB" Version="0.2.16" />
<PackageReference Include="Milochau.Core.Aws.Abstractions" Version="0.2.17-beta.4" />
<PackageReference Include="Milochau.Core.Aws.DynamoDB" Version="0.2.17-beta.4" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,13 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<NuGetAudit>true</NuGetAudit>
<IsPublishable>false</IsPublishable>

<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Nullable>enable</Nullable>

<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Milochau.Core.Aws.DynamoDB" Version="0.2.16" />
<PackageReference Include="Milochau.Core.Aws.DynamoDB" Version="0.2.17-beta.4" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<NuGetAudit>true</NuGetAudit>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Nullable>enable</Nullable>
<ValidateExecutableReferencesMatchSelfContained>false</ValidateExecutableReferencesMatchSelfContained>
<PlatformTarget>x64</PlatformTarget>
<IsPublishable>false</IsPublishable>
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Milochau.Core.Aws.Integration" Version="0.2.16" />
<PackageReference Include="Milochau.Core.Aws.Integration" Version="0.2.17-beta.4" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
</ItemGroup>

Expand Down

0 comments on commit cb0f8bb

Please sign in to comment.