Skip to content

Commit fc89387

Browse files
author
Paul Ashton
committed
debugs
1 parent 7ca63a8 commit fc89387

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

src/aws.js

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,21 @@ async function getImageId(imageNameMatch) {
8787
async function sendstart(command) {
8888
const ec2 = new EC2Client({region: process.env.AWS_REGION});
8989

90-
ec2.send(command, (err, data) => {
91-
if (err) {
92-
console.log(err, err.stack);
93-
core.error(`Error: ${err}`)
94-
throw err;
95-
} else {
96-
const ec2InstanceIds = data.Instances.map(x => x.InstanceId); //[0].InstanceId; pass all instances instead of just first id
97-
core.info(`AWS EC2 instance(s) ${ec2InstanceIds} is started`);
98-
return ec2InstanceIds;
99-
}
100-
});
90+
console.log("sendstart")
91+
const response = await ec2.send(command); //, (err, data) => {
92+
console.log("response")
93+
console.log(response)
94+
console.log("endresponse")
95+
// if (err) {
96+
// console.log(err, err.stack);
97+
// core.error(`Error: ${err}`)
98+
// throw err;
99+
// } else {
100+
// const ec2InstanceIds = data.Instances.map(x => x.InstanceId); //[0].InstanceId; pass all instances instead of just first id
101+
// core.info(`AWS EC2 instance(s) ${ec2InstanceIds} is started`);
102+
// return ec2InstanceIds;
103+
// }
104+
// });
101105
}
102106

103107
async function startEc2Instance(label, githubRegistrationToken) {

0 commit comments

Comments
 (0)