Skip to content

Commit 9d49ab2

Browse files
committed
Use new shortcut link to log in and view deployments
1 parent b80f74a commit 9d49ab2

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

dist/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,17 @@ async function run() {
6868
}
6969
const { awsAccountAlias, awsAccountId } = await getAccountInformation();
7070
const region = codeDeploy.config.region;
71-
const linkToLogIn = 'https://aws.byu.edu/';
72-
const linkToDeployment = `https://${region}.console.aws.amazon.com/codesuite/codedeploy/deployments/${deployment.deploymentId}?region=${region}`;
71+
const iamRole = `PowerUser-${awsAccountId}`;
72+
const destinationUrl = `https://${region}.console.aws.amazon.com/codesuite/codedeploy/deployments/${deployment.deploymentId}?region=${region}`;
73+
const shortcutLink = `https://byulogin.awsapps.com/start/#/console?account_id=${encodeURIComponent(awsAccountId)}&role_name=${encodeURIComponent(iamRole)}&destination=${encodeURIComponent(destinationUrl)}`;
7374
core.info(`Started deployment.
7475

7576
Deployment ID: ${deployment.deploymentId}
7677
AWS Account: ${awsAccountAlias} (${awsAccountId})
7778
Region: ${region}
7879

79-
To view the progress of this deployment:
80-
• Log into the ${awsAccountAlias} AWS account at ${linkToLogIn}
81-
• Go to ${linkToDeployment}`);
80+
To log in and view the progress of this deployment, click here:
81+
${shortcutLink}`);
8282
await codeDeploy
8383
.waitFor('deploymentSuccessful', {
8484
deploymentId: deployment.deploymentId

src/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ async function run(): Promise<void> {
3939

4040
const {awsAccountAlias, awsAccountId} = await getAccountInformation()
4141
const region = codeDeploy.config.region
42-
const linkToLogIn = 'https://aws.byu.edu/'
43-
const linkToDeployment = `https://${region}.console.aws.amazon.com/codesuite/codedeploy/deployments/${deployment.deploymentId}?region=${region}`
42+
const iamRole = `PowerUser-${awsAccountId}`
43+
const destinationUrl = `https://${region}.console.aws.amazon.com/codesuite/codedeploy/deployments/${deployment.deploymentId}?region=${region}`
44+
const shortcutLink = `https://byulogin.awsapps.com/start/#/console?account_id=${encodeURIComponent(awsAccountId)}&role_name=${encodeURIComponent(iamRole)}&destination=${encodeURIComponent(destinationUrl)}`
4445
core.info(`Started deployment.
4546
4647
Deployment ID: ${deployment.deploymentId}
4748
AWS Account: ${awsAccountAlias} (${awsAccountId})
4849
Region: ${region}
4950
50-
To view the progress of this deployment:
51-
• Log into the ${awsAccountAlias} AWS account at ${linkToLogIn}
52-
• Go to ${linkToDeployment}`)
51+
To log in and view the progress of this deployment, click here:
52+
${shortcutLink}`)
5353

5454
await codeDeploy
5555
.waitFor('deploymentSuccessful', {

0 commit comments

Comments
 (0)