diff options
author | 2018-11-25 11:07:17 +0100 | |
---|---|---|
committer | 2018-11-25 11:07:17 +0100 | |
commit | 7cad434189a4b3afb49a88df20f7c4a303f1d47c (patch) | |
tree | 9f77d7f52b1579bcf896340c59b5712b3130e735 /azure-pipelines.yml | |
parent | Use more descriptive migration name. (diff) |
Set up image pushing and building on Azure. (#152)
Closes #152.
Diffstat (limited to 'azure-pipelines.yml')
-rw-r--r-- | azure-pipelines.yml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 90232430..1c6a746a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -55,6 +55,9 @@ jobs: - job: test displayName: Test + dependsOn: + - lint_misc + - lint_python pool: vmImage: ubuntu-16.04 strategy: @@ -112,5 +115,25 @@ jobs: testResultsFiles: "**/TEST-*.xml" testRunTitle: 'Python $(python.version) with PostgreSQL $(postgres.version)' + - job: push_image + displayName: Push Docker image + dependsOn: test + condition: and(succeeded(), eq(variables['build.sourceBranch'], 'refs/heads/django')) + pool: + vmImage: ubuntu-16.04 + + steps: + - task: Docker@1 + displayName: Login to Docker Hub + + inputs: + containerregistrytype: 'Container Registry' + dockerRegistryEndpoint: 'DockerHub' + command: 'login' + + - script: | + docker build -t pythondiscord/django:latest . + docker push pythondiscord/django:latest + displayName: Build and push the image # vim: sw=2 ts=2: |