mirror of https://github.com/abpframework/eventhub
9 changed files with 5 additions and 177 deletions
@ -1,72 +0,0 @@ |
|||
# Deploy to Azure Kubernetes Service |
|||
# Build and push image to Azure Container Registry; Deploy to Azure Kubernetes Service |
|||
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker |
|||
|
|||
trigger: |
|||
- main |
|||
|
|||
|
|||
variables: |
|||
|
|||
# Container registry service connection established during pipeline creation |
|||
dockerRegistryServiceConnection: 'be4690ca-0fbe-4473-a10e-c45c2a32a3c1' |
|||
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) |
|||
|
|||
- publish: manifests |
|||
artifact: manifests |
|||
|
|||
- stage: Deploy |
|||
displayName: Deploy stage |
|||
dependsOn: Build |
|||
|
|||
jobs: |
|||
- deployment: Deploy |
|||
displayName: Deploy-HttpApi.Host |
|||
timeoutInMinutes: 60 # how long to run the job before automatically cancelling |
|||
cancelTimeoutInMinutes: 30 # how much time to give 'run always even if cancelled tasks' before stopping them |
|||
pool: |
|||
vmImage: $(vmImageName) |
|||
environment: 'voloeventhubhttpapihost.default' |
|||
strategy: |
|||
runOnce: |
|||
deploy: |
|||
steps: |
|||
|
|||
|
|||
- task: KubernetesManifest@0 |
|||
displayName: Deploy to Kubernetes cluster |
|||
inputs: |
|||
action: deploy |
|||
namespace: default |
|||
manifests: | |
|||
$(Pipeline.Workspace)/manifests/deployment.eventhub.httpapi.host.yml |
|||
$(Pipeline.Workspace)/manifests/service.eventhub.httpapi.host.yml |
|||
containers: | |
|||
$(containerRegistry)/$(imageRepository):$(tag) |
|||
|
|||
@ -1,71 +0,0 @@ |
|||
# Deploy to Azure Kubernetes Service |
|||
# Build and push image to Azure Container Registry; Deploy to Azure Kubernetes Service |
|||
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker |
|||
|
|||
trigger: |
|||
- main |
|||
|
|||
|
|||
variables: |
|||
|
|||
# Container registry service connection established during pipeline creation |
|||
dockerRegistryServiceConnection: '1ae4ab3c-b39a-4860-b6dc-683cc524d1e4' |
|||
imageRepository: 'volosofteventhub' |
|||
containerRegistry: 'voloeventhub.azurecr.io' |
|||
dockerfilePath: '**/Dockerfile.EventHub.Web' |
|||
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) |
|||
|
|||
- publish: manifests |
|||
artifact: manifests |
|||
|
|||
- stage: Deploy |
|||
displayName: Deploy stage |
|||
dependsOn: Build |
|||
|
|||
jobs: |
|||
- deployment: Deploy |
|||
displayName: Deploy-EventHub.Web |
|||
timeoutInMinutes: 60 # how long to run the job before automatically cancelling |
|||
cancelTimeoutInMinutes: 30 # how much time to give 'run always even if cancelled tasks' before stopping them |
|||
pool: |
|||
vmImage: $(vmImageName) |
|||
environment: 'voloeventhub.default' |
|||
strategy: |
|||
runOnce: |
|||
deploy: |
|||
steps: |
|||
|
|||
|
|||
- task: KubernetesManifest@0 |
|||
displayName: Deploy to Kubernetes cluster |
|||
inputs: |
|||
action: deploy |
|||
manifests: | |
|||
$(Pipeline.Workspace)/manifests/deployment.eventhub.web.yml |
|||
$(Pipeline.Workspace)/manifests/service.eventhub.web.yml |
|||
containers: | |
|||
$(containerRegistry)/$(imageRepository):$(tag) |
|||
|
|||
@ -1,19 +0,0 @@ |
|||
apiVersion : apps/v1 |
|||
kind: Deployment |
|||
metadata: |
|||
name: volosofteventhub |
|||
spec: |
|||
replicas: 1 |
|||
selector: |
|||
matchLabels: |
|||
app: volosofteventhub |
|||
template: |
|||
metadata: |
|||
labels: |
|||
app: volosofteventhub |
|||
spec: |
|||
containers: |
|||
- name: volosofteventhub |
|||
image: voloeventhub.azurecr.io/volosofteventhub |
|||
ports: |
|||
- containerPort: 8080 |
|||
@ -1,10 +0,0 @@ |
|||
apiVersion: v1 |
|||
kind: Service |
|||
metadata: |
|||
name: volosofteventhub |
|||
spec: |
|||
type: LoadBalancer |
|||
ports: |
|||
- port: 8080 |
|||
selector: |
|||
app: volosofteventhub |
|||
Loading…
Reference in new issue