From 64274381f3669d191e2bfa417e93bf2e0f7fa399 Mon Sep 17 00:00:00 2001 From: dumbledad Date: Thu, 15 Jul 2021 11:57:12 +0100 Subject: [PATCH 1/7] Dropping windows tests, but keeping cred-scan --- azure-pipelines/build-pr.yml | 2 +- azure-pipelines/build.yaml | 13 ------------- azure-pipelines/checkout.yml | 6 +----- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/azure-pipelines/build-pr.yml b/azure-pipelines/build-pr.yml index 58b61c6c5..750f77c46 100644 --- a/azure-pipelines/build-pr.yml +++ b/azure-pipelines/build-pr.yml @@ -21,7 +21,7 @@ jobs: pool: vmImage: 'windows-2019' steps: - - template: build.yaml + - template: build_windows.yaml - job: Linux pool: diff --git a/azure-pipelines/build.yaml b/azure-pipelines/build.yaml index 1a5d8dfeb..a03b3f5a7 100644 --- a/azure-pipelines/build.yaml +++ b/azure-pipelines/build.yaml @@ -1,19 +1,6 @@ steps: - template: checkout.yml - - task: CredScan@3 - condition: and(succeeded(), eq( variables['Agent.OS'], 'Windows_NT' )) - - - task: PostAnalysis@1 - condition: and(succeeded(), eq( variables['Agent.OS'], 'Windows_NT' )) - displayName: 'Post Analysis' - inputs: - CredScan: true - - - script: echo %NUMBER_OF_PROCESSORS% - condition: and(succeeded(), eq( variables['Agent.OS'], 'Windows_NT' )) - displayName: Print processors - - bash: | conda env create --file environment.yml --name InnerEye --quiet source activate InnerEye diff --git a/azure-pipelines/checkout.yml b/azure-pipelines/checkout.yml index 88665f705..05efcfd5f 100644 --- a/azure-pipelines/checkout.yml +++ b/azure-pipelines/checkout.yml @@ -4,10 +4,7 @@ steps: submodules: true - bash: | - if [ $(Agent.OS) = 'Windows_NT' ] - then subdir=Scripts - else subdir=bin - fi + subdir=bin echo "Adding this directory to PATH: $CONDA/$subdir" echo "##vso[task.prependpath]$CONDA/$subdir" displayName: Add conda to PATH @@ -19,7 +16,6 @@ steps: conda list displayName: Print conda version and initial package list - # Linux only; not needed for Windows - bash: | sudo chown -R $USER /usr/share/miniconda condition: and(succeeded(), eq( variables['Agent.OS'], 'Linux' )) From 36c764d306844e7a90b92dce6be0282fe86a4c92 Mon Sep 17 00:00:00 2001 From: dumbledad Date: Thu, 15 Jul 2021 12:03:24 +0100 Subject: [PATCH 2/7] changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2733013a..02258cae9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,7 +43,8 @@ mounting and running matplotblib on some machines. Re-instantiated a disabled te ### Removed -- ([#520](https://github.com/microsoft/InnerEye-DeepLearning/pull/520)) Disable glaucoma job from Azure pipeline. +- ([#541](https://github.com/microsoft/InnerEye-DeepLearning/issues/541)) Removed Windows test leg from build pipeline. +- ([#520](https://github.com/microsoft/InnerEye-DeepLearning/pull/520)) Disable glaucoma job from Azure pipeline. ### Deprecated From 62bb8bf4b376dfc95df0cd8156e88539c90f8235 Mon Sep 17 00:00:00 2001 From: dumbledad Date: Thu, 15 Jul 2021 12:06:06 +0100 Subject: [PATCH 3/7] changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02258cae9..bae5b5d0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,7 +43,7 @@ mounting and running matplotblib on some machines. Re-instantiated a disabled te ### Removed -- ([#541](https://github.com/microsoft/InnerEye-DeepLearning/issues/541)) Removed Windows test leg from build pipeline. +- ([#542](https://github.com/microsoft/InnerEye-DeepLearning/pull/542)) Removed Windows test leg from build pipeline. - ([#520](https://github.com/microsoft/InnerEye-DeepLearning/pull/520)) Disable glaucoma job from Azure pipeline. ### Deprecated From d72e33316090af6f4c5ed26047dec6f8ae5f1fee Mon Sep 17 00:00:00 2001 From: dumbledad Date: Thu, 15 Jul 2021 12:06:52 +0100 Subject: [PATCH 4/7] New YAML for Windows --- azure-pipelines/build_windows.yaml | 14 ++++++++++++++ azure-pipelines/checkout_windows.yml | 17 +++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 azure-pipelines/build_windows.yaml create mode 100644 azure-pipelines/checkout_windows.yml diff --git a/azure-pipelines/build_windows.yaml b/azure-pipelines/build_windows.yaml new file mode 100644 index 000000000..37bd67913 --- /dev/null +++ b/azure-pipelines/build_windows.yaml @@ -0,0 +1,14 @@ + - template: checkout_windows.yml + + - task: CredScan@3 + condition: and(succeeded(), eq( variables['Agent.OS'], 'Windows_NT' )) + + - task: PostAnalysis@1 + condition: and(succeeded(), eq( variables['Agent.OS'], 'Windows_NT' )) + displayName: 'Post Analysis' + inputs: + CredScan: true + + - script: echo %NUMBER_OF_PROCESSORS% + condition: and(succeeded(), eq( variables['Agent.OS'], 'Windows_NT' )) + displayName: Print processors \ No newline at end of file diff --git a/azure-pipelines/checkout_windows.yml b/azure-pipelines/checkout_windows.yml new file mode 100644 index 000000000..44a0a26b9 --- /dev/null +++ b/azure-pipelines/checkout_windows.yml @@ -0,0 +1,17 @@ +steps: + - checkout: self + lfs: true + submodules: true + + - bash: | + subdir=Scripts + echo "Adding this directory to PATH: $CONDA/$subdir" + echo "##vso[task.prependpath]$CONDA/$subdir" + displayName: Add conda to PATH + condition: succeeded() + + - bash: | + conda install conda=4.8.3 -y + conda --version + conda list + displayName: Print conda version and initial package list From 985eee0031ffc1b2382a6754e24f157237af32ef Mon Sep 17 00:00:00 2001 From: dumbledad Date: Thu, 15 Jul 2021 12:09:18 +0100 Subject: [PATCH 5/7] typos --- azure-pipelines/build_windows.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines/build_windows.yaml b/azure-pipelines/build_windows.yaml index 37bd67913..c93684d92 100644 --- a/azure-pipelines/build_windows.yaml +++ b/azure-pipelines/build_windows.yaml @@ -1,3 +1,4 @@ +steps: - template: checkout_windows.yml - task: CredScan@3 @@ -11,4 +12,4 @@ - script: echo %NUMBER_OF_PROCESSORS% condition: and(succeeded(), eq( variables['Agent.OS'], 'Windows_NT' )) - displayName: Print processors \ No newline at end of file + displayName: Print processors From 4b3c36b2c1694c47b7629aee90490785f3b07e9a Mon Sep 17 00:00:00 2001 From: dumbledad Date: Thu, 15 Jul 2021 12:11:03 +0100 Subject: [PATCH 6/7] num processors step removed for Windows --- azure-pipelines/build_windows.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/azure-pipelines/build_windows.yaml b/azure-pipelines/build_windows.yaml index c93684d92..29738930c 100644 --- a/azure-pipelines/build_windows.yaml +++ b/azure-pipelines/build_windows.yaml @@ -10,6 +10,3 @@ steps: inputs: CredScan: true - - script: echo %NUMBER_OF_PROCESSORS% - condition: and(succeeded(), eq( variables['Agent.OS'], 'Windows_NT' )) - displayName: Print processors From f09efba5804d512bb25229e8d88f560360b6dfb4 Mon Sep 17 00:00:00 2001 From: dumbledad Date: Thu, 15 Jul 2021 12:41:25 +0100 Subject: [PATCH 7/7] Adding back Windows ComponentGovernanceComponentDetection --- azure-pipelines/build_windows.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/azure-pipelines/build_windows.yaml b/azure-pipelines/build_windows.yaml index 29738930c..25b67bac6 100644 --- a/azure-pipelines/build_windows.yaml +++ b/azure-pipelines/build_windows.yaml @@ -10,3 +10,11 @@ steps: inputs: CredScan: true + - task: ComponentGovernanceComponentDetection@0 + condition: succeeded() + inputs: + scanType: 'Register' + verbosity: 'Normal' + alertWarningLevel: 'High' + failOnAlert: true + failOnStderr: true