diff --git a/eng/install-scancode.sh b/eng/install-scancode.sh index 049b749c2..c82c274ed 100755 --- a/eng/install-scancode.sh +++ b/eng/install-scancode.sh @@ -5,7 +5,7 @@ set -euo pipefail # Install instructions: https://scancode-toolkit.readthedocs.io/en/latest/getting-started/install.html#installation-as-a-library-via-pip # See latest release at https://github.com/nexB/scancode-toolkit/releases -SCANCODE_VERSION="32.1.0" +SCANCODE_VERSION="32.2.1" pyEnvPath="/tmp/scancode-env" python3 -m venv $pyEnvPath diff --git a/eng/pipelines/templates/jobs/vmr-build.yml b/eng/pipelines/templates/jobs/vmr-build.yml index 1a90ff50a..8adf278c1 100644 --- a/eng/pipelines/templates/jobs/vmr-build.yml +++ b/eng/pipelines/templates/jobs/vmr-build.yml @@ -57,6 +57,11 @@ parameters: type: boolean default: false +# Freeform field for extra values to pass to build.sh for special build modes +- name: extraProperties + type: string + default: '' + jobs: - job: ${{ parameters.buildName }}_${{ parameters.architecture }} timeoutInMinutes: 150 @@ -214,7 +219,12 @@ jobs: customBuildArgs="$customBuildArgs --use-mono-runtime" fi - docker run --rm -v "$(sourcesPath):/vmr" -w /vmr $customRunArgs ${{ parameters.container }} ./build.sh --clean-while-building $(additionalBuildArgs) $customBuildArgs + extraProperties="${{ parameters.extraProperties }}" + if [[ -n "$extraProperties" ]]; then + extraProperties="-- $extraProperties" + fi + + docker run --rm -v "$(sourcesPath):/vmr" -w /vmr $customRunArgs ${{ parameters.container }} ./build.sh --clean-while-building $(additionalBuildArgs) $customBuildArgs $extraProperties displayName: Build - script: | @@ -228,7 +238,7 @@ jobs: poisonArg='--poison' fi - docker run --rm $dockerVolumeArgs -w /vmr $dockerEnvArgs ${{ parameters.container }} ./build.sh $poisonArg --run-smoke-test $(additionalBuildArgs) -- -p:SmokeTestConsoleVerbosity=detailed + docker run --rm $dockerVolumeArgs -w /vmr $dockerEnvArgs ${{ parameters.container }} ./build.sh $poisonArg --run-smoke-test $(additionalBuildArgs) -- -p:SmokeTestConsoleVerbosity=detailed ${{ parameters.extraProperties }} displayName: Run Tests # Don't use CopyFiles@2 as it encounters permissions issues because it indexes all files in the source directory graph. diff --git a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/LicenseScanTests.cs b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/LicenseScanTests.cs index 852507964..30b848571 100644 --- a/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/LicenseScanTests.cs +++ b/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/LicenseScanTests.cs @@ -87,6 +87,7 @@ public class LicenseScanTests : TestBase "object-form-exception-to-mit", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/object-form-exception-to-mit.LICENSE "ofl-1.1", // https://opensource.org/license/ofl-1-1/ "osf-1990", // https://fedoraproject.org/wiki/Licensing:MIT?rd=Licensing/MIT#HP_Variant + "pcre2-exception", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/pcre2-exception.LICENSE "public-domain", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/public-domain.LICENSE "public-domain-disclaimer", // https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/public-domain-disclaimer.LICENSE "python", // https://opensource.org/license/python-2-0/