From 56afe37aed7741eec65111b6a57e3702fc526b66 Mon Sep 17 00:00:00 2001 From: ethbatch <97822905+ethbatch@users.noreply.github.com> Date: Fri, 16 Aug 2024 11:39:00 +1000 Subject: [PATCH 01/27] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..a6a949487 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,36 @@ +# Python package +# Create and test a Python package on multiple Python versions. +# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/python + +trigger: +- main + +pool: + vmImage: ubuntu-latest +strategy: + matrix: + Python27: + python.version: '2.7' + Python35: + python.version: '3.5' + Python36: + python.version: '3.6' + Python37: + python.version: '3.7' + +steps: +- task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version)' + displayName: 'Use Python $(python.version)' + +- script: | + python -m pip install --upgrade pip + pip install -r requirements.txt + displayName: 'Install dependencies' + +- script: | + pip install pytest pytest-azurepipelines + pytest + displayName: 'pytest' From a098c281a43e5c9d55ba88f177ed4c53a42abc58 Mon Sep 17 00:00:00 2001 From: ethbatch <97822905+ethbatch@users.noreply.github.com> Date: Fri, 16 Aug 2024 12:24:52 +1000 Subject: [PATCH 02/27] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a6a949487..f5d90c2db 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -6,7 +6,8 @@ trigger: - main -pool: +pool: + name: Default vmImage: ubuntu-latest strategy: matrix: From b6502e8418f4d86588c3462d563d15b599ec1192 Mon Sep 17 00:00:00 2001 From: ethbatch <97822905+ethbatch@users.noreply.github.com> Date: Fri, 16 Aug 2024 12:32:48 +1000 Subject: [PATCH 03/27] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f5d90c2db..9d00126ae 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -25,6 +25,8 @@ steps: inputs: versionSpec: '$(python.version)' displayName: 'Use Python $(python.version)' + + - script: | python -m pip install --upgrade pip From d72c3abfb00d63807753cd4477faa5304c9fa86e Mon Sep 17 00:00:00 2001 From: ethbatch <97822905+ethbatch@users.noreply.github.com> Date: Fri, 16 Aug 2024 12:41:09 +1000 Subject: [PATCH 04/27] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9d00126ae..e53e37cb7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -11,12 +11,6 @@ pool: vmImage: ubuntu-latest strategy: matrix: - Python27: - python.version: '2.7' - Python35: - python.version: '3.5' - Python36: - python.version: '3.6' Python37: python.version: '3.7' From 7413cf1e4cac708c7a75357cf86120850f84ce3e Mon Sep 17 00:00:00 2001 From: ethbatch <97822905+ethbatch@users.noreply.github.com> Date: Mon, 19 Aug 2024 16:01:08 +1000 Subject: [PATCH 05/27] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e53e37cb7..e8e6628d7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -25,7 +25,7 @@ steps: - script: | python -m pip install --upgrade pip pip install -r requirements.txt - displayName: 'Install dependencies' + displayName: 'Install dependencies!!!' - script: | pip install pytest pytest-azurepipelines From 7a64040e43cf5e5b9b7c5059a6fc489ba24ebf27 Mon Sep 17 00:00:00 2001 From: ethbatch <97822905+ethbatch@users.noreply.github.com> Date: Mon, 19 Aug 2024 16:24:28 +1000 Subject: [PATCH 06/27] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 068a76fd5..a6968a200 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![Build Status](https://dev.azure.com/ajtestorg01/myproject/_apis/build/status%2Fethbatch.python-sample-vscode-flask-tutorial?branchName=main)](https://dev.azure.com/ajtestorg01/myproject/_build/latest?definitionId=2&branchName=main) # Python/Flask Tutorial for Visual Studio Code * This sample contains the completed program from the tutorial, make sure to visit the link: [Using Flask in Visual Studio Code](https://code.visualstudio.com/docs/python/tutorial-flask). Intermediate steps are not included. From 1184bd00a9f488440a40ec412767329e48d0cb1d Mon Sep 17 00:00:00 2001 From: ethbatch <97822905+ethbatch@users.noreply.github.com> Date: Tue, 20 Aug 2024 09:56:54 +1000 Subject: [PATCH 07/27] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e8e6628d7..8527655fb 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -5,10 +5,12 @@ trigger: - main +pr: +- pr pool: name: Default - vmImage: ubuntu-latest + vmImage: windows-latest strategy: matrix: Python37: From ca4ea5e75a6b12a02a63afe6823c1d947c7e3322 Mon Sep 17 00:00:00 2001 From: ethbatch <97822905+ethbatch@users.noreply.github.com> Date: Tue, 20 Aug 2024 10:51:28 +1000 Subject: [PATCH 08/27] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8527655fb..487d2cb8e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -10,13 +10,14 @@ pr: pool: name: Default - vmImage: windows-latest + vmImage: ubuntu-latest strategy: matrix: Python37: python.version: '3.7' steps: + - task: UsePythonVersion@0 inputs: versionSpec: '$(python.version)' From ad22124abd387d5080330ad46576ce2b3b634a47 Mon Sep 17 00:00:00 2001 From: ethbatch <97822905+ethbatch@users.noreply.github.com> Date: Tue, 20 Aug 2024 10:53:19 +1000 Subject: [PATCH 09/27] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 487d2cb8e..6d82cdacf 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -10,7 +10,7 @@ pr: pool: name: Default - vmImage: ubuntu-latest + vmImage: windows-latest strategy: matrix: Python37: From 8b79f776bd220dd218683a288429ad8fc5142545 Mon Sep 17 00:00:00 2001 From: ethbatch <97822905+ethbatch@users.noreply.github.com> Date: Tue, 20 Aug 2024 11:48:37 +1000 Subject: [PATCH 10/27] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6d82cdacf..20882eb8a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -8,13 +8,18 @@ trigger: pr: - pr -pool: - name: Default - vmImage: windows-latest strategy: matrix: - Python37: - python.version: '3.7' + linux: + imageName: "ubuntu-latest" + mac: + imageName: "macOS-latest" + windows: + imageName: "windows-latest" + maxParallel: 3 + +pool: + vmImage: $(imageName) steps: From d22d5e2a11691c2dece6cbf6d22cf94e05f44cdb Mon Sep 17 00:00:00 2001 From: ethbatch <97822905+ethbatch@users.noreply.github.com> Date: Tue, 20 Aug 2024 12:44:06 +1000 Subject: [PATCH 11/27] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 20882eb8a..a6d3837d0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -8,18 +8,13 @@ trigger: pr: - pr +pool: + name: Default + vmImage: windows-latest strategy: matrix: - linux: - imageName: "ubuntu-latest" - mac: - imageName: "macOS-latest" - windows: - imageName: "windows-latest" - maxParallel: 3 - -pool: - vmImage: $(imageName) + Python37: + python.version: '3.7' steps: @@ -38,4 +33,4 @@ steps: - script: | pip install pytest pytest-azurepipelines pytest - displayName: 'pytest' + displayName: 'pytest' \ No newline at end of file From 1d92d6fe109303c6e308b884a2d1eafa9514a874 Mon Sep 17 00:00:00 2001 From: ethbatch <97822905+ethbatch@users.noreply.github.com> Date: Tue, 20 Aug 2024 13:56:56 +1000 Subject: [PATCH 12/27] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a6d3837d0..074d73a84 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -10,7 +10,7 @@ pr: pool: name: Default - vmImage: windows-latest + vmImage: ubuntu-latest strategy: matrix: Python37: From c300c8baa2858fea718453d1b1ed1c8fe9f5e79e Mon Sep 17 00:00:00 2001 From: ethbatch <97822905+ethbatch@users.noreply.github.com> Date: Tue, 20 Aug 2024 14:35:32 +1000 Subject: [PATCH 13/27] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 074d73a84..796af9a5d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -30,6 +30,10 @@ steps: pip install -r requirements.txt displayName: 'Install dependencies!!!' +- script: | + python --version + displayName: 'Python version' + - script: | pip install pytest pytest-azurepipelines pytest From 3fe59dee52bf94750d3bf29c0910bc9e1314b480 Mon Sep 17 00:00:00 2001 From: ethbatch <97822905+ethbatch@users.noreply.github.com> Date: Tue, 20 Aug 2024 14:40:31 +1000 Subject: [PATCH 14/27] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 796af9a5d..54a9074b0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -17,11 +17,15 @@ strategy: python.version: '3.7' steps: - +- script: | + hostname + displayName: 'Show me hostname' - task: UsePythonVersion@0 inputs: versionSpec: '$(python.version)' displayName: 'Use Python $(python.version)' + + @@ -37,4 +41,4 @@ steps: - script: | pip install pytest pytest-azurepipelines pytest - displayName: 'pytest' \ No newline at end of file + displayName: 'pytest' From 0b66039cc2db84ae405eb97e575d37a7017e2874 Mon Sep 17 00:00:00 2001 From: ethbatch <97822905+ethbatch@users.noreply.github.com> Date: Tue, 20 Aug 2024 14:41:56 +1000 Subject: [PATCH 15/27] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 54a9074b0..b6de6b1f1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -18,7 +18,7 @@ strategy: steps: - script: | - hostname + dir d:\learningsupport\ displayName: 'Show me hostname' - task: UsePythonVersion@0 inputs: From 4b7f5bc7b54c0d163325ceca8627dd39f44b5262 Mon Sep 17 00:00:00 2001 From: ethbatch <97822905+ethbatch@users.noreply.github.com> Date: Tue, 20 Aug 2024 14:44:34 +1000 Subject: [PATCH 16/27] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b6de6b1f1..f9bfbc5b0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -18,7 +18,7 @@ strategy: steps: - script: | - dir d:\learningsupport\ + dir d:\learningsupport\frontend\ displayName: 'Show me hostname' - task: UsePythonVersion@0 inputs: From 4a9fa293d222ae58cd86dd3582664770a1db0d8e Mon Sep 17 00:00:00 2001 From: ethbatch <97822905+ethbatch@users.noreply.github.com> Date: Tue, 20 Aug 2024 14:45:31 +1000 Subject: [PATCH 17/27] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f9bfbc5b0..f09c78873 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -18,7 +18,7 @@ strategy: steps: - script: | - dir d:\learningsupport\frontend\ + dir d:\learningsupport\frontend\ && type d:\learningsupport\frontend\.gitignore displayName: 'Show me hostname' - task: UsePythonVersion@0 inputs: From 8b3430850e7b38edd9439b65bff92d4999845f99 Mon Sep 17 00:00:00 2001 From: ethbatch <97822905+ethbatch@users.noreply.github.com> Date: Tue, 20 Aug 2024 14:47:12 +1000 Subject: [PATCH 18/27] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f09c78873..b07409d7b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -18,7 +18,7 @@ strategy: steps: - script: | - dir d:\learningsupport\frontend\ && type d:\learningsupport\frontend\.gitignore + cd d:\learningsupport && dir displayName: 'Show me hostname' - task: UsePythonVersion@0 inputs: From 46538fef9cf484b476c60bd98a1d82ee161a5afb Mon Sep 17 00:00:00 2001 From: ethbatch <97822905+ethbatch@users.noreply.github.com> Date: Tue, 20 Aug 2024 15:14:14 +1000 Subject: [PATCH 19/27] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b07409d7b..3157686b3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -18,7 +18,7 @@ strategy: steps: - script: | - cd d:\learningsupport && dir + write-output ${env:MYNAME} displayName: 'Show me hostname' - task: UsePythonVersion@0 inputs: From 596a79a0677adcca56902e7890fab39990e33cf0 Mon Sep 17 00:00:00 2001 From: ethbatch <97822905+ethbatch@users.noreply.github.com> Date: Tue, 20 Aug 2024 15:15:23 +1000 Subject: [PATCH 20/27] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3157686b3..581cc5b4f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -18,7 +18,7 @@ strategy: steps: - script: | - write-output ${env:MYNAME} + echo %MYNAME% displayName: 'Show me hostname' - task: UsePythonVersion@0 inputs: From 149f2a7191da99cdecc8c882ac3989752a510d24 Mon Sep 17 00:00:00 2001 From: ethbatch <97822905+ethbatch@users.noreply.github.com> Date: Tue, 20 Aug 2024 15:16:26 +1000 Subject: [PATCH 21/27] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 581cc5b4f..434ea4bec 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -18,7 +18,7 @@ strategy: steps: - script: | - echo %MYNAME% + echo MYNAME: %MYNAME% displayName: 'Show me hostname' - task: UsePythonVersion@0 inputs: From 039bbe15320f1b0518fa502c395f8d58a0fd661f Mon Sep 17 00:00:00 2001 From: ethbatch <97822905+ethbatch@users.noreply.github.com> Date: Tue, 20 Aug 2024 15:18:23 +1000 Subject: [PATCH 22/27] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 434ea4bec..40167907e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -18,8 +18,17 @@ strategy: steps: - script: | - echo MYNAME: %MYNAME% - displayName: 'Show me hostname' + dir d:\learningsupport\ + displayName: 'Show me the folder' + +- task: PowerShell@2 + inputs: + targetType: 'inline' + script: | + # Write your PowerShell commands here. + + Write-Host "Hello World" + displayName: 'Powershell run' - task: UsePythonVersion@0 inputs: versionSpec: '$(python.version)' From 7cf8a485ed783ae9cad1bca591e5a92e9d8d93bd Mon Sep 17 00:00:00 2001 From: ethbatch <97822905+ethbatch@users.noreply.github.com> Date: Tue, 20 Aug 2024 15:19:37 +1000 Subject: [PATCH 23/27] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 40167907e..e265d4565 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -28,6 +28,7 @@ steps: # Write your PowerShell commands here. Write-Host "Hello World" + Write-Host ${env:MYNAME} displayName: 'Powershell run' - task: UsePythonVersion@0 inputs: From 2614f130aa21f46497f94950be17d19c028fcb9b Mon Sep 17 00:00:00 2001 From: ethbatch <97822905+ethbatch@users.noreply.github.com> Date: Tue, 20 Aug 2024 15:21:29 +1000 Subject: [PATCH 24/27] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e265d4565..2a6773772 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -28,7 +28,7 @@ steps: # Write your PowerShell commands here. Write-Host "Hello World" - Write-Host ${env:MYNAME} + Write-Host $ENV:myname displayName: 'Powershell run' - task: UsePythonVersion@0 inputs: From 3815f710d06e9b8e53d2c8e182b33a497fc432e6 Mon Sep 17 00:00:00 2001 From: ethbatch <97822905+ethbatch@users.noreply.github.com> Date: Tue, 20 Aug 2024 15:28:28 +1000 Subject: [PATCH 25/27] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2a6773772..e265d4565 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -28,7 +28,7 @@ steps: # Write your PowerShell commands here. Write-Host "Hello World" - Write-Host $ENV:myname + Write-Host ${env:MYNAME} displayName: 'Powershell run' - task: UsePythonVersion@0 inputs: From 004336cdf6892986b6e488cb06b6113ab43334f1 Mon Sep 17 00:00:00 2001 From: ethbatch <97822905+ethbatch@users.noreply.github.com> Date: Tue, 20 Aug 2024 15:29:26 +1000 Subject: [PATCH 26/27] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e265d4565..33829ee7e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -28,7 +28,7 @@ steps: # Write your PowerShell commands here. Write-Host "Hello World" - Write-Host ${env:MYNAME} + Write-Host $env:MYNAME displayName: 'Powershell run' - task: UsePythonVersion@0 inputs: From 65f316fcc3a87bca7b5830938da49c338cb2263f Mon Sep 17 00:00:00 2001 From: ethbatch <97822905+ethbatch@users.noreply.github.com> Date: Tue, 20 Aug 2024 16:37:48 +1000 Subject: [PATCH 27/27] Update README.md