Skip to content

Commit

Permalink
Fix publish SBOM manifest with nuget package and Changing Win to Linu…
Browse files Browse the repository at this point in the history
…x for release pipeline (#960)
  • Loading branch information
arroyc authored Feb 17, 2022
1 parent 8a450e9 commit 65c30d8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
12 changes: 9 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ jobs:
# vmImage: 'vs2017-win2016'
name: '1ES-Hosted-AzFunc' # MMS2019TLS for Windows2019 or MMSUbuntu20.04TLS for ubuntu
demands:
- ImageOverride -equals MMS2019TLS
- ImageOverride -equals MMSUbuntu20.04TLS
steps:
- bash: |
echo "Releasing from $BUILD_SOURCEBRANCHNAME"
Expand All @@ -223,6 +223,12 @@ jobs:
NUSPEC="pack\Microsoft.Azure.Functions.V4.PythonWorker.nuspec"
WKVERSION="$VERSION-$(patchBuildNumberForDev)"
else
# this is only to test nuget related workflow because we are setting nuspec here
echo "Generating Integration Test Package for $BUILD_SOURCEBRANCHNAME for testing purpose"
LATEST_TAG=$(curl https://api.github.com/repos/Azure/azure-functions-python-worker/tags -s | jq '.[0].name' | sed 's/\"//g' | cut -d'.' -f-2)
NUSPEC="pack\Microsoft.Azure.Functions.V3.PythonWorker.nuspec"
# Only required for Integration Test. Version number contains date (e.g. 3.1.2.20211028-dev)
WKVERSION="3.$LATEST_TAG-$(BUILD_BUILDID)-TEST"
echo "No Matching Release Tag For $BUILD_SOURCEBRANCH"
fi
Expand All @@ -237,8 +243,8 @@ jobs:
- task: ManifestGeneratorTask@0
displayName: 'SBOM Generation Task'
inputs:
BuildDropPath: '$(Build.ArtifactStagingDirectory)'
BuildComponentPath: '$(Build.ArtifactStagingDirectory)'
BuildDropPath: '$(Build.SourcesDirectory)'
BuildComponentPath: '$(Build.SourcesDirectory)'
Verbosity: 'Verbose'
- task: NuGetCommand@2
inputs:
Expand Down
4 changes: 2 additions & 2 deletions pack/Microsoft.Azure.Functions.V2.PythonWorker.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<file src="..\3.7_OSX_X64\**" target="tools\3.7\OSX\X64" />
<file src="..\python\prodV2\worker.config.json" target="tools" />
<file src="Microsoft.Azure.Functions.PythonWorker.targets" target="build" />
<file src="..\PythonWorker\_manifest\manifest.json" target="SBOM\manifest.json" />
<file src="..\PythonWorker\_manifest\spdx_2.2\manifest.spdx.json" target="SBOM\manifest.spdx.json" />
<file src="..\_manifest\manifest.json" target="SBOM\manifest.json" />
<file src="..\_manifest\spdx_2.2\manifest.spdx.json" target="SBOM\manifest.spdx.json" />
</files>
</package>
4 changes: 2 additions & 2 deletions pack/Microsoft.Azure.Functions.V3.PythonWorker.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<file src="..\3.9_OSX_X64\**" target="tools\3.9\OSX\X64" />
<file src="..\python\prodV3\worker.config.json" target="tools" />
<file src="Microsoft.Azure.Functions.PythonWorker.targets" target="build" />
<file src="..\PythonWorker\_manifest\manifest.json" target="SBOM\manifest.json" />
<file src="..\PythonWorker\_manifest\spdx_2.2\manifest.spdx.json" target="SBOM\manifest.spdx.json" />
<file src="..\_manifest\manifest.json" target="SBOM\manifest.json" />
<file src="..\_manifest\spdx_2.2\manifest.spdx.json" target="SBOM\manifest.spdx.json" />
</files>
</package>

0 comments on commit 65c30d8

Please sign in to comment.