This commit is contained in:
Varun Sharma 2023-11-13 19:48:31 -08:00
commit 550c2d137a
3 changed files with 9 additions and 13 deletions

12
dist/pre/index.js vendored
View file

@ -95713,18 +95713,14 @@ var setup_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _ar
const resp = yield lib_axios.get(`${api_url}/github/${process.env["GITHUB_REPOSITORY"]}/actions/runs/${process.env["GITHUB_RUN_ID"]}/monitor`, { timeout: 3000 });
statusCode = resp.status; // adding error code to check whether agent is getting installed or not.
console.log(`statuscode: ${statusCode}`);
/*fs.appendFileSync(
process.env.GITHUB_STATE,
`monitorStatusCode=${statusCode}${EOL}`,
{
external_fs_.appendFileSync(process.env.GITHUB_STATE, `monitorStatusCode=${statusCode}${external_os_.EOL}`, {
encoding: "utf8",
}
);*/
});
}
catch (e) {
console.log(`error in connecting to ${api_url}: ${e}`);
}
return;
//return;
console.log(`Step Security Job Correlation ID: ${correlation_id}`);
if (String(statusCode) === STATUS_HARDEN_RUNNER_UNAVAILABLE) {
console.log(HARDEN_RUNNER_UNAVAILABLE_MESSAGE);
@ -95759,7 +95755,7 @@ var setup_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _ar
var logFile = "/home/agent/agent.log";
var counter = 0;
yield sleep(5000);
while (false) {
while (true) {
if (!external_fs_.existsSync(statusFile)) {
counter++;
if (counter > 30) {

File diff suppressed because one or more lines are too long

View file

@ -161,17 +161,17 @@ import { isArcRunner, sendAllowedEndpoints } from "./arc-runner";
statusCode = resp.status; // adding error code to check whether agent is getting installed or not.
console.log(`statuscode: ${statusCode}`);
/*fs.appendFileSync(
fs.appendFileSync(
process.env.GITHUB_STATE,
`monitorStatusCode=${statusCode}${EOL}`,
{
encoding: "utf8",
}
);*/
);
} catch (e) {
console.log(`error in connecting to ${api_url}: ${e}`);
}
return;
//return;
console.log(`Step Security Job Correlation ID: ${correlation_id}`);
if (String(statusCode) === common.STATUS_HARDEN_RUNNER_UNAVAILABLE) {
console.log(common.HARDEN_RUNNER_UNAVAILABLE_MESSAGE);
@ -217,7 +217,7 @@ import { isArcRunner, sendAllowedEndpoints } from "./arc-runner";
var logFile = "/home/agent/agent.log";
var counter = 0;
await sleep(5000);
while (false) {
while (true) {
if (!fs.existsSync(statusFile)) {
counter++;
if (counter > 30) {