diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..7fd04a6e6 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,50 @@ +variables: + # Replace this name with that of the Azure service connection in your DevOps project + ConnectedServiceName: 'Azure Primary' + + # Replace this name to match the name of the App Service you created earlier + WebAppName: 'dcha-flaskpipelines' + +trigger: +- master + +pool: + name: Hosted Ubuntu 1604 + +steps: +- task: UsePythonVersion@0 + inputs: + versionSpec: '3.6' + architecture: 'x64' + +- script: | + pip install setuptools + pip install -r requirements.txt + + # The displayName is shows in the pipeline UI when a build runs + displayName: 'Install Dependencies' + +- task: ArchiveFiles@2 + inputs: + rootFolderOrFile: '$(Build.SourcesDirectory)' + includeRootFolder: false + archiveType: 'zip' + archiveFile: '$(Build.ArtifactStagingDirectory)/Application$(Build.BuildId).zip' + replaceExistingArchive: true + verbose: # Optional + +- task: AzureRMWebAppDeployment@4 + displayName: Azure App Service Deploy + inputs: + appType: webAppLinux + RuntimeStack: 'PYTHON|3.6' + ConnectedServiceName: $(ConnectedServiceName) + WebAppName: $(WebAppName) + Package: '$(Build.ArtifactStagingDirectory)/Application$(Build.BuildId).zip' + + # The following command is specific to the python-sample-vscode-flask-tutorial code. + # You may or may not need a startup command for your own app. + + StartupCommand: 'gunicorn --bind=0.0.0.0 --workers=4 startup:app' + + \ No newline at end of file diff --git a/hello_app/templates/home.html b/hello_app/templates/home.html index 95609fecd..86d7ff360 100644 --- a/hello_app/templates/home.html +++ b/hello_app/templates/home.html @@ -1,6 +1,6 @@ {% extends "layout.html" %} {% block title %} -Home +Home EEEE {% endblock %} {% block content %}
Home page for the Visual Studio Code Flask tutorial.