From d00471c05123c10f7935802b28299eb33b9efd4c Mon Sep 17 00:00:00 2001 From: Claire Novotny Date: Thu, 10 Oct 2024 10:20:02 -0400 Subject: [PATCH 1/9] add new basic ci pipeline --- .pipelines/ci.yml | 193 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 193 insertions(+) create mode 100644 .pipelines/ci.yml diff --git a/.pipelines/ci.yml b/.pipelines/ci.yml new file mode 100644 index 0000000000..955d98b1ca --- /dev/null +++ b/.pipelines/ci.yml @@ -0,0 +1,193 @@ +name: NuGetGallery CI $(Build.BuildId) + +trigger: + branches: + include: + - "*" +pr: + branches: + include: + - "*" + +variables: + DOTNET_NOLOGO: true + BuildConfiguration: Release + Codeql.Enabled: false + NugetSecurityAnalysisWarningLevel: none + nugetMultiFeedWarnLevel: none + CommonPackageVersion: $(CommonAssemblyVersion)-$(NuGetGalleryBranch)-$(Build.BuildId) + CommonAssemblyVersion: 5.0.0 + GalleryPackageVersion: $(GalleryAssemblyVersion)-$(NuGetGalleryBranch)-$(Build.BuildId) + GalleryAssemblyVersion: 5.0.0 + JobsPackageVersion: $(JobsAssemblyVersion)-$(NuGetGalleryBranch)-$(Build.BuildId) + JobsAssemblyVersion: 5.0.0 + NuGetGalleryDirectory: ng + NuGetGalleryPath: $(Agent.BuildDirectory)\$(NuGetGalleryDirectory) + NuGetGalleryBranch: $(Build.SourceBranchName) + +pool: + vmImage: 'windows-latest' + +stages: + - stage: common + displayName: NuGet.Server.Common.sln + dependsOn: [] + jobs: + - job: build_and_test + displayName: common build and test + cancelTimeoutInMinutes: 1 + steps: + - checkout: self + fetchDepth: 1 + clean: true + fetchTags: false + path: $(NuGetGalleryDirectory) + - task: PowerShell@1 + name: build + displayName: Build + inputs: + scriptName: $(NuGetGalleryPath)\build.ps1 + arguments: -Configuration $(BuildConfiguration) -BuildNumber $(Build.BuildId) -SkipArtifacts -SkipGallery -SkipJobs -CommonAssemblyVersion $(CommonAssemblyVersion) -CommonPackageVersion $(CommonPackageVersion) -GalleryAssemblyVersion $(GalleryAssemblyVersion) -GalleryPackageVersion $(GalleryPackageVersion) -JobsAssemblyVersion $(JobsAssemblyVersion) -JobsPackageVersion $(JobsPackageVersion) -Branch $(NuGetGalleryBranch) -CommitSHA $(Build.SourceVersion) + workingFolder: $(NuGetGalleryPath) + - task: PowerShell@1 + name: test + displayName: Run tests + inputs: + scriptName: $(NuGetGalleryPath)\test.ps1 + arguments: -Configuration $(BuildConfiguration) -BuildNumber $(Build.BuildId) -SkipGallery -SkipJobs + workingFolder: $(NuGetGalleryPath) + - task: PublishTestResults@2 + name: publish_test_results + displayName: Publish test results + condition: succeededOrFailed() + inputs: + testRunner: VSTest + testResultsFiles: $(NuGetGalleryPath)\Results.*.xml + failTaskOnFailedTests: true + + - stage: gallery + displayName: NuGetGallery.sln + dependsOn: [] + jobs: + - job: build_and_test + displayName: gallery build and test + cancelTimeoutInMinutes: 1 + steps: + - checkout: self + fetchDepth: 1 + clean: true + fetchTags: false + path: $(NuGetGalleryDirectory) + - task: PowerShell@1 + name: build + displayName: Build + inputs: + scriptName: $(NuGetGalleryPath)\build.ps1 + arguments: -Configuration $(BuildConfiguration) -BuildNumber $(Build.BuildId) -SkipArtifacts -SkipCommon -SkipJobs -CommonAssemblyVersion $(CommonAssemblyVersion) -CommonPackageVersion $(CommonPackageVersion) -GalleryAssemblyVersion $(GalleryAssemblyVersion) -GalleryPackageVersion $(GalleryPackageVersion) -JobsAssemblyVersion $(JobsAssemblyVersion) -JobsPackageVersion $(JobsPackageVersion) -Branch $(NuGetGalleryBranch) -CommitSHA $(Build.SourceVersion) + workingFolder: $(NuGetGalleryPath) + - task: PowerShell@1 + name: test + displayName: Run tests + inputs: + scriptName: $(NuGetGalleryPath)\test.ps1 + arguments: -Configuration $(BuildConfiguration) -BuildNumber $(Build.BuildId) -SkipCommon -SkipJobs + workingFolder: $(NuGetGalleryPath) + - task: PublishTestResults@2 + name: publish_test_results + displayName: Publish test results + condition: succeededOrFailed() + inputs: + testRunner: VSTest + testResultsFiles: $(NuGetGalleryPath)\Results.*.xml + failTaskOnFailedTests: true + + - stage: statslogparser + displayName: StatsLogPasrser + dependsOn: [] + jobs: + - job: build_and_test + displayName: statslogparser build and test + cancelTimeoutInMinutes: 1 + variables: + PIPX_HOME: $(Agent.ToolsDirectory)\pipx + steps: + - checkout: self + fetchDepth: 1 + clean: true + fetchTags: false + path: $(NuGetGalleryDirectory) + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.10' + - script: | + python -m pip install --user pipx + pipx ensurepath + displayName: 'Install tools' + - script: | + pipx install poetry + poetry install + poetry build + poetry run pytest tests/ --cov loginterpretation --cov-report html + workingDirectory: $(NuGetGalleryPath)\python\StatsLogParser + templateContext: + outputs: + - output: pipelineArtifact + path: $(NuGetGalleryPath)\python\StatsLogParser\dist + artifact: StatsLogParser + + - stage: jobs + displayName: NuGet.Jobs.sln + dependsOn: [] + jobs: + - job: build_and_test + displayName: jobs build and test + cancelTimeoutInMinutes: 1 + steps: + - checkout: self + fetchDepth: 1 + clean: true + fetchTags: false + path: $(NuGetGalleryDirectory) + - task: PowerShell@1 + name: build + displayName: Build + inputs: + scriptName: $(NuGetGalleryPath)\build.ps1 + arguments: -Configuration $(BuildConfiguration) -BuildNumber $(Build.BuildId) -SkipArtifacts -SkipCommon -SkipGallery -CommonAssemblyVersion $(CommonAssemblyVersion) -CommonPackageVersion $(CommonPackageVersion) -GalleryAssemblyVersion $(GalleryAssemblyVersion) -GalleryPackageVersion $(GalleryPackageVersion) -JobsAssemblyVersion $(JobsAssemblyVersion) -JobsPackageVersion $(JobsPackageVersion) -Branch $(NuGetGalleryBranch) -CommitSHA $(Build.SourceVersion) + workingFolder: $(NuGetGalleryPath) + - task: PowerShell@1 + name: test + displayName: Run tests + inputs: + scriptName: $(NuGetGalleryPath)\test.ps1 + arguments: -Configuration $(BuildConfiguration) -BuildNumber $(Build.BuildId) -SkipCommon -SkipGallery + workingFolder: $(NuGetGalleryPath) + - task: PublishTestResults@2 + name: publish_test_results + displayName: Publish test results + condition: succeededOrFailed() + inputs: + testRunner: VSTest + testResultsFiles: $(NuGetGalleryPath)\Results.*.xml + failTaskOnFailedTests: true + + - stage: artifacts + displayName: Artifacts + dependsOn: [] + jobs: + - job: build_artifacts + displayName: build + cancelTimeoutInMinutes: 1 + steps: + - checkout: self + fetchDepth: 1 + clean: true + fetchTags: false + path: $(NuGetGalleryDirectory) + - task: PowerShell@1 + name: build_artifacts + displayName: Build + inputs: + scriptName: $(NuGetGalleryPath)\build.ps1 + arguments: -Configuration $(BuildConfiguration) -BuildNumber $(Build.BuildId) -CommonAssemblyVersion $(CommonAssemblyVersion) -CommonPackageVersion $(CommonPackageVersion) -GalleryAssemblyVersion $(GalleryAssemblyVersion) -GalleryPackageVersion $(GalleryPackageVersion) -JobsAssemblyVersion $(JobsAssemblyVersion) -JobsPackageVersion $(JobsPackageVersion) -Branch $(NuGetGalleryBranch) -CommitSHA $(Build.SourceVersion) + workingFolder: $(NuGetGalleryPath) From d91aa1e65856d0ff7aaa1c6beb5a49fa8fee9764 Mon Sep 17 00:00:00 2001 From: Claire Novotny Date: Thu, 10 Oct 2024 15:03:32 -0400 Subject: [PATCH 2/9] simplify --- .pipelines/ci.yml | 68 +++++++++++++---------------------------------- 1 file changed, 19 insertions(+), 49 deletions(-) diff --git a/.pipelines/ci.yml b/.pipelines/ci.yml index 955d98b1ca..faf7a1069c 100644 --- a/.pipelines/ci.yml +++ b/.pipelines/ci.yml @@ -12,17 +12,12 @@ pr: variables: DOTNET_NOLOGO: true BuildConfiguration: Release - Codeql.Enabled: false - NugetSecurityAnalysisWarningLevel: none - nugetMultiFeedWarnLevel: none CommonPackageVersion: $(CommonAssemblyVersion)-$(NuGetGalleryBranch)-$(Build.BuildId) CommonAssemblyVersion: 5.0.0 GalleryPackageVersion: $(GalleryAssemblyVersion)-$(NuGetGalleryBranch)-$(Build.BuildId) GalleryAssemblyVersion: 5.0.0 JobsPackageVersion: $(JobsAssemblyVersion)-$(NuGetGalleryBranch)-$(Build.BuildId) JobsAssemblyVersion: 5.0.0 - NuGetGalleryDirectory: ng - NuGetGalleryPath: $(Agent.BuildDirectory)\$(NuGetGalleryDirectory) NuGetGalleryBranch: $(Build.SourceBranchName) pool: @@ -37,32 +32,27 @@ stages: displayName: common build and test cancelTimeoutInMinutes: 1 steps: - - checkout: self - fetchDepth: 1 - clean: true - fetchTags: false - path: $(NuGetGalleryDirectory) - task: PowerShell@1 name: build displayName: Build inputs: - scriptName: $(NuGetGalleryPath)\build.ps1 + scriptName: $(Agent.BuildDirectory)\build.ps1 arguments: -Configuration $(BuildConfiguration) -BuildNumber $(Build.BuildId) -SkipArtifacts -SkipGallery -SkipJobs -CommonAssemblyVersion $(CommonAssemblyVersion) -CommonPackageVersion $(CommonPackageVersion) -GalleryAssemblyVersion $(GalleryAssemblyVersion) -GalleryPackageVersion $(GalleryPackageVersion) -JobsAssemblyVersion $(JobsAssemblyVersion) -JobsPackageVersion $(JobsPackageVersion) -Branch $(NuGetGalleryBranch) -CommitSHA $(Build.SourceVersion) - workingFolder: $(NuGetGalleryPath) + workingFolder: $(Agent.BuildDirectory) - task: PowerShell@1 name: test displayName: Run tests inputs: - scriptName: $(NuGetGalleryPath)\test.ps1 + scriptName: $(Agent.BuildDirectory)\test.ps1 arguments: -Configuration $(BuildConfiguration) -BuildNumber $(Build.BuildId) -SkipGallery -SkipJobs - workingFolder: $(NuGetGalleryPath) + workingFolder: $(Agent.BuildDirectory) - task: PublishTestResults@2 name: publish_test_results displayName: Publish test results condition: succeededOrFailed() inputs: testRunner: VSTest - testResultsFiles: $(NuGetGalleryPath)\Results.*.xml + testResultsFiles: $(Agent.BuildDirectory)\Results.*.xml failTaskOnFailedTests: true - stage: gallery @@ -73,32 +63,27 @@ stages: displayName: gallery build and test cancelTimeoutInMinutes: 1 steps: - - checkout: self - fetchDepth: 1 - clean: true - fetchTags: false - path: $(NuGetGalleryDirectory) - task: PowerShell@1 name: build displayName: Build inputs: - scriptName: $(NuGetGalleryPath)\build.ps1 + scriptName: $(Agent.BuildDirectory)\build.ps1 arguments: -Configuration $(BuildConfiguration) -BuildNumber $(Build.BuildId) -SkipArtifacts -SkipCommon -SkipJobs -CommonAssemblyVersion $(CommonAssemblyVersion) -CommonPackageVersion $(CommonPackageVersion) -GalleryAssemblyVersion $(GalleryAssemblyVersion) -GalleryPackageVersion $(GalleryPackageVersion) -JobsAssemblyVersion $(JobsAssemblyVersion) -JobsPackageVersion $(JobsPackageVersion) -Branch $(NuGetGalleryBranch) -CommitSHA $(Build.SourceVersion) - workingFolder: $(NuGetGalleryPath) + workingFolder: $(Agent.BuildDirectory) - task: PowerShell@1 name: test displayName: Run tests inputs: - scriptName: $(NuGetGalleryPath)\test.ps1 + scriptName: $(Agent.BuildDirectory)\test.ps1 arguments: -Configuration $(BuildConfiguration) -BuildNumber $(Build.BuildId) -SkipCommon -SkipJobs - workingFolder: $(NuGetGalleryPath) + workingFolder: $(Agent.BuildDirectory) - task: PublishTestResults@2 name: publish_test_results displayName: Publish test results condition: succeededOrFailed() inputs: testRunner: VSTest - testResultsFiles: $(NuGetGalleryPath)\Results.*.xml + testResultsFiles: $(Agent.BuildDirectory)\Results.*.xml failTaskOnFailedTests: true - stage: statslogparser @@ -111,11 +96,6 @@ stages: variables: PIPX_HOME: $(Agent.ToolsDirectory)\pipx steps: - - checkout: self - fetchDepth: 1 - clean: true - fetchTags: false - path: $(NuGetGalleryDirectory) - task: UsePythonVersion@0 inputs: versionSpec: '3.10' @@ -128,11 +108,11 @@ stages: poetry install poetry build poetry run pytest tests/ --cov loginterpretation --cov-report html - workingDirectory: $(NuGetGalleryPath)\python\StatsLogParser + workingDirectory: $(Agent.BuildDirectory)\python\StatsLogParser templateContext: outputs: - output: pipelineArtifact - path: $(NuGetGalleryPath)\python\StatsLogParser\dist + path: $(Agent.BuildDirectory)\python\StatsLogParser\dist artifact: StatsLogParser - stage: jobs @@ -143,32 +123,27 @@ stages: displayName: jobs build and test cancelTimeoutInMinutes: 1 steps: - - checkout: self - fetchDepth: 1 - clean: true - fetchTags: false - path: $(NuGetGalleryDirectory) - task: PowerShell@1 name: build displayName: Build inputs: - scriptName: $(NuGetGalleryPath)\build.ps1 + scriptName: $(Agent.BuildDirectory)\build.ps1 arguments: -Configuration $(BuildConfiguration) -BuildNumber $(Build.BuildId) -SkipArtifacts -SkipCommon -SkipGallery -CommonAssemblyVersion $(CommonAssemblyVersion) -CommonPackageVersion $(CommonPackageVersion) -GalleryAssemblyVersion $(GalleryAssemblyVersion) -GalleryPackageVersion $(GalleryPackageVersion) -JobsAssemblyVersion $(JobsAssemblyVersion) -JobsPackageVersion $(JobsPackageVersion) -Branch $(NuGetGalleryBranch) -CommitSHA $(Build.SourceVersion) - workingFolder: $(NuGetGalleryPath) + workingFolder: $(Agent.BuildDirectory) - task: PowerShell@1 name: test displayName: Run tests inputs: - scriptName: $(NuGetGalleryPath)\test.ps1 + scriptName: $(Agent.BuildDirectory)\test.ps1 arguments: -Configuration $(BuildConfiguration) -BuildNumber $(Build.BuildId) -SkipCommon -SkipGallery - workingFolder: $(NuGetGalleryPath) + workingFolder: $(Agent.BuildDirectory) - task: PublishTestResults@2 name: publish_test_results displayName: Publish test results condition: succeededOrFailed() inputs: testRunner: VSTest - testResultsFiles: $(NuGetGalleryPath)\Results.*.xml + testResultsFiles: $(Agent.BuildDirectory)\Results.*.xml failTaskOnFailedTests: true - stage: artifacts @@ -179,15 +154,10 @@ stages: displayName: build cancelTimeoutInMinutes: 1 steps: - - checkout: self - fetchDepth: 1 - clean: true - fetchTags: false - path: $(NuGetGalleryDirectory) - task: PowerShell@1 name: build_artifacts displayName: Build inputs: - scriptName: $(NuGetGalleryPath)\build.ps1 + scriptName: $(Agent.BuildDirectory)\build.ps1 arguments: -Configuration $(BuildConfiguration) -BuildNumber $(Build.BuildId) -CommonAssemblyVersion $(CommonAssemblyVersion) -CommonPackageVersion $(CommonPackageVersion) -GalleryAssemblyVersion $(GalleryAssemblyVersion) -GalleryPackageVersion $(GalleryPackageVersion) -JobsAssemblyVersion $(JobsAssemblyVersion) -JobsPackageVersion $(JobsPackageVersion) -Branch $(NuGetGalleryBranch) -CommitSHA $(Build.SourceVersion) - workingFolder: $(NuGetGalleryPath) + workingFolder: $(Agent.BuildDirectory) From 50267c053cf6df3767cd418cbbbb6ed7a836fd43 Mon Sep 17 00:00:00 2001 From: Claire Novotny Date: Thu, 10 Oct 2024 15:35:32 -0400 Subject: [PATCH 3/9] Don't run certain tasks --- .pipelines/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.pipelines/ci.yml b/.pipelines/ci.yml index faf7a1069c..934806548f 100644 --- a/.pipelines/ci.yml +++ b/.pipelines/ci.yml @@ -19,6 +19,9 @@ variables: JobsPackageVersion: $(JobsAssemblyVersion)-$(NuGetGalleryBranch)-$(Build.BuildId) JobsAssemblyVersion: 5.0.0 NuGetGalleryBranch: $(Build.SourceBranchName) + Codeql.Enabled: false + NugetSecurityAnalysisWarningLevel: none + nugetMultiFeedWarnLevel: none pool: vmImage: 'windows-latest' From d402fcfa6b868595024b6c3a79da8e3b1765631c Mon Sep 17 00:00:00 2001 From: Claire Novotny Date: Mon, 14 Oct 2024 10:53:45 -0400 Subject: [PATCH 4/9] Ensure the python components are sourced from dceng --- .pipelines/ci.yml | 2 + python/StatsLogParser/poetry.lock | 77 +++++++++++++++++++++++++++- python/StatsLogParser/pyproject.toml | 6 +++ 3 files changed, 84 insertions(+), 1 deletion(-) diff --git a/.pipelines/ci.yml b/.pipelines/ci.yml index 955d98b1ca..871bc1b44c 100644 --- a/.pipelines/ci.yml +++ b/.pipelines/ci.yml @@ -120,6 +120,8 @@ stages: inputs: versionSpec: '3.10' - script: | + python -m pip install --upgrade pip + pip install keyring artifacts-keyring python -m pip install --user pipx pipx ensurepath displayName: 'Install tools' diff --git a/python/StatsLogParser/poetry.lock b/python/StatsLogParser/poetry.lock index 2c5a72ed16..27f55e09be 100644 --- a/python/StatsLogParser/poetry.lock +++ b/python/StatsLogParser/poetry.lock @@ -19,6 +19,11 @@ docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphi tests = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] tests-mypy = ["mypy (>=1.11.1)", "pytest-mypy-plugins"] +[package.source] +type = "legacy" +url = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-pypi/pypi/simple" +reference = "dceng-public" + [[package]] name = "colorama" version = "0.4.6" @@ -30,6 +35,11 @@ files = [ {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] +[package.source] +type = "legacy" +url = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-pypi/pypi/simple" +reference = "dceng-public" + [[package]] name = "coverage" version = "7.6.1" @@ -117,6 +127,11 @@ tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.1 [package.extras] toml = ["tomli"] +[package.source] +type = "legacy" +url = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-pypi/pypi/simple" +reference = "dceng-public" + [[package]] name = "exceptiongroup" version = "1.2.2" @@ -131,6 +146,11 @@ files = [ [package.extras] test = ["pytest (>=6)"] +[package.source] +type = "legacy" +url = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-pypi/pypi/simple" +reference = "dceng-public" + [[package]] name = "importlib-resources" version = "6.4.4" @@ -150,6 +170,11 @@ enabler = ["pytest-enabler (>=2.2)"] test = ["jaraco.test (>=5.4)", "pytest (>=6,!=8.1.*)", "zipp (>=3.17)"] type = ["pytest-mypy"] +[package.source] +type = "legacy" +url = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-pypi/pypi/simple" +reference = "dceng-public" + [[package]] name = "iniconfig" version = "2.0.0" @@ -161,6 +186,11 @@ files = [ {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, ] +[package.source] +type = "legacy" +url = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-pypi/pypi/simple" +reference = "dceng-public" + [[package]] name = "packaging" version = "24.1" @@ -172,6 +202,11 @@ files = [ {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, ] +[package.source] +type = "legacy" +url = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-pypi/pypi/simple" +reference = "dceng-public" + [[package]] name = "pluggy" version = "1.5.0" @@ -187,6 +222,11 @@ files = [ dev = ["pre-commit", "tox"] testing = ["pytest", "pytest-benchmark"] +[package.source] +type = "legacy" +url = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-pypi/pypi/simple" +reference = "dceng-public" + [[package]] name = "pytest" version = "8.3.2" @@ -209,6 +249,11 @@ tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +[package.source] +type = "legacy" +url = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-pypi/pypi/simple" +reference = "dceng-public" + [[package]] name = "pytest-azurepipelines" version = "1.0.5" @@ -225,6 +270,11 @@ importlib-resources = "*" pytest = ">=5.0.0" pytest-nunit = ">=1.0.0,<2.0.0" +[package.source] +type = "legacy" +url = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-pypi/pypi/simple" +reference = "dceng-public" + [[package]] name = "pytest-cov" version = "5.0.0" @@ -243,6 +293,11 @@ pytest = ">=4.6" [package.extras] testing = ["fields", "hunter", "process-tests", "pytest-xdist", "virtualenv"] +[package.source] +type = "legacy" +url = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-pypi/pypi/simple" +reference = "dceng-public" + [[package]] name = "pytest-nunit" version = "1.0.7" @@ -260,6 +315,11 @@ pytest = ">=4.6.0" [package.extras] dev = ["pytest", "pytest-cov", "xmlschema (==1.0.13)"] +[package.source] +type = "legacy" +url = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-pypi/pypi/simple" +reference = "dceng-public" + [[package]] name = "pyyaml" version = "6.0.2" @@ -322,6 +382,11 @@ files = [ {file = "pyyaml-6.0.2.tar.gz", hash = "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e"}, ] +[package.source] +type = "legacy" +url = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-pypi/pypi/simple" +reference = "dceng-public" + [[package]] name = "tomli" version = "2.0.1" @@ -333,6 +398,11 @@ files = [ {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] +[package.source] +type = "legacy" +url = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-pypi/pypi/simple" +reference = "dceng-public" + [[package]] name = "ua-parser" version = "0.18.0" @@ -344,7 +414,12 @@ files = [ {file = "ua_parser-0.18.0-py2.py3-none-any.whl", hash = "sha256:9d94ac3a80bcb0166823956a779186c746b50ea4c9fd9bf30fdb758553c38950"}, ] +[package.source] +type = "legacy" +url = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-pypi/pypi/simple" +reference = "dceng-public" + [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "04d0ef599c172e38dc654e7c62bbbafe2acf1ab9aff6ef2ab28daf1bd5bf2266" +content-hash = "66929ba4260ff61625cc862bc4d87b1782cbb22d9d05c8439df7d0f09d85f963" diff --git a/python/StatsLogParser/pyproject.toml b/python/StatsLogParser/pyproject.toml index c8ecfdf881..af9238a429 100644 --- a/python/StatsLogParser/pyproject.toml +++ b/python/StatsLogParser/pyproject.toml @@ -16,6 +16,12 @@ pytest = "^8.3.2" pytest-cov = "^5.0.0" pytest-azurepipelines = "^1.0.5" + +[[tool.poetry.source]] +name = "dceng-public" +url = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-pypi/pypi/simple/" +priority = "primary" + [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" From 227d84ff59176e3d7f7d47bc06b8f66f9104b25d Mon Sep 17 00:00:00 2001 From: Claire Novotny Date: Mon, 14 Oct 2024 10:59:15 -0400 Subject: [PATCH 5/9] Don't publish artifact on ci --- .pipelines/ci.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.pipelines/ci.yml b/.pipelines/ci.yml index 98bfb11a01..cb470ec4dc 100644 --- a/.pipelines/ci.yml +++ b/.pipelines/ci.yml @@ -19,9 +19,6 @@ variables: JobsPackageVersion: $(JobsAssemblyVersion)-$(NuGetGalleryBranch)-$(Build.BuildId) JobsAssemblyVersion: 5.0.0 NuGetGalleryBranch: $(Build.SourceBranchName) - Codeql.Enabled: false - NugetSecurityAnalysisWarningLevel: none - nugetMultiFeedWarnLevel: none pool: vmImage: 'windows-latest' @@ -114,11 +111,6 @@ stages: poetry build poetry run pytest tests/ --cov loginterpretation --cov-report html workingDirectory: $(Agent.BuildDirectory)\python\StatsLogParser - templateContext: - outputs: - - output: pipelineArtifact - path: $(Agent.BuildDirectory)\python\StatsLogParser\dist - artifact: StatsLogParser - stage: jobs displayName: NuGet.Jobs.sln From e752bf9a40ba28dcf28835fdfe412b5ff691a827 Mon Sep 17 00:00:00 2001 From: Claire Novotny Date: Mon, 14 Oct 2024 11:07:10 -0400 Subject: [PATCH 6/9] add artifacts auth for build --- .pipelines/NuGetGallery-CI.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.pipelines/NuGetGallery-CI.yml b/.pipelines/NuGetGallery-CI.yml index fb49c871d3..a972442f9a 100644 --- a/.pipelines/NuGetGallery-CI.yml +++ b/.pipelines/NuGetGallery-CI.yml @@ -145,6 +145,8 @@ extends: inputs: versionSpec: '3.10' - script: | + python -m pip install --upgrade pip + pip install keyring artifacts-keyring python -m pip install --user pipx pipx ensurepath displayName: 'Install tools' From ae47c5fd8d7c23f8ef5bded3c3ea8afda7a1a06c Mon Sep 17 00:00:00 2001 From: Claire Novotny Date: Mon, 14 Oct 2024 11:19:23 -0400 Subject: [PATCH 7/9] put artifacts keyring into poetry env --- .pipelines/NuGetGallery-CI.yml | 1 + .pipelines/ci.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.pipelines/NuGetGallery-CI.yml b/.pipelines/NuGetGallery-CI.yml index a972442f9a..1ea455a4fc 100644 --- a/.pipelines/NuGetGallery-CI.yml +++ b/.pipelines/NuGetGallery-CI.yml @@ -152,6 +152,7 @@ extends: displayName: 'Install tools' - script: | pipx install poetry + pipx inject poetry artifacts-keyring poetry install poetry build poetry run pytest tests/ --cov loginterpretation --cov-report html diff --git a/.pipelines/ci.yml b/.pipelines/ci.yml index cb470ec4dc..f464b484df 100644 --- a/.pipelines/ci.yml +++ b/.pipelines/ci.yml @@ -107,6 +107,7 @@ stages: displayName: 'Install tools' - script: | pipx install poetry + pipx inject poetry artifacts-keyring poetry install poetry build poetry run pytest tests/ --cov loginterpretation --cov-report html From 2f014a18defd13ff739bea3aea91f8773776093e Mon Sep 17 00:00:00 2001 From: Claire Novotny Date: Mon, 14 Oct 2024 11:21:26 -0400 Subject: [PATCH 8/9] don't warn for multi feed --- .pipelines/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pipelines/ci.yml b/.pipelines/ci.yml index f464b484df..d48f6d32f0 100644 --- a/.pipelines/ci.yml +++ b/.pipelines/ci.yml @@ -12,6 +12,7 @@ pr: variables: DOTNET_NOLOGO: true BuildConfiguration: Release + nugetMultiFeedWarnLevel: none CommonPackageVersion: $(CommonAssemblyVersion)-$(NuGetGalleryBranch)-$(Build.BuildId) CommonAssemblyVersion: 5.0.0 GalleryPackageVersion: $(GalleryAssemblyVersion)-$(NuGetGalleryBranch)-$(Build.BuildId) From b988f96621885968c656dec6343138d779547f38 Mon Sep 17 00:00:00 2001 From: Claire Novotny Date: Fri, 18 Oct 2024 12:38:00 -0400 Subject: [PATCH 9/9] do't install the keyring --- .pipelines/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.pipelines/ci.yml b/.pipelines/ci.yml index d48f6d32f0..05eead6344 100644 --- a/.pipelines/ci.yml +++ b/.pipelines/ci.yml @@ -102,13 +102,11 @@ stages: versionSpec: '3.10' - script: | python -m pip install --upgrade pip - pip install keyring artifacts-keyring python -m pip install --user pipx pipx ensurepath displayName: 'Install tools' - script: | pipx install poetry - pipx inject poetry artifacts-keyring poetry install poetry build poetry run pytest tests/ --cov loginterpretation --cov-report html