diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..52e02a8cc --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,67 @@ +name: Azure Pipelines +variables: + python.version: '3.7.6' +stages: +- stage: Build + jobs: + - job: Build + pool: + name: Hosted Ubuntu 1604 + steps: + # Needed for Terraform VM deployment + # - task: InstallSSHKey@0 + # inputs: + # knownHostsEntry: 'KNOWN_HOSTS_STRING' + # sshPublicKey: 'PUBLIC_KEY' + # sshKeySecureFile: 'id_rsa' + - task: ArchiveFiles@2 + displayName: 'Archive FakeRestAPI' + inputs: + rootFolderOrFile: 'path/to/fakerestapi' + includeRootFolder: false + archiveType: 'zip' + archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip' + - publish: $(Build.ArtifactStagingDirectory)/$(Build.BuildId)-fakerestapi.zip + displayName: 'Upload Package' + artifact: drop-fakerestapi +- stage: + jobs: + - deployment: FakeRestAPI + pool: + vmImage: 'Ubuntu-16.04' + environment: 'TEST' + strategy: + runOnce: + deploy: + steps: + - task: AzureWebApp@1 + displayName: 'Deploy Azure Web App' + inputs: + azureSubscription: '' + appName: '' + appType: webApp + package: $(Pipeline.Workspace)/drop-fakerestapi/$(Build.BuildId)-fakerestapi.zip + # - deployment: VMDeploy + # displayName: NAME + # environment: + # name: ENVIRONMENT NAME + # resourceType: VirtualMachine + # tags: TAG NAME + # strategy: + # runOnce: + # deploy: + # steps: + # - task: Bash@3 + # inputs: + # targetType: 'inline' + # script: | + # #! /bin/bash + + # sudo apt-get upgrade -y + # sudo apt-get install python3-pip -y + # sudo apt-get install unzip -y + # sudo apt-get install -y chromium-browser + # pip3 install selenium + # export PATH=$PATH:some/path + + diff --git a/requirements.txt b/requirements.txt index af2376e97..8d4e541fa 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,5 +2,5 @@ click==6.7 Flask==1.0.2 itsdangerous==0.24 Jinja2>=2.10.1 -MarkupSafe==1.0 +MarkupSafe Werkzeug==0.15.5