Skip to content

Commit 2b8154c

Browse files
author
GitHub Actions
committed
chore: Update dist
1 parent f0b3966 commit 2b8154c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

dist/index.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ async function updateEcsService(ecs, clusterName, service, taskDefArn, waitForSe
152152
service: service,
153153
taskDefinition: taskDefArn
154154
}).promise();
155+
core.info(`Deployment started. Watch this deployment's progress in the Amazon ECS console: https://console.aws.amazon.com/ecs/home?region=${aws.config.region}#/clusters/${clusterName}/services/${service}/events`);
155156

156157
// Wait for service stability
157158
if (waitForService && waitForService.toLowerCase() === 'true') {
@@ -296,6 +297,7 @@ async function createCodeDeployDeployment(codedeploy, clusterName, service, task
296297
}
297298
}).promise();
298299
core.setOutput('codedeploy-deployment-id', createDeployResponse.deploymentId);
300+
core.info(`Deployment started. Watch this deployment's progress in the AWS CodeDeploy console: https://console.aws.amazon.com/codesuite/codedeploy/deployments/${createDeployResponse.deploymentId}?region=${aws.config.region}`);
299301

300302
// Wait for deployment to complete
301303
if (waitForService && waitForService.toLowerCase() === 'true') {
@@ -347,7 +349,15 @@ async function run() {
347349
path.join(process.env.GITHUB_WORKSPACE, taskDefinitionFile);
348350
const fileContents = fs.readFileSync(taskDefPath, 'utf8');
349351
const taskDefContents = removeIgnoredAttributes(cleanNullKeys(yaml.parse(fileContents)));
350-
const registerResponse = await ecs.registerTaskDefinition(taskDefContents).promise();
352+
let registerResponse;
353+
try {
354+
registerResponse = await ecs.registerTaskDefinition(taskDefContents).promise();
355+
} catch (error) {
356+
core.setFailed("Failed to register task definition in ECS: " + error.message);
357+
core.debug("Task definition contents:");
358+
core.debug(JSON.stringify(taskDefContents, undefined, 4));
359+
throw(error);
360+
}
351361
const taskDefArn = registerResponse.taskDefinition.taskDefinitionArn;
352362
core.setOutput('task-definition-arn', taskDefArn);
353363

0 commit comments

Comments
 (0)