Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 10 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,18 @@ jobs:

- name: Run fuzzer smoke test
working-directory: CosmosDBShell.Fuzzer
run: dotnet run --configuration $env:BUILD_CONFIGURATION --no-build -- --all
run: dotnet run --configuration $env:BUILD_CONFIGURATION --no-build --no-restore -- --all
shell: pwsh

- name: Fail if fuzzer crash findings exist
shell: pwsh
run: |
$crashes = Get-ChildItem -Path CosmosDBShell.Fuzzer/findings -Filter 'crash_*.txt' -ErrorAction SilentlyContinue
if ($crashes -and $crashes.Count -gt 0) {
Write-Error "Fuzzer recorded $($crashes.Count) crash(es). See the 'fuzz-findings' artifact for details."
exit 1
}

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/package-unsigned.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ jobs:
--no-restore `
--output out/nupkg `
/p:PackageVersion=${{ steps.version.outputs.package_version }} `
/p:Version=${{ steps.version.outputs.package_version }} `
/p:FileVersion=${{ steps.version.outputs.file_version }} `
/p:InformationalVersion=${{ steps.version.outputs.informational_version }} `
/p:ContinuousIntegrationBuild=true

- name: Validate NuGet package set
Expand Down
13 changes: 11 additions & 2 deletions .pipelines/CosmosDB-Shell-Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ parameters: # parameters are shown up in ADO UI in a build queue time
displayName: "Enable debug output"
type: boolean
default: false
- name: "publishNuget"
displayName: "Publish NuGet packages to internal feed"
type: boolean
default: true

variables:
CDP_DEFINITION_BUILD_COUNT: $[counter('', 0)] # needed for onebranch.pipeline.version task https://aka.ms/obpipelines/versioning
Expand Down Expand Up @@ -122,6 +126,7 @@ extends:
if ($buildNumber -ne $version) {
Write-Host "Updating Build.BuildNumber to normalized NuGet version: $version"
Write-Host "##vso[build.updatebuildnumber]$version"
$buildNumber = $version
}

$fileVersion = $version
Expand Down Expand Up @@ -494,7 +499,9 @@ extends:

- task: NuGetCommand@2
displayName: "Push RID-specific NuGet packages"
condition: succeeded()
condition: and(succeeded(),
eq(variables['Build.SourceBranch'], 'refs/heads/main'),
eq('${{ parameters.publishNuget }}', 'true'))
inputs:
command: "push"
packagesToPush: |
Expand All @@ -508,7 +515,9 @@ extends:
allowPackageConflicts: true
- task: NuGetCommand@2
displayName: "Push pointer NuGet package"
condition: succeeded()
condition: and(succeeded(),
eq(variables['Build.SourceBranch'], 'refs/heads/main'),
eq('${{ parameters.publishNuget }}', 'true'))
inputs:
command: "push"
packagesToPush: "$(Build.SourcesDirectory)\\out\\nupkg\\CosmosDBShell.$(CosmosDBShell_Version).nupkg"
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ There are several ways you can contribute to the CosmosDBShell project:
- Build: `dotnet build CosmosDBShell.sln` (or use the VS Code build task with Ctrl+Shift+B).
- Run tests: `dotnet test CosmosDBShell.sln`
- Run the tool locally: `dotnet run --project CosmosDBShell/CosmosDBShell.csproj`
- GitHub Actions runs CI from [.github/workflows/ci.yml](.github/workflows/ci.yml) and produces unsigned package artifacts from [.github/workflows/package-unsigned.yml](.github/workflows/package-unsigned.yml).
- GitHub Actions runs CI from [.github/workflows/ci.yml](.github/workflows/ci.yml) and uploads unsigned artifacts from [.github/workflows/package-unsigned.yml](.github/workflows/package-unsigned.yml).
- GitHub Actions uses [.github/nuget.github.config](.github/nuget.github.config) so it can restore from nuget.org independently of Azure Pipelines.
- Azure Pipelines can continue independently for branch-based signing and publishing.

Expand Down
Loading