mirror of https://github.com/abpframework/eventhub
3 changed files with 91 additions and 0 deletions
@ -0,0 +1,62 @@ |
|||
trigger: |
|||
- main |
|||
|
|||
variables: |
|||
|
|||
dockerRegistryServiceConnection: 'b46a670b-6940-4de5-b6b1-b06f9dd1c849' |
|||
imageRepository: 'voloeventhubhttpapihost' |
|||
containerRegistry: 'voloeventhubhttpapihost.azurecr.io' |
|||
dockerfilePath: '**/Dockerfile.EventHub.HttpApi.Host' |
|||
tag: '$(Build.BuildNumber)' |
|||
|
|||
# Agent VM image name |
|||
vmImageName: 'ubuntu-latest' |
|||
|
|||
|
|||
stages: |
|||
- stage: Build |
|||
displayName: Build stage |
|||
jobs: |
|||
- job: Build |
|||
displayName: Build |
|||
pool: |
|||
vmImage: $(vmImageName) |
|||
steps: |
|||
- task: Docker@2 |
|||
displayName: Build and push an image to container registry |
|||
inputs: |
|||
command: buildAndPush |
|||
repository: $(imageRepository) |
|||
dockerfile: $(dockerfilePath) |
|||
containerRegistry: $(dockerRegistryServiceConnection) |
|||
tags: | |
|||
$(tag) |
|||
|
|||
- upload: manifests |
|||
artifact: manifests |
|||
|
|||
- stage: Deploy |
|||
displayName: Deploy stage |
|||
dependsOn: Build |
|||
|
|||
jobs: |
|||
- deployment: Deploy |
|||
displayName: Deploy-HttpApi-Host |
|||
pool: |
|||
vmImage: $(vmImageName) |
|||
environment: 'volosofteventhub-6504.default' |
|||
strategy: |
|||
runOnce: |
|||
deploy: |
|||
steps: |
|||
|
|||
- task: KubernetesManifest@0 |
|||
displayName: Deploy to Kubernetes cluster |
|||
inputs: |
|||
action: deploy |
|||
manifests: | |
|||
$(Pipeline.Workspace)/manifests/deployment.eventhub.httpapi.host.yml |
|||
$(Pipeline.Workspace)/manifests/service.eventhub.httpapi.host.yml |
|||
containers: | |
|||
$(containerRegistry)/$(imageRepository):$(tag) |
|||
|
|||
@ -0,0 +1,19 @@ |
|||
apiVersion : apps/v1 |
|||
kind: Deployment |
|||
metadata: |
|||
name: voloeventhubhttpapihost |
|||
spec: |
|||
replicas: 1 |
|||
selector: |
|||
matchLabels: |
|||
app: voloeventhubhttpapihost |
|||
template: |
|||
metadata: |
|||
labels: |
|||
app: voloeventhubhttpapihost |
|||
spec: |
|||
containers: |
|||
- name: voloeventhubhttpapihost |
|||
image: voloeventhubhttpapihost.azurecr.io/voloeventhubhttpapihost |
|||
ports: |
|||
- containerPort: 5002 |
|||
@ -0,0 +1,10 @@ |
|||
apiVersion: v1 |
|||
kind: Service |
|||
metadata: |
|||
name: voloeventhubhttpapihost |
|||
spec: |
|||
type: LoadBalancer |
|||
ports: |
|||
- port: 5002 |
|||
selector: |
|||
app: voloeventhubhttpapihost |
|||
Loading…
Reference in new issue