-
Notifications
You must be signed in to change notification settings - Fork 755
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cdpx pipelines for PowerBI Csharp sdk
Support buddy, pyll request and official pipelines. Pipeline steps: - restore nuggets - auto versioning forassemblies and package - build Release | AnyCpu - pack the nuget package - run tests **Notes** - By cdpx's design, only official queue can produce signed bits. The csprojs were changed to delay-sign the dlls only in this case ( or in case we run the legacy non-cdpx queue). Itherwise test in other queues will fail on strong name validation - By design cdpx pipelines don't support external parameters, it means that we can't pass anymore the clean version *major, minor and patch to the queue, nor suffix. - The assembly version will be in format major.minor.nnnn.rrrr where r is the revision number (number of tomes the build has been run in a day and nnnn some day counter starting from 2017). - The version is 3.x.x only in official queue, for other queues we have 0.0.x and 0.1.x versions. - The dev package version to be deployed to dev will be major.minor.nnnnrrrr and the clean package version will be major.minor.0 - To support suffixes like beta or patch versions we will need to add a additional official queues with tags (in the future) - In regular sdk releases, we will update the minor version in .pipelines/pipeline.user.windows.official.yml - The assembli file and informational version will be the full version, the assembly version will be major.minor.0.0 - Official queue packs both Dev and Clean packages, other queues packs onlt Dev unsigned package
- Loading branch information
1 parent
12ab0fe
commit ae0f3b1
Showing
14 changed files
with
346 additions
and
112 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,19 @@ | ||
version: | ||
name: 'sdk version' | ||
major: 0 | ||
minor: 1 | ||
system: 'Buildrevision' | ||
exclude_commit: false | ||
assembly_version: 'majorminoronly' | ||
assembly_file_version: 'fullversionnumber' | ||
assembly_informational_version: 'fullversionnumber' | ||
|
||
package: | ||
commands: | ||
- !!buildcommand | ||
name: 'pack sdk\**\PowerBI.Api.csproj for dev feed' | ||
command: './scripts/pack-sdk-dev.cmd' | ||
artifacts: | ||
- from: 'pack\Dev' | ||
include: | ||
- '**/*' |
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,27 @@ | ||
version: | ||
name: 'sdk version' | ||
major: 3 | ||
minor: 12 | ||
system: 'Buildrevision' | ||
exclude_commit: false | ||
assembly_version: 'majorminoronly' | ||
assembly_file_version: 'fullversionnumber' | ||
assembly_informational_version: 'fullversionnumber' | ||
|
||
package: | ||
commands: | ||
- !!buildcommand | ||
name: 'pack sdk\**\PowerBI.Api.csproj for Official feeds' | ||
command: './scripts/pack-sdk.cmd' | ||
artifacts: | ||
- from: 'pack\Clean' | ||
include: | ||
- '**/*' | ||
|
||
- !!buildcommand | ||
name: 'pack sdk\**\PowerBI.Api.csproj for Dev feed' | ||
command: './scripts/pack-sdk-dev.cmd' | ||
artifacts: | ||
- from: 'pack\Dev' | ||
include: | ||
- '**/*' |
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,19 @@ | ||
version: | ||
name: 'sdk version' | ||
major: 0 | ||
minor: 0 | ||
system: 'Buildrevision' | ||
exclude_commit: false | ||
assembly_version: 'majorminoronly' | ||
assembly_file_version: 'fullversionnumber' | ||
assembly_informational_version: 'fullversionnumber' | ||
|
||
package: | ||
commands: | ||
- !!buildcommand | ||
name: 'pack sdk\**\PowerBI.Api.csproj for dev feed' | ||
command: './scripts/pack-sdk-dev.cmd' | ||
artifacts: | ||
- from: 'pack\Dev' | ||
include: | ||
- '**/*' |
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,48 @@ | ||
environment: | ||
host: | ||
os: 'windows' | ||
flavor: 'server' | ||
version: '2016' | ||
runtime: | ||
provider: 'appcontainer' | ||
|
||
image: 'cdpxwin1809.azurecr.io/global/vse2017:latest' | ||
source_mode: 'map' | ||
|
||
signing_options: | ||
profile: 'external_distribution' | ||
|
||
restore: | ||
commands: | ||
- !!defaultcommand | ||
name: 'Nuget Restore' | ||
command: './scripts/nuget-restore.cmd' | ||
logs: | ||
- include: | ||
- 'MSBuildLogs\*' | ||
build: | ||
commands: | ||
- !!buildcommand | ||
name: 'Build SDK' | ||
command: './scripts/build-sdk.cmd' | ||
logs: | ||
- include: | ||
- './scripts/msbuild.log' | ||
exclude: | ||
artifacts: | ||
- from: 'sdk\PowerBI.Api\bin' | ||
include: | ||
- '**/*' | ||
|
||
test: | ||
commands: | ||
- !!testcommand | ||
name: 'Test sdk' | ||
command: './scripts/run-tests.cmd' | ||
testresults: | ||
- from: 'TestResults' | ||
title: 'SDK Tests' | ||
type: 'vstest' | ||
include: | ||
- '**/*' | ||
|
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 @@ | ||
// This is a placeholder file | ||
// When build in CDPx Pipeline, it will be replaced by a generated file with the version assigned by CDPx. | ||
using System.Reflection; | ||
|
||
[assembly: AssemblyVersion("1.0.1")] | ||
[assembly: AssemblyFileVersion("1.0.1")] | ||
[assembly: AssemblyInformationalVersion("1.0.1-dev")] |
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,17 @@ | ||
@echo off | ||
echo Start running build-sdk.cmd ... | ||
pushd "%~dp0" | ||
|
||
echo Build PowerBI.CSharp.Sdk.sln Release - AnyCPU... | ||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MsBuild.exe" %~dp0..\sdk\PowerBI.CSharp.Sdk.sln /p:Configuration=Release /p:Platform="AnyCPU" -fl | ||
|
||
set EX=%ERRORLEVEL% | ||
|
||
if "%EX%" neq "0" ( | ||
echo "Failed to build PowerBI.CSharp.Sdk.sln." | ||
popd | ||
exit /B %EX% | ||
) | ||
echo "PowerBI.CSharp.Sdk.sln built succesfuly" | ||
popd | ||
exit /B %EX% |
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,20 @@ | ||
setlocal | ||
@echo off | ||
pushd "%~dp0" | ||
echo Start cleaning... | ||
for /d %%G in (%~dp0..\sdk\PowerBI.Api\bin, %~dp0..\sdk\PowerBI.Api\obj, %~dp0..\sdk\PowerBI.Api.Tests\bin, %~dp0..\sdk\PowerBI.Api.Tests\obj ) do (call :deletefolder %%G) | ||
|
||
echo Cleaning Done. | ||
endlocal | ||
goto :eof | ||
|
||
:deletefolder | ||
setlocal | ||
set folder =%1 | ||
if exist %1 ( | ||
echo Deleting %1 | ||
rmdir %1 /s /q | ||
) else ( | ||
echo Skipping %1 | ||
) | ||
endlocal |
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,24 @@ | ||
@echo off | ||
pushd "%~dp0.." | ||
|
||
set PACKAGES_DIRECTORY="%~dp0..\sdk\packages" | ||
echo "Remove folder %PACKAGES_DIRECTORY% if exists" | ||
if exist %PACKAGES_DIRECTORY% ( | ||
call rmdir %PACKAGES_DIRECTORY% /s /q | ||
) | ||
|
||
echo Clean previous build outputs ... | ||
call cmd.exe /c %~dp0clean.cmd | ||
if exist msbuild.log del msbuild.log | ||
|
||
echo call nuget restore "%~dp0..\sdk\PowerBI.CSharp.Sdk.sln" -ConfigFile "%~dp0..\sdk\.nuget\NuGet.Config" | ||
call nuget restore "%~dp0..\sdk\PowerBI.CSharp.Sdk.sln" -ConfigFile "%~dp0..\sdk\.nuget\NuGet.Config" | ||
set EX=%ERRORLEVEL% | ||
if "%EX%" neq "0" ( | ||
popd | ||
echo "Failed to restore nuget packages." | ||
exit /b %EX% | ||
) | ||
|
||
popd | ||
exit /B %EX% |
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,17 @@ | ||
@echo off | ||
echo Start running pack-sdk.cmd ... | ||
pushd "%~dp0" | ||
|
||
echo call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MsBuild.exe" %~dp0..\sdk\PowerBI.Api\PowerBI.Api.csproj /t:pack /p:Configuration=Release /p:PackageVersion=%CDP_PACKAGE_VERSION_NUMERIC% /p:PackageOutputPath=%~dp0..\pack\Dev | ||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MsBuild.exe" %~dp0..\sdk\PowerBI.Api\PowerBI.Api.csproj /t:pack /p:Configuration=Release /p:PackageVersion=%CDP_PACKAGE_VERSION_NUMERIC% /p:PackageOutputPath=%~dp0..\pack\Dev | ||
|
||
set EX=%ERRORLEVEL% | ||
|
||
if "%EX%" neq "0" ( | ||
echo "Failed to pack PowerBI.Api.csproj." | ||
popd | ||
exit /B %EX% | ||
) | ||
echo "PowerBI.Api.csproj packed succesfuly" | ||
popd | ||
exit /B %EX% |
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,17 @@ | ||
@echo off | ||
echo Start running pack-sdk.cmd ... | ||
pushd "%~dp0" | ||
|
||
echo call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MsBuild.exe" %~dp0..\sdk\PowerBI.Api\PowerBI.Api.csproj /t:pack /p:Configuration=Release /p:PackageVersion=%CDP_MAJOR_NUMBER_ONLY%.%CDP_MINOR_NUMBER_ONLY%.0 /p:PackageOutputPath=%~dp0..\pack\Clean | ||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MsBuild.exe" %~dp0..\sdk\PowerBI.Api\PowerBI.Api.csproj /t:pack /p:Configuration=Release /p:PackageVersion=%CDP_MAJOR_NUMBER_ONLY%.%CDP_MINOR_NUMBER_ONLY%.0 /p:PackageOutputPath=%~dp0..\pack\Clean | ||
|
||
set EX=%ERRORLEVEL% | ||
|
||
if "%EX%" neq "0" ( | ||
echo "Failed to pack PowerBI.Api.csproj." | ||
popd | ||
exit /B %EX% | ||
) | ||
echo "PowerBI.Api.csproj packed succesfuly" | ||
popd | ||
exit /B %EX% |
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,17 @@ | ||
@echo off | ||
echo Start running run-tests.cmd ... | ||
pushd "%~dp0" | ||
|
||
echo "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\TestPlatform\vstest.console.exe" /logger:trx /Platform:x64 /InIsolation %~dp0..\sdk\PowerBI.Api.Tests\bin\Release\PowerBI.Api.Tests.dll /framework:framework40 /ResultsDirectory:%~dp0../TestResults | ||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\TestPlatform\vstest.console.exe" /logger:trx /Platform:x64 /InIsolation %~dp0..\sdk\PowerBI.Api.Tests\bin\Release\PowerBI.Api.Tests.dll /framework:framework40 /ResultsDirectory:%~dp0../TestResults | ||
|
||
set EX=%ERRORLEVEL% | ||
|
||
if "%EX%" neq "0" ( | ||
echo "Failed to run tests." | ||
popd | ||
exit /B %EX% | ||
) | ||
echo "Tests run succesfuly" | ||
popd | ||
exit /B %EX% |
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
Oops, something went wrong.