Skip to content

Commit 7893ce0

Browse files
[AzureStaticWebAppV0] Add skip_api_build to Devops Task (#15996)
* Update task.json * Update index.ts * Update task.json
1 parent 7abd0ed commit 7893ce0

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

Tasks/AzureStaticWebAppV0/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ async function createDockerEnvVarFile(envVarFilePath: string) {
7878
const configFileLocation: string = tl.getInput(configFileLocationInputName, false) || "";
7979

8080
const skipAppBuild: boolean = tl.getBoolInput('skip_app_build', false);
81+
const skipApiBuild: boolean = tl.getBoolInput('skip_api_build', false);
8182
const apiToken: string = process.env[apiTokenInputName] || tl.getInput(apiTokenInputName, false) || "";
8283

8384
const systemVerbose = getNullableBooleanFromString(process.env['SYSTEM_DEBUG']);
@@ -98,6 +99,7 @@ async function createDockerEnvVarFile(envVarFilePath: string) {
9899
addInputStringToString("CONFIG_FILE_LOCATION", configFileLocation, configFileLocationInputName);
99100

100101
addSystemVariableToString("SKIP_APP_BUILD", skipAppBuild.toString());
102+
addSystemVariableToString("SKIP_API_BUILD", skipApiBuild.toString());
101103
addSystemVariableToString("VERBOSE", verbose.toString());
102104

103105
addInputStringToString("DEPLOYMENT_TOKEN", apiToken, apiTokenInputName);
@@ -154,4 +156,4 @@ function getNullableBooleanFromString(boolString:string): boolean {
154156
return null;
155157
}
156158

157-
run();
159+
run();

Tasks/AzureStaticWebAppV0/task.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"demands": [],
1515
"version": {
1616
"Major": "0",
17-
"Minor": "200",
17+
"Minor": "202",
1818
"Patch": "0"
1919
},
2020
"preview": true,
@@ -97,6 +97,14 @@
9797
"required": false,
9898
"helpMarkDown": "Skips Oryx build for app folder"
9999
},
100+
{
101+
"name": "skip_api_build",
102+
"type": "boolean",
103+
"label": "Skip api build",
104+
"defaultValue": "",
105+
"required": false,
106+
"helpMarkDown": "Skips Oryx build for api folder"
107+
},
100108
{
101109
"name": "verbose",
102110
"type": "boolean",
@@ -128,4 +136,4 @@
128136
"argumentFormat": ""
129137
}
130138
}
131-
}
139+
}

0 commit comments

Comments
 (0)