Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new signing pipeline (part1) #2476

Merged
merged 28 commits into from
Nov 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
6c262d7
testing pipelines
TimothyMothra Oct 28, 2021
94a28ef
testing collecting build output
TimothyMothra Nov 2, 2021
52c82f8
test nupkg
TimothyMothra Nov 2, 2021
40b8903
testing different path
TimothyMothra Nov 2, 2021
de9e841
testing bin directory
TimothyMothra Nov 2, 2021
d105b0d
test: do artifacts support wildcards?
TimothyMothra Nov 3, 2021
be92775
testing signing DLLs
TimothyMothra Nov 3, 2021
bb9a69f
add missing build flags
TimothyMothra Nov 3, 2021
01d3b17
testing two part build/pack
TimothyMothra Nov 4, 2021
3e90f05
testing pack cmd
TimothyMothra Nov 4, 2021
1b36e00
testing pack in package step
TimothyMothra Nov 5, 2021
87ec37b
testing different signing profile
TimothyMothra Nov 5, 2021
49f33fe
testing external_distribution
TimothyMothra Nov 5, 2021
f34368e
cleanup
TimothyMothra Nov 5, 2021
71faab3
testing placeholder for testing
TimothyMothra Nov 5, 2021
364237c
Merge branch 'develop' into tilee/pipelines
TimothyMothra Nov 16, 2021
4e93aba
testing multiple pipelines
TimothyMothra Nov 17, 2021
ffc1f1c
rename everything
TimothyMothra Nov 17, 2021
8b80faf
update pipelines with custom hello world for runtime logging
TimothyMothra Nov 17, 2021
c6cfebc
fix args
TimothyMothra Nov 17, 2021
0fc33ae
testing unique build params
TimothyMothra Nov 17, 2021
52b7fad
one more to fix pack for buddy
TimothyMothra Nov 17, 2021
f31cacc
Merge branch 'main' into tilee/pipelines
TimothyMothra Nov 17, 2021
7217d6c
testing consolidating cmd files
TimothyMothra Nov 18, 2021
fb22c7d
cleanup
TimothyMothra Nov 18, 2021
fc15933
Merge branch 'main' into tilee/pipelines
TimothyMothra Nov 18, 2021
2744bd1
changing slashes
TimothyMothra Nov 19, 2021
1ec364c
Merge branch 'tilee/pipelines' of https://github.com/microsoft/Applic…
TimothyMothra Nov 19, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .pipelines/00_helloworld.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cd /D "%~dp0..\"

echo hello world: %* || exit /b 1
3 changes: 3 additions & 0 deletions .pipelines/00_list_versions.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cd /D "%~dp0..\"

dotnet --version && dotnet --list-sdks && dotnet --list-runtimes || exit /b 1
3 changes: 3 additions & 0 deletions .pipelines/01_restore.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cd /D "%~dp0..\"

dotnet restore .\ProjectsForSigning.sln || exit /b 1
3 changes: 3 additions & 0 deletions .pipelines/02_build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cd /D "%~dp0..\"

dotnet build .\ProjectsForSigning.sln %* --configuration Release --no-restore || exit /b 1
3 changes: 3 additions & 0 deletions .pipelines/03_pack.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cd /D "%~dp0..\"

dotnet pack .\ProjectsForSigning.sln %* --configuration Release --no-restore --no-build || exit /b 1
4 changes: 4 additions & 0 deletions .pipelines/04_test.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cd /D "%~dp0..\"

echo "TODO: VALIDATE SIGNED DLLs."
echo "TODO: VALIDATE SIGNED NUPKGs."
80 changes: 80 additions & 0 deletions .pipelines/pipeline.user.windows.buddy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
environment:
host:
os: 'windows'
flavor: 'server'
version: '2019'
runtime:
provider: 'appcontainer'
image: 'cdpxwin1809.azurecr.io/global/vse2019:latest'
source_mode: 'link'

version:
name: 'ApplicationInsights-dotnet'
major: 0
minor: 0
system: 'custom'

signing_options:
profile: 'external_distribution'

restore:
commands:
- !!defaultcommand
name: 'Hello World'
command: '.pipelines/00_helloworld.cmd'
arguments: 'buddy'
fail_on_stderr: false
- !!defaultcommand
name: 'Show .NET versions'
command: '.pipelines/00_list_versions.cmd'
fail_on_stderr: false
- !!defaultcommand
name: 'Install dependencies'
command: '.pipelines/01_restore.cmd'
fail_on_stderr: false

build:
commands:
- !!buildcommand
name: 'Dotnet Build'
command: '.pipelines/02_build.cmd'
arguments: '-p:OfficialRelease=True'
fail_on_stderr: false
artifacts:
- from: './bin/Release/src'
include:
- '**/*.dll'
signing_options:
sign_inline: true

package:
commands:
- !!buildcommand
name: 'Dotnet Pack'
command: '.pipelines/03_pack.cmd'
arguments: '-p:OfficialRelease=True'
fail_on_stderr: false
artifacts:
- from: './bin/Release/NuGet'
include:
- '*.*'
signing_options:
sign_inline: true

test:
commands:
- !!defaultcommand
name: 'Custom tests'
command: '.pipelines/04_test.cmd'
fail_on_stderr: false

static_analysis_options:
credscan_options:
fail_on_error: true
binskim_options:
fail_on_error: true
files_to_scan:
- from: 'src'
policheck_options:
scan_comments: true
fail_on_error: true
80 changes: 80 additions & 0 deletions .pipelines/pipeline.user.windows.official.redfield.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
environment:
host:
os: 'windows'
flavor: 'server'
version: '2019'
runtime:
provider: 'appcontainer'
image: 'cdpxwin1809.azurecr.io/global/vse2019:latest'
source_mode: 'link'

version:
name: 'ApplicationInsights-dotnet'
major: 0
minor: 0
system: 'custom'

signing_options:
profile: 'external_distribution'

restore:
commands:
- !!defaultcommand
name: 'Hello World'
command: '.pipelines/00_helloworld.cmd'
arguments: 'official redfield'
fail_on_stderr: false
- !!defaultcommand
name: 'Show .NET versions'
command: '.pipelines/00_list_versions.cmd'
fail_on_stderr: false
- !!defaultcommand
name: 'Install dependencies'
command: '.pipelines/01_restore.cmd'
fail_on_stderr: false

build:
commands:
- !!buildcommand
name: 'Dotnet Build'
command: '.pipelines/02_build.cmd'
arguments: '-p:PublicRelease=True -p:StableRelease=True -p:OfficialRelease=True -p:Redfield=True'
fail_on_stderr: false
artifacts:
- from: './bin/Release/src'
include:
- '**/*.dll'
signing_options:
sign_inline: true

package:
commands:
- !!buildcommand
name: 'Dotnet Pack'
command: '.pipelines/03_pack.cmd'
arguments: '-p:PublicRelease=True -p:StableRelease=True -p:OfficialRelease=True -p:Redfield=True'
fail_on_stderr: false
artifacts:
- from: './bin/Release/NuGet'
include:
- '*.*'
signing_options:
sign_inline: true

test:
commands:
- !!defaultcommand
name: 'Custom tests'
command: '.pipelines/04_test.cmd'
fail_on_stderr: false

static_analysis_options:
credscan_options:
fail_on_error: true
binskim_options:
fail_on_error: true
files_to_scan:
- from: 'src'
policheck_options:
scan_comments: true
fail_on_error: true
80 changes: 80 additions & 0 deletions .pipelines/pipeline.user.windows.official.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
environment:
host:
os: 'windows'
flavor: 'server'
version: '2019'
runtime:
provider: 'appcontainer'
image: 'cdpxwin1809.azurecr.io/global/vse2019:latest'
source_mode: 'link'

version:
name: 'ApplicationInsights-dotnet'
major: 0
minor: 0
system: 'custom'

signing_options:
profile: 'external_distribution'

restore:
commands:
- !!defaultcommand
name: 'Hello World'
command: '.pipelines/00_helloworld.cmd'
arguments: 'official'
fail_on_stderr: false
- !!defaultcommand
name: 'Show .NET versions'
command: '.pipelines/00_list_versions.cmd'
fail_on_stderr: false
- !!defaultcommand
name: 'Install dependencies'
command: '.pipelines/01_restore.cmd'
fail_on_stderr: false

build:
commands:
- !!buildcommand
name: 'Dotnet Build'
command: '.pipelines/02_build.cmd'
arguments: '-p:PublicRelease=True -p:StableRelease=True -p:OfficialRelease=True'
fail_on_stderr: false
artifacts:
- from: './bin/Release/src'
include:
- '**/*.dll'
TimothyMothra marked this conversation as resolved.
Show resolved Hide resolved
signing_options:
sign_inline: true

package:
commands:
- !!buildcommand
name: 'Dotnet Pack'
command: '.pipelines/03_pack.cmd'
arguments: '-p:PublicRelease=True -p:StableRelease=True -p:OfficialRelease=True'
fail_on_stderr: false
artifacts:
- from: './bin/Release/NuGet'
include:
- '*.*'
signing_options:
sign_inline: true

test:
commands:
- !!defaultcommand
name: 'Custom tests'
command: '.pipelines/04_test.cmd'
fail_on_stderr: false

static_analysis_options:
credscan_options:
fail_on_error: true
binskim_options:
fail_on_error: true
files_to_scan:
- from: 'src'
policheck_options:
scan_comments: true
fail_on_error: true
4 changes: 4 additions & 0 deletions .pipelines/pipeline.user.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
artifact_publish_options:
publish_to_legacy_artifacts: false
publish_to_pipeline_artifacts: true
publish_to_cloudvault_artifacts: false
5 changes: 4 additions & 1 deletion .props/_Nupkg.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

<PropertyGroup Condition="$(OS) == 'Windows_NT'">
<!-- Automatically generate package on build https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package-using-the-dotnet-cli#automatically-generate-package-on-build -->
<!-- We want developer and nightly build to generate nupkg. Official releases need to sign DLLs before packaging. -->
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<GeneratePackageOnBuild Condition="$(OfficialRelease) == 'true'">False</GeneratePackageOnBuild>


<!-- Documenting your code with XML comments https://docs.microsoft.com/en-us/dotnet/csharp/codedoc -->
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down Expand Up @@ -48,7 +51,7 @@
<None Include="$(EnlistmentRoot)\.images\icon.png" Pack="true" PackagePath="\"/>
</ItemGroup>

<PropertyGroup Condition="$(BuildServer) == 'true'">
<PropertyGroup Condition="$(OfficialRelease) == 'true'">
<!-- indicate that the build executes on a build/CI server -->
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>

Expand Down