You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Use correct host for China region console (#309)
The China region's console is located at https://console.amazonaws.cn/.
This PR checks the region configured and prints the correct console link
since the global console doesn't auto redirect.
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
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`);
core.info(`Deployment started. Watch this deployment's progress in the Amazon ECS console: https://${consoleHostname}/ecs/home?region=${aws.config.region}#/clusters/${clusterName}/services/${service}/events`);
281
284
282
285
// Wait for service stability
283
286
if (waitForService && waitForService.toLowerCase() === 'true') {
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`);
core.info(`Deployment started. Watch this deployment's progress in the Amazon ECS console: https://${consoleHostname}/ecs/home?region=${aws.config.region}#/clusters/${clusterName}/services/${service}/events`);
@@ -165,6 +167,17 @@ describe('Deploy to ECS', () => {
165
167
expect(core.info).toBeCalledWith("Deployment started. Watch this deployment's progress in the Amazon ECS console: https://console.aws.amazon.com/ecs/home?region=fake-region#/clusters/cluster-789/services/service-456/events");
166
168
});
167
169
170
+
test('prints Chinese console domain for cn regions',async()=>{
171
+
constoriginalRegion=config.region;
172
+
config.region='cn-fake-region';
173
+
awaitrun();
174
+
175
+
expect(core.info).toBeCalledWith("Deployment started. Watch this deployment's progress in the Amazon ECS console: https://console.amazonaws.cn/ecs/home?region=cn-fake-region#/clusters/cluster-789/services/service-456/events");
176
+
177
+
// reset
178
+
config.region=originalRegion;
179
+
});
180
+
168
181
test('cleans null keys out of the task definition contents',async()=>{
0 commit comments