@@ -160388,14 +160388,16 @@ async function getImageId(imageNameMatch) {
160388160388 }
160389160389}
160390160390
160391- async function sendstart(command) {
160392- const ec2 = new EC2Client({region: process.env.AWS_REGION});
160393-
160394- console.log("sendstart")
160395- const response = await ec2.send(command); //, (err, data) => {
160396- console.log("response")
160397- console.log(response)
160398- console.log("endresponse")
160391+ // async function sendstart(command) {
160392+ // const ec2 = new EC2Client({region: process.env.AWS_REGION});
160393+
160394+ // console.log("sendstart")
160395+ // const response = await ec2.send(command); //, (err, data) => {
160396+ // console.log("response")
160397+ // console.log(response)
160398+ // console.log("endresponse")
160399+ // console.log(response.Instances.map(x => x.InstanceId));
160400+ // return response.Instances.map(x => x.InstanceId);
160399160401 // if (err) {
160400160402 // console.log(err, err.stack);
160401160403 // core.error(`Error: ${err}`)
@@ -160406,7 +160408,7 @@ async function sendstart(command) {
160406160408 // return ec2InstanceIds;
160407160409 // }
160408160410 // });
160409- }
160411+ // }
160410160412
160411160413async function startEc2Instance(label, githubRegistrationToken) {
160412160414 const userData = buildUserDataScript(githubRegistrationToken, label);
@@ -160433,13 +160435,20 @@ async function startEc2Instance(label, githubRegistrationToken) {
160433160435 }
160434160436 }
160435160437
160436- //const ec2 = new EC2Client({region: process.env.AWS_REGION});
160438+ const ec2 = new EC2Client({region: process.env.AWS_REGION});
160439+
160440+ const command = new RunInstancesCommand(params);
160437160441
160438- const runInstancesCommand = new RunInstancesCommand(params);
160442+ console.log("sendstart")
160443+ const response = await ec2.send(command); //, (err, data) => {
160444+ console.log("response")
160445+ console.log(response)
160446+ console.log("endresponse")
160447+ console.log(response.Instances.map(x => x.InstanceId));
160448+ return response.Instances.map(x => x.InstanceId);
160439160449
160440- //console.log("beforesend")
160441- const instanceIds = await sendstart(runInstancesCommand)
160442- return instanceIds
160450+ // const instanceIds = await sendstart(runInstancesCommand)
160451+ // return instanceIds
160443160452 // await ec2.send(runInstancesCommand, (err, data) => {
160444160453 // if (err) {
160445160454 // console.log(err, err.stack);
0 commit comments