add ZIP_URL azure deployment setting (for node_modules and possibly node.msi)
This commit is contained in:
Родитель
316ce4042f
Коммит
30fb60b60b
|
@ -14,10 +14,22 @@ if %ERRORLEVEL% NEQ 0 (
|
||||||
)
|
)
|
||||||
echo %DATE% %TIME% Permissions granted
|
echo %DATE% %TIME% Permissions granted
|
||||||
|
|
||||||
:install_node
|
if "%ZIP_URL%"=="" goto download_node
|
||||||
|
|
||||||
|
echo %DATE% %TIME% Downloading zip...
|
||||||
|
powershell -nologo -noprofile -c "Invoke-WebRequest %ZIP_URL% -OutFile %THIS%\pkg.zip"
|
||||||
|
echo %DATE% %TIME% Unzipping...
|
||||||
|
powershell -nologo -noprofile -c "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('pkg.zip', '.'); }"
|
||||||
|
echo %DATE% %TIME% Done unzipping.
|
||||||
|
|
||||||
|
:download_node
|
||||||
|
|
||||||
|
if exist %THIS%\node.msi goto install_node
|
||||||
|
|
||||||
echo %DATE% %TIME% Downloading node.js...
|
echo %DATE% %TIME% Downloading node.js...
|
||||||
powershell -c "Invoke-WebRequest %NODE_URL% -OutFile %THIS%\node.msi"
|
powershell -nologo -noprofile -c "Invoke-WebRequest %NODE_URL% -OutFile %THIS%\node.msi"
|
||||||
|
|
||||||
|
:install_node
|
||||||
|
|
||||||
echo %DATE% %TIME% Installing node.js...
|
echo %DATE% %TIME% Installing node.js...
|
||||||
msiexec /i %THIS%\node.msi /q
|
msiexec /i %THIS%\node.msi /q
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
<Setting name="AZURE_STORAGE_ACCESS_KEY" />
|
<Setting name="AZURE_STORAGE_ACCESS_KEY" />
|
||||||
<Setting name="TD_DEPLOYMENT_KEY" />
|
<Setting name="TD_DEPLOYMENT_KEY" />
|
||||||
<Setting name="TD_BLOB_DEPLOY_CHANNEL" />
|
<Setting name="TD_BLOB_DEPLOY_CHANNEL" />
|
||||||
|
<Setting name="ZIP_URL" />
|
||||||
</ConfigurationSettings>
|
</ConfigurationSettings>
|
||||||
<Imports/>
|
<Imports/>
|
||||||
<Startup>
|
<Startup>
|
||||||
|
@ -23,6 +24,9 @@
|
||||||
<Variable name="AZURE_STORAGE_ACCESS_KEY">
|
<Variable name="AZURE_STORAGE_ACCESS_KEY">
|
||||||
<RoleInstanceValue xpath="/RoleEnvironment/CurrentInstance/ConfigurationSettings/ConfigurationSetting[@name='AZURE_STORAGE_ACCESS_KEY']/@value" />
|
<RoleInstanceValue xpath="/RoleEnvironment/CurrentInstance/ConfigurationSettings/ConfigurationSetting[@name='AZURE_STORAGE_ACCESS_KEY']/@value" />
|
||||||
</Variable>
|
</Variable>
|
||||||
|
<Variable name="ZIP_URL">
|
||||||
|
<RoleInstanceValue xpath="/RoleEnvironment/CurrentInstance/ConfigurationSettings/ConfigurationSetting[@name='ZIP_URL']/@value" />
|
||||||
|
</Variable>
|
||||||
</Environment>
|
</Environment>
|
||||||
</Task>
|
</Task>
|
||||||
</Startup>
|
</Startup>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче