Merge pull request #1 from Azure/do-not-use-build-arg
Do not use build arg to support Azure Pipeline
This commit is contained in:
Коммит
b059bf652d
|
@ -3,9 +3,18 @@ SETLOCAL EnableDelayedExpansion
|
|||
|
||||
set PROJECT_PATH=%1
|
||||
set PROJECT_OUTPUT_PATH=%2
|
||||
set PROJECT_CONFIGURATION="%3"
|
||||
set PROJECT_CONFIGURATION=%3
|
||||
set UCRT_DLL_PATH="%WindowsSdkVerBinPath%\x64\ucrt"
|
||||
set VS_CRT_REDIST_WILDCARD_FOLDER= ("%VcToolsRedistDir%onecore\x64\Microsoft.VC*.CRT")
|
||||
set DEFAULT_OUTPUT_PATH="%~dp0\bin\iotedgeoutput"
|
||||
|
||||
if "%PROJECT_OUTPUT_PATH%" == "" (
|
||||
set PROJECT_OUTPUT_PATH=%DEFAULT_OUTPUT_PATH%
|
||||
)
|
||||
|
||||
if "%PROJECT_CONFIGURATION%" == "" (
|
||||
set PROJECT_CONFIGURATION="Release"
|
||||
)
|
||||
|
||||
:: Check execution environment
|
||||
if "%VSINSTALLDIR%" == "" (
|
||||
|
@ -13,8 +22,8 @@ if "%VSINSTALLDIR%" == "" (
|
|||
)
|
||||
|
||||
for /D %%A in %VS_CRT_REDIST_WILDCARD_FOLDER% do (
|
||||
call robocopy.exe "%%~A" %PROJECT_OUTPUT_PATH% /S /E >nul
|
||||
if !ERRORLEVEL! LEQ 8 (
|
||||
call robocopy.exe "%%~A" %PROJECT_OUTPUT_PATH% /S /E >nul
|
||||
if !ERRORLEVEL! LEQ 8 (
|
||||
goto StageResistRelOk
|
||||
)
|
||||
)
|
||||
|
@ -32,9 +41,16 @@ if %ERRORLEVEL% GTR 8 (
|
|||
echo Build project...
|
||||
msbuild %PROJECT_PATH% /p:Configuration=%PROJECT_CONFIGURATION% /p:Platform="x64" /p:OutDir=%PROJECT_OUTPUT_PATH%
|
||||
|
||||
if ERRORLEVEL 1 (
|
||||
echo Encountered error while building %PROJECT_PATH% , exiting..
|
||||
goto :EOF
|
||||
if not "%PROJECT_OUTPUT_PATH%" == "%DEFAULT_OUTPUT_PATH%" (
|
||||
call robocopy.exe %PROJECT_OUTPUT_PATH% %DEFAULT_OUTPUT_PATH% /IS /E >nul
|
||||
if %ERRORLEVEL% GTR 8 (
|
||||
echo Warning! Unable to copy binaries to %DEFAULT_OUTPUT_PATH%
|
||||
exit /b 1
|
||||
)
|
||||
else
|
||||
(
|
||||
exit /b 0
|
||||
)
|
||||
)
|
||||
|
||||
goto :EOF
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
# escape=`
|
||||
FROM mcr.microsoft.com/windows/nanoserver:1809
|
||||
|
||||
# Keep this argument to keep backward compatibility and avoid warning messages when build
|
||||
ARG binPath
|
||||
|
||||
WORKDIR "c:\app"
|
||||
COPY $binPath ./
|
||||
|
||||
ENTRYPOINT ["SampleModule.exe"]
|
||||
COPY bin/iotedgeoutput ./
|
||||
|
||||
ENTRYPOINT ["IotEdgeModule1.exe"]
|
Загрузка…
Ссылка в новой задаче