16
16
using System ;
17
17
using System . Collections . Generic ;
18
18
19
- namespace Infrastructure
19
+ namespace Infrastructure ;
20
+
21
+ internal class Configuration
20
22
{
21
- internal class Configuration
22
- {
23
- public string AccountId { get ; } = Environment . GetEnvironmentVariable ( "AWS_LAMBDA_PIPELINE_ACCOUNT_ID" ) ;
24
- public string CodeCommitAccountId { get ; } = Environment . GetEnvironmentVariable ( "AWS_LAMBDA_PIPELINE_CODECOMMIT_ACCOUNT_ID" ) ;
25
- public string Region { get ; } = Environment . GetEnvironmentVariable ( "AWS_LAMBDA_PIPELINE_REGION" ) ;
23
+ public string AccountId { get ; } = Environment . GetEnvironmentVariable ( "AWS_LAMBDA_PIPELINE_ACCOUNT_ID" ) ;
24
+ public string Region { get ; } = Environment . GetEnvironmentVariable ( "AWS_LAMBDA_PIPELINE_REGION" ) ;
26
25
27
- public Source Source { get ; } = new Source ( ) ;
28
- public Ecrs Ecrs { get ; } = new Ecrs ( ) ;
29
- public readonly string [ ] EcrRepositoryNames = Environment . GetEnvironmentVariable ( "AWS_LAMBDA_ECR_REPOSITORY_NAME" ) ? . Split ( ";" ) ;
30
- public const string ProjectRoot = "LambdaRuntimeDockerfiles/Infrastructure/src/Infrastructure" ;
31
- public const string ProjectName = "aws-lambda-container-images" ;
32
- public readonly string [ ] DockerARM64Images = new string [ ] { "net6" , "net7" , "net8" } ;
33
- // DotnetSdkVersions is used to specify a specific version of the .NET SDK to be installed on the CodeBuild image
34
- // The default behavior is to specify a channel and that installs the latest version in that channel
35
- // By specifying a specific .NET SDK version, you override the default channel behavior
36
- public readonly Dictionary < string , string > DotnetSdkVersions = new Dictionary < string , string > { } ;
37
- public readonly Dictionary < string , string > DockerBuildImages = new Dictionary < string , string > { { "net6" , "6.0-bullseye-slim" } , { "net7" , "7.0-bullseye-slim" } , { "net8" , "8.0-bookworm-slim" } } ;
38
- public readonly Dictionary < string , string > BaseImageAMD64Tags = new Dictionary < string , string > { { "net6" , "contributed-base-image-x86_64" } , { "net7" , "contributed-base-image-x86_64" } , { "net8" , "contributed-base-image-x86_64" } } ;
39
- public readonly Dictionary < string , string > BaseImageARM64Tags = new Dictionary < string , string > { { "net6" , "contributed-base-image-arm64" } , { "net7" , "contributed-base-image-arm64" } , { "net8" , "contributed-base-image-arm64" } } ;
40
- public readonly string [ ] Frameworks = Environment . GetEnvironmentVariable ( "AWS_LAMBDA_DOTNET_FRAMEWORK_VERSION" ) ? . Split ( ";" ) ;
41
- public readonly string [ ] Channels = Environment . GetEnvironmentVariable ( "AWS_LAMBDA_DOTNET_FRAMEWORK_CHANNEL" ) ? . Split ( ";" ) ;
42
- }
26
+ public string GitHubTokenSecretName { get ; } = Environment . GetEnvironmentVariable ( "AWS_LAMBDA_GITHUB_TOKEN_SECRET_NAME" ) ;
43
27
44
- internal class Source
45
- {
46
- public string RepositoryArn { get ; } = Environment . GetEnvironmentVariable ( "AWS_LAMBDA_SOURCE_REPOSITORY_ARN" ) ;
47
- public string BranchName { get ; } = Environment . GetEnvironmentVariable ( "AWS_LAMBDA_SOURCE_BRANCH_NAME" ) ;
48
- }
28
+ public string GitHubTokenSecretKey { get ; } = Environment . GetEnvironmentVariable ( "AWS_LAMBDA_GITHUB_TOKEN_SECRET_KEY" ) ;
29
+ public string GitHubOwner { get ; } = Environment . GetEnvironmentVariable ( "AWS_LAMBDA_GITHUB_REPO_OWNER" ) ;
30
+ public string GitHubRepository { get ; } = Environment . GetEnvironmentVariable ( "AWS_LAMBDA_GITHUB_REPO_NAME" ) ;
31
+ public string GitHubBranch { get ; } = Environment . GetEnvironmentVariable ( "AWS_LAMBDA_GITHUB_REPO_BRANCH" ) ;
32
+ public Ecrs Ecrs { get ; } = new Ecrs ( ) ;
33
+ public readonly string [ ] EcrRepositoryNames = Environment . GetEnvironmentVariable ( "AWS_LAMBDA_ECR_REPOSITORY_NAME" ) ? . Split ( ";" ) ;
34
+ public const string ProjectRoot = "LambdaRuntimeDockerfiles/Infrastructure/src/Infrastructure" ;
35
+ public static readonly string ProjectName = $ "aws-lambda-container-images{ Environment . GetEnvironmentVariable ( "AWS_LAMBDA_PIPELINE_NAME_SUFFIX" ) } ";
36
+ public readonly string [ ] DockerArm64Images = new string [ ] { "net6" , "net8" , "net9" } ;
37
+ // DotnetSdkVersions is used to specify a specific version of the .NET SDK to be installed on the CodeBuild image
38
+ // The default behavior is to specify a channel and that installs the latest version in that channel
39
+ // By specifying a specific .NET SDK version, you override the default channel behavior
40
+ public readonly Dictionary < string , string > DotnetSdkVersions = new Dictionary < string , string > { } ;
41
+ public readonly Dictionary < string , string > DockerBuildImages = new Dictionary < string , string > { { "net6" , "6.0-bullseye-slim" } , { "net8" , "8.0-bookworm-slim" } , { "net9" , "9.0-bookworm-slim" } } ;
42
+ public readonly Dictionary < string , string > BaseImageAmd64Tags = new Dictionary < string , string > { { "net6" , "contributed-base-image-x86_64" } , { "net8" , "contributed-base-image-x86_64" } , { "net9" , "contributed-base-image-x86_64" } } ;
43
+ public readonly Dictionary < string , string > BaseImageArm64Tags = new Dictionary < string , string > { { "net6" , "contributed-base-image-arm64" } , { "net8" , "contributed-base-image-arm64" } , { "net9" , "contributed-base-image-arm64" } } ;
44
+ public readonly string [ ] Frameworks = Environment . GetEnvironmentVariable ( "AWS_LAMBDA_DOTNET_FRAMEWORK_VERSION" ) ? . Split ( ";" ) ;
45
+ public readonly string [ ] Channels = Environment . GetEnvironmentVariable ( "AWS_LAMBDA_DOTNET_FRAMEWORK_CHANNEL" ) ? . Split ( ";" ) ;
46
+ }
49
47
50
- internal class Ecrs
51
- {
52
- public string Stage { get ; } = Environment . GetEnvironmentVariable ( "AWS_LAMBDA_STAGE_ECR" ) ;
53
- public string Beta { get ; } = Environment . GetEnvironmentVariable ( "AWS_LAMBDA_BETA_ECRS" ) ;
54
- public string Prod { get ; } = Environment . GetEnvironmentVariable ( "AWS_LAMBDA_PROD_ECRS" ) ;
55
- }
48
+ internal class Ecrs
49
+ {
50
+ public string Stage { get ; } = Environment . GetEnvironmentVariable ( "AWS_LAMBDA_STAGE_ECR" ) ;
51
+ public string Beta { get ; } = Environment . GetEnvironmentVariable ( "AWS_LAMBDA_BETA_ECRS" ) ;
52
+ public string Prod { get ; } = Environment . GetEnvironmentVariable ( "AWS_LAMBDA_PROD_ECRS" ) ;
56
53
}
0 commit comments