Skip to content

Instantly share code, notes, and snippets.

@LordBastor
Last active February 15, 2021 08:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LordBastor/985db78c8544867e6335b3916f35b1fc to your computer and use it in GitHub Desktop.
Save LordBastor/985db78c8544867e6335b3916f35b1fc to your computer and use it in GitHub Desktop.
pool:
vmImage: ubuntu-latest
variables:
- name: ACR
value: ACR_URL
- name: AZURE_STORAGE_CONNECTION_STRING
value: AZURE_STORAGE_CONNECTION_STRING
- name: ACR_USER
value: ACR_USER
- name: ACR_PASSWORD
value: ACR_PASSWORD
- name: PROJECT
value: prefect
stages:
- stage: deployment
jobs:
- job: register
pool: private-agent
variables:
IMAGE_URL: "$(ACR)/$(PROJECT):latest"
steps:
#register the flows that changed
- template: templates/register-flows.yml
parameters:
project: $(PROJECT)
- job: build
dependsOn: register
steps:
#build a docker image and push to ACR
- template: templates/docker-build.yml
parameters:
image: "$(ACR)/$(PROJECT)"
tag: latest
- template: templates/docker-login.yml
parameters:
repo: $(ACR)
user: $(ACR_USER)
password: $(ACR_PASSWORD)
- template: templates/docker-push.yml
parameters:
image: "$(ACR)/$(PROJECT)"
tag: latest
trigger:
branches:
include:
- '*'
paths:
include:
- 'flows/'
- 'tasks/'
- 'config/'
exclude:
- '*'
- '*__init__.py*'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment