Skip to content

Commit bab04e4

Browse files
committed
debugging.
1 parent 301107e commit bab04e4

File tree

2 files changed

+22
-23
lines changed

2 files changed

+22
-23
lines changed

.github/workflows/test.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,8 @@ jobs:
5555
INPUT_AZURE_STORAGE_INPUTS_CONTAINER_NAME: ${{ vars.AZURE_STORAGE_INPUTS_CONTAINER_NAME }}
5656
INPUT_AZURE_STORAGE_BLOB_NAME: ${{ vars.AZURE_STORAGE_BLOB_NAME }}
5757
run: |
58+
pwd
59+
echo "------"
60+
ls -lha
61+
echo "-----"
5862
node tests/test.js

index.js

+18-23
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,15 @@ async function run() {
4040
assertEnvVarsDefined(environmentVariables);
4141

4242
const accountName = core.getInput(accountNameENV);
43-
console.log("---1");
4443

4544
const blobServiceClient = new BlobServiceClient(
4645
`https://${accountName}.blob.core.windows.net`,
4746
new DefaultAzureCredential()
4847
);
49-
console.log("---2");
5048

5149
const containerName = core.getInput(containerNameEnv);
52-
console.log("---3");
5350
const containerClient = blobServiceClient.getContainerClient(containerName);
54-
console.log("---4");
5551
const blobBaseName = core.getInput(blobBaseNameEnv);
56-
console.log("---5");
5752

5853
try {
5954
const inputsContainerClient = blobServiceClient.getContainerClient(
@@ -62,24 +57,24 @@ async function run() {
6257
const inputsPath = await upload.run(core.getInput(inputsPathEnv), inputsContainerClient);
6358
const dependenciesPath = await upload.run(core.getInput(dependenciesPathEnv), inputsContainerClient);
6459

65-
// const subcommand = core.getInput('subcommand');
66-
// if (subcommand === 'synchronous') {
67-
// const clientWorkflowId = await submit.run(containerClient, blobBaseName, workflowPath, inputsPath, dependenciesPath);
68-
// await monitor.run(containerClient, clientWorkflowId);
69-
// } else if (subcommand === 'submit') {
70-
// const clientWorkflowId = await submit.run(containerClient, blobBaseName, workflowPath, inputsPath, dependenciesPath);
71-
// core.setOutput('workflowId', clientWorkflowId);
72-
// } else if (subcommand === 'monitor') {
73-
// const clientWorkflowId = core.getInput("workflow_id");
74-
// if (!clientWorkflowId) {
75-
// const msg = "workflow_id environment variable not defined.";
76-
// core.sefFailed(msg);
77-
// throw new Error(msg);
78-
// }
79-
// await monitor.run(containerClient, clientWorkflowId);
80-
// } else {
81-
// throw new Error(`Unknown subcommand: ${subcommand}`);
82-
// }
60+
const subcommand = core.getInput('subcommand');
61+
if (subcommand === 'synchronous') {
62+
const clientWorkflowId = await submit.run(containerClient, blobBaseName, workflowPath, inputsPath, dependenciesPath);
63+
await monitor.run(containerClient, clientWorkflowId);
64+
} else if (subcommand === 'submit') {
65+
const clientWorkflowId = await submit.run(containerClient, blobBaseName, workflowPath, inputsPath, dependenciesPath);
66+
core.setOutput('workflowId', clientWorkflowId);
67+
} else if (subcommand === 'monitor') {
68+
const clientWorkflowId = core.getInput("workflow_id");
69+
if (!clientWorkflowId) {
70+
const msg = "workflow_id environment variable not defined.";
71+
core.sefFailed(msg);
72+
throw new Error(msg);
73+
}
74+
await monitor.run(containerClient, clientWorkflowId);
75+
} else {
76+
throw new Error(`Unknown subcommand: ${subcommand}`);
77+
}
8378
} catch (error) {
8479
console.error('Error in main script:', error);
8580
core.setFailed(error.message);

0 commit comments

Comments
 (0)