Skip to content

Commit 68d176b

Browse files
Merge branch 'dev'
2 parents ff52179 + 26a5d54 commit 68d176b

File tree

8 files changed

+30
-14
lines changed

8 files changed

+30
-14
lines changed

.github/workflows/create-release-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
aws-region: us-west-2
3232
# Retrieve the Access Token from Secrets Manager
3333
- name: Retrieve secret from AWS Secrets Manager
34-
uses: aws-actions/aws-secretsmanager-get-secrets@fbd65ea98e018858715f591f03b251f02b2316cb #v2.0.8
34+
uses: aws-actions/aws-secretsmanager-get-secrets@a9a7eb4e2f2871d30dc5b892576fde60a2ecc802 #v2.0.10
3535
with:
3636
secret-ids: |
3737
AWS_SECRET, ${{ secrets.RELEASE_WORKFLOW_ACCESS_TOKEN_NAME }}

.github/workflows/semgrep-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
p/owasp-top-ten
3636
3737
- name: Upload SARIF file for GitHub Advanced Security Dashboard
38-
uses: github/codeql-action/upload-sarif@28deaeda66b76a05916b6923827895f2b14ab387 #v3.28.16
38+
uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b #v3.29.2
3939
with:
4040
sarif_file: semgrep.sarif
4141
if: always()

.github/workflows/sync-master-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
aws-region: us-west-2
3333
# Retrieve the Access Token from Secrets Manager
3434
- name: Retrieve secret from AWS Secrets Manager
35-
uses: aws-actions/aws-secretsmanager-get-secrets@fbd65ea98e018858715f591f03b251f02b2316cb #v2.0.8
35+
uses: aws-actions/aws-secretsmanager-get-secrets@a9a7eb4e2f2871d30dc5b892576fde60a2ecc802 #v2.0.10
3636
with:
3737
secret-ids: |
3838
AWS_SECRET, ${{ secrets.RELEASE_WORKFLOW_ACCESS_TOKEN_NAME }}

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## Release 2025-07-30
2+
3+
### Amazon.ElasticBeanstalk.Tools (4.4.1)
4+
* Fixed an ElasticBeanstalk deployment issue for Linux platform where Procfile was sometimes being generated with incorrect entrypoint when multiple runtimeconfig.json files were present.
5+
16
## Release 2025-06-13
27

38
### Amazon.Lambda.Tools (5.13.0)

src/Amazon.Common.DotNetCli.Tools/Utilities.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,18 @@ public static string LookupTargetFrameworkFromProjectFile(string projectLocation
334334
return null;
335335
}
336336

337+
/// <summary>
338+
/// Looks up the assembly name from a project file.
339+
/// </summary>
340+
/// <param name="projectLocation">The location of the project file.</param>
341+
/// <param name="msBuildParameters">Additional MSBuild parameters passed by the user from the commandline</param>
342+
/// <returns>The assembly name of the project.</returns>
343+
public static string LookupAssemblyNameFromProjectFile(string projectLocation, string msBuildParameters)
344+
{
345+
var properties = LookupProjectProperties(projectLocation, msBuildParameters, "AssemblyName");
346+
return properties.TryGetValue("AssemblyName", out var assemblyName) ? assemblyName : null;
347+
}
348+
337349
/// <summary>
338350
/// Retrieve the `OutputType` property of a given project
339351
/// </summary>

src/Amazon.ElasticBeanstalk.Tools/Amazon.ElasticBeanstalk.Tools.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<Import Project="..\..\buildtools\common.props" />
44

@@ -10,7 +10,7 @@
1010
<PackAsTool>true</PackAsTool>
1111
<ToolCommandName>dotnet-eb</ToolCommandName>
1212
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
13-
<Version>4.4.0</Version>
13+
<Version>4.4.1</Version>
1414
<AssemblyName>dotnet-eb</AssemblyName>
1515
<Authors>Amazon Web Services</Authors>
1616
<Copyright>Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.</Copyright>

src/Amazon.ElasticBeanstalk.Tools/Commands/DeployEnvironmentCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ protected override async Task<bool> PerformActionAsync()
183183
}
184184

185185
this.Logger?.WriteLine("Configuring application bundle for a Linux deployment");
186-
EBUtilities.SetupPackageForLinux(this.Logger, this, this.DeployEnvironmentOptions, publishLocation, proxyServer, applicationPort);
186+
EBUtilities.SetupPackageForLinux(this.Logger, this, this.DeployEnvironmentOptions, publishLocation, proxyServer, applicationPort, projectLocation);
187187
}
188188

189189
zipArchivePath = Path.Combine(Directory.GetParent(publishLocation).FullName, new DirectoryInfo(projectLocation).Name + "-" + DateTime.Now.Ticks + ".zip");

src/Amazon.ElasticBeanstalk.Tools/EBUtilities.cs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Linq;
66
using System.Runtime.CompilerServices;
77
using Amazon.Common.DotNetCli.Tools;
8+
using Amazon.Common.DotNetCli.Tools.Options;
89
using Amazon.ElasticBeanstalk.Model;
910
using Amazon.ElasticBeanstalk.Tools.Commands;
1011
using ThirdParty.Json.LitJson;
@@ -109,25 +110,23 @@ public static bool IsLoadBalancedEnvironmentType(string environmentType)
109110
}
110111

111112

112-
public static void SetupPackageForLinux(IToolLogger logger, EBBaseCommand command, DeployEnvironmentProperties options, string publishLocation, string reverseProxy, int? applicationPort)
113+
public static void SetupPackageForLinux(IToolLogger logger, EBBaseCommand command, DeployEnvironmentProperties options, string publishLocation, string reverseProxy, int? applicationPort, string projectLocation)
113114
{
114115
// Setup Procfile
115116
var procfilePath = Path.Combine(publishLocation, "Procfile");
116117

117-
if(File.Exists(procfilePath))
118+
if (File.Exists(procfilePath))
118119
{
119120
logger?.WriteLine("Found existing Procfile file found and using that for deployment");
120121
return;
121122
}
122123

123124
logger?.WriteLine("Writing Procfile for deployment bundle");
124-
125-
var runtimeConfigFilePath = Directory.GetFiles(publishLocation, "*.runtimeconfig.json").FirstOrDefault();
126-
var runtimeConfigFileName = Path.GetFileName(runtimeConfigFilePath);
127-
var executingAssembly = runtimeConfigFileName.Substring(0, runtimeConfigFileName.Length - "runtimeconfig.json".Length - 1);
125+
var executingAssembly = Utilities.LookupAssemblyNameFromProjectFile(projectLocation, null);
126+
var runtimeConfigFilePath = Directory.GetFiles(publishLocation, $"{executingAssembly}.runtimeconfig.json").FirstOrDefault();
128127

129128
string webCommandLine;
130-
if(IsSelfContainedPublish(runtimeConfigFilePath))
129+
if (IsSelfContainedPublish(runtimeConfigFilePath))
131130
{
132131
webCommandLine = $"./{executingAssembly}";
133132
}
@@ -136,7 +135,7 @@ public static void SetupPackageForLinux(IToolLogger logger, EBBaseCommand comman
136135
webCommandLine = $"dotnet exec ./{executingAssembly}.dll";
137136
}
138137

139-
if(string.Equals(reverseProxy, EBConstants.PROXY_SERVER_NONE, StringComparison.InvariantCulture))
138+
if (string.Equals(reverseProxy, EBConstants.PROXY_SERVER_NONE, StringComparison.InvariantCulture))
140139
{
141140
logger?.WriteLine("... Proxy server disabled, configuring Kestrel to listen to traffic from all hosts");
142141
var port = applicationPort.HasValue ? applicationPort.Value : EBConstants.DEFAULT_APPLICATION_PORT;

0 commit comments

Comments
 (0)