diff --git a/LearningDevOps/README.md b/LearningDevOps/README.md new file mode 100644 index 000000000..0a72f69f7 --- /dev/null +++ b/LearningDevOps/README.md @@ -0,0 +1,4 @@ +# LearningDevOps +ALL learning of devops will be right here. + +hey rahul \ No newline at end of file diff --git a/LearningDevOps/azure-pipelines.yml b/LearningDevOps/azure-pipelines.yml new file mode 100644 index 000000000..772211d63 --- /dev/null +++ b/LearningDevOps/azure-pipelines.yml @@ -0,0 +1,50 @@ +# Starter pipeline +# Start with a minimal pipeline that you can customize to build and deploy your code. +# Add steps that build, run tests, deploy, and more: +# https://aka.ms/yaml + +trigger: +- main + +pool: + vmImage: ubuntu-latest + +strategy: + matrix: + python310: + python.version: '3.10' + python311: + python.version: '3.11' + python312: + python.version: '3.12' + +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' + +- task: ArchiveFiles@2 + displayName: 'Archive Files' + inputs: + rootFolderOrFile: $(System.DefaultWorkingDirectory) + includeRootFolder: false + archiveType: zip + archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId)-$(python.version).zip + replaceExistingArchive: true + +- task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: 'drop' + publishLocation: 'Container' + +- script: | + pip install pytest pytest-azurepipelines + pytest + displayName: 'pytest' diff --git a/LearningDevOps/note.txt b/LearningDevOps/note.txt new file mode 100644 index 000000000..c069890d1 --- /dev/null +++ b/LearningDevOps/note.txt @@ -0,0 +1,17 @@ +commit ca93958802b25974073c523bb3867731981d0b3f (HEAD -> main, origin/main, origin/dev, origin/HEAD, test, dev) +Author: Abhishek +Date: Tue May 19 05:59:41 2026 +0000 + + Made changes in note.txt file + +commit 72c4f94a449759d6d7e25e7b8f33e8738faaeace +Author: Abhishek +Date: Tue May 19 05:52:37 2026 +0000 + + Setting up Platform + +commit 3ec51231c91012ae805632d87be697d25fd64b41 +Author: Abhishek +Date: Fri May 15 01:17:14 2026 +0530 + + Initial commit diff --git a/README.md b/README.md index 068a76fd5..b707227cb 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +<<<<<<< HEAD +# tery +======= # 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. @@ -30,3 +33,4 @@ When you submit a pull request, a CLA-bot automatically determines whether you n * This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). * For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or * Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. +>>>>>>> 90f581677ea56f32164f77c0687cae72b53f505e diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..b6064b059 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,81 @@ +trigger: +- main + +variables: + # Azure Resource Manager connection created during pipeline creation + azureServiceConnectionId: '01fcb7bf-3c1d-44ee-9116-c74c89bb26db' + + # Web app name + webAppName: 'abhiappPY' + + # Agent VM image name + vmImageName: 'ubuntu-latest' + + # Environment name + environmentName: 'abhiappPY' + + # Project root folder. Point to the folder containing manage.py file. + projectRoot: $(System.DefaultWorkingDirectory) + + pythonVersion: '3.11' + +stages: +- stage: Build + displayName: Build stage + jobs: + - job: BuildJob + pool: + vmImage: $(vmImageName) + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '$(pythonVersion)' + displayName: 'Use Python $(pythonVersion)' + + - script: | + python -m venv antenv + source antenv/bin/activate + python -m pip install --upgrade pip + pip install setuptools + pip install -r requirements.txt + workingDirectory: $(projectRoot) + displayName: "Install requirements" + + - task: ArchiveFiles@2 + displayName: 'Archive files' + inputs: + rootFolderOrFile: '$(projectRoot)' + includeRootFolder: false + archiveType: zip + archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip + replaceExistingArchive: true + + - upload: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip + displayName: 'Upload package' + artifact: drop + +- stage: Deploy + displayName: 'Deploy Web App' + dependsOn: Build + condition: succeeded() + jobs: + - deployment: DeploymentJob + pool: + vmImage: $(vmImageName) + environment: $(environmentName) + strategy: + runOnce: + deploy: + steps: + + - task: UsePythonVersion@0 + inputs: + versionSpec: '$(pythonVersion)' + displayName: 'Use Python version' + + - task: AzureWebApp@1 + displayName: 'Deploy Azure Web App : $(webAppName)' + inputs: + azureSubscription: $(azureServiceConnectionId) + appName: $(webAppName) + package: $(Pipeline.Workspace)/drop/$(Build.BuildId).zip \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index e3e9a71d9..b945ee1ae 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,7 @@ +<<<<<<< HEAD +azure-cli==2.60.0 +pytest==8.2.0 +requests==2.31.0 +======= Flask +>>>>>>> 90f581677ea56f32164f77c0687cae72b53f505e diff --git a/test1/python-sample-vscode-flask-tutorial b/test1/python-sample-vscode-flask-tutorial new file mode 160000 index 000000000..d7784cc39 --- /dev/null +++ b/test1/python-sample-vscode-flask-tutorial @@ -0,0 +1 @@ +Subproject commit d7784cc399cc63d74e2e5759f111c01f646c7841 diff --git a/test_sample.py b/test_sample.py new file mode 100644 index 000000000..d2cd73cb2 --- /dev/null +++ b/test_sample.py @@ -0,0 +1,2 @@ +def test_basic(): + assert True \ No newline at end of file