-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switched AzureStaticWebApp to new swa client api and added custom bui…
…ld variable functionality (#15353) * added Azure Static Web App task * accidental submodule fixed * changed guid * altered dependencies to fit with build restrictions * added task to make-options and added task owners to codeowners * added compatibility with api token as task input * fixed task version * added skip_app_build input * switching to the new swa api * small task.json capitilization change * _ * merged task variables development branch * updated version * added config_file_location, added system.debug compatibility, added logic to delete the env file, and fixed a typo * implemented and modified Anthony's changes to get build vars from the task environment * changed wording * fixed make script bug and other small changes * minor helptext change * updated task version Co-authored-by: BrandonHopcraft <[email protected]> Co-authored-by: shigupt202 <[email protected]> Co-authored-by: Rohit Batra <[email protected]> Co-authored-by: Anatoly Bolshakov <[email protected]> Co-authored-by: Bishal Prasad <[email protected]>
- Loading branch information
1 parent
27a985a
commit 2aa5a34
Showing
6 changed files
with
756 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
[ | ||
"LANG", | ||
"ORYX_PATH", | ||
"HOSTNAME", | ||
"VERBOSE", | ||
"BASE_BRANCH", | ||
"DOTNET_SKIP_FIRST_TIME_EXPERIENCE", | ||
"BUILD_TIMEOUT_IN_MINUTES", | ||
"BRANCH", | ||
"ORYX_SDK_STORAGE_BASE_URL", | ||
"NUGET_XMLDOC_MODE", | ||
"DEPLOYMENT_PROVIDER", | ||
"ORYX_PATHS", | ||
"PWD", | ||
"HOME", | ||
"ENABLE_DYNAMIC_INSTALL", | ||
"APP_LOCATION", | ||
"REPOSITORY_URL", | ||
"API_LOCATION", | ||
"DEPLOYMENT_TOKEN", | ||
"REPOSITORY_BASE", | ||
"API_BUILD_COMMAND", | ||
"DEBIAN_FLAVOR", | ||
"SKIP_APP_BUILD", | ||
"ORYX_BUILDIMAGE_TYPE", | ||
"IS_PULL_REQUEST", | ||
"OUTPUT_LOCATION", | ||
"SHLVL", | ||
"ORYX_AI_INSTRUMENTATION_KEY", | ||
"CONFIG_FILE_LOCATION", | ||
"APP_BUILD_COMMAND", | ||
"PATH", | ||
"GITHUB_WORKSPACE", | ||
"ROUTES_LOCATION", | ||
"ORIGINAL_PATH", | ||
"DEPLOYMENT_ACTION", | ||
"NUGET_PACKAGES" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,5 @@ | ||
workspace="/working_dir" | ||
mount_dir=$SYSTEM_DEFAULTWORKINGDIRECTORY | ||
[[ -n "$SWA_WORKING_DIR" ]] && mount_dir=$SWA_WORKING_DIR | ||
|
||
params=() | ||
|
||
[[ ! -z "$SWA_APP_LOCATION" ]] && params+=(-e "INPUT_APP_LOCATION=$SWA_APP_LOCATION") | ||
[[ ! -z "$SWA_APP_BUILD_COMMAND" ]] && params+=(-e "INPUT_APP_BUILD_COMMAND=$SWA_APP_BUILD_COMMAND") | ||
[[ ! -z "$SWA_OUTPUT_LOCATION" ]] && params+=(-e "INPUT_OUTPUT_LOCATION=$SWA_OUTPUT_LOCATION") | ||
[[ ! -z "$SWA_API_LOCATION" ]] && params+=(-e "INPUT_API_LOCATION=$SWA_API_LOCATION") | ||
[[ ! -z "$SWA_API_BUILD_COMMAND" ]] && params+=(-e "INPUT_API_BUILD_COMMAND=$SWA_API_BUILD_COMMAND") | ||
[[ ! -z "$SWA_ROUTES_LOCATION" ]] && params+=(-e "INPUT_ROUTES_LOCATION=$SWA_ROUTES_LOCATION") | ||
|
||
params+=(-e "INPUT_SKIP_APP_BUILD=$SWA_SKIP_APP_BUILD") | ||
|
||
docker run \ | ||
-e INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN="$SWA_API_TOKEN" \ | ||
-e GITHUB_WORKSPACE=$workspace \ | ||
-e DEPLOYMENT_PROVIDER=DevOps \ | ||
-e REPOSITORY_URL="$BUILD_REPOSITORY_URI" \ | ||
-e IS_PULL_REQUEST=false \ | ||
-e BASE_BRANCH="$BUILD_SOURCEBRANCHNAME" \ | ||
"${params[@]}" \ | ||
-v "$mount_dir:$workspace" \ | ||
--env-file ./env.list \ | ||
-v "$SWA_WORKING_DIR:$SWA_WORKSPACE_DIR" \ | ||
"$SWA_DEPLOYMENT_CLIENT" \ | ||
./bin/staticsites/StaticSitesClient upload | ||
./bin/staticsites/StaticSitesClient run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"cp": [ | ||
{ | ||
"source": "envVarDenylist.json" | ||
} | ||
] | ||
} |
Oops, something went wrong.