Removed unnecessary CopyFiles task; shifted build variables around; added the identity-api pipeline; added the OpenShift identity-api deploy template
This commit is contained in:
parent
4df4db70ac
commit
b7c6aeea6d
@ -36,12 +36,6 @@ jobs:
|
|||||||
modifyOutputPath: true
|
modifyOutputPath: true
|
||||||
feedsToUse: config
|
feedsToUse: config
|
||||||
nugetConfigPath: src/NuGet.config
|
nugetConfigPath: src/NuGet.config
|
||||||
- task: CopyFiles@2
|
|
||||||
displayName: 'Copy OpenShift App Build Template'
|
|
||||||
inputs:
|
|
||||||
sourceFolder: '$(Build.SourcesDirectory)/build/aro/openshift-templates'
|
|
||||||
contents: 'app-build-template.yml'
|
|
||||||
targetFolder: $(Build.ArtifactStagingDirectory)
|
|
||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
displayName: 'Publish Artifact: drop'
|
displayName: 'Publish Artifact: drop'
|
||||||
|
|
||||||
|
@ -20,15 +20,16 @@ stages:
|
|||||||
OpenShiftProject: development
|
OpenShiftProject: development
|
||||||
SourceImageRegistryProjectName: $(OpenShiftProject)
|
SourceImageRegistryProjectName: $(OpenShiftProject)
|
||||||
EnvironmentName: dev
|
EnvironmentName: dev
|
||||||
|
IdentityPublicHostName: identity$(EnvironmentName)
|
||||||
|
jobs:
|
||||||
|
- job: BasketApiDeployment
|
||||||
|
variables:
|
||||||
IdentityApiHostName: identityapi.$(OpenShiftProject).svc
|
IdentityApiHostName: identityapi.$(OpenShiftProject).svc
|
||||||
RedisHostname: redis.$(OpenShiftProject).svc
|
RedisHostname: redis.$(OpenShiftProject).svc
|
||||||
RabbitMqHostname: rabbitmq.$(OpenShiftProject).svc
|
RabbitMqHostname: rabbitmq.$(OpenShiftProject).svc
|
||||||
IdentityPublicHostName: identity$(EnvironmentName)
|
|
||||||
IdentityUrlExternal: https://$(IdentityPublicHostName)
|
IdentityUrlExternal: https://$(IdentityPublicHostName)
|
||||||
IdentityApiUrl: http://$(IdentityApiHostName):8080
|
IdentityApiUrl: http://$(IdentityApiHostName):8080
|
||||||
jobs:
|
displayName: 'Basket API Deployment'
|
||||||
- job: Configuration_Deployment
|
|
||||||
displayName: 'Configuration Deployment'
|
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'windows-latest'
|
vmImage: 'windows-latest'
|
||||||
steps:
|
steps:
|
||||||
|
44
deploy/aro/identity-api/azure-pipelines.yml
Normal file
44
deploy/aro/identity-api/azure-pipelines.yml
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
variables:
|
||||||
|
OpenShiftServiceConnection: 'OpenShift on ARO'
|
||||||
|
trigger:
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- master
|
||||||
|
- dev
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- deploy/aro/basket-api/*
|
||||||
|
- deploy/aro/openshift-templates/*
|
||||||
|
resources:
|
||||||
|
pipelines:
|
||||||
|
- pipeline: BasketApiBuild
|
||||||
|
source: Basket-API-Build
|
||||||
|
stages:
|
||||||
|
- stage: development
|
||||||
|
displayName: Development
|
||||||
|
variables:
|
||||||
|
OpenShiftProject: development
|
||||||
|
SourceImageRegistryProjectName: $(OpenShiftProject)
|
||||||
|
EnvironmentName: dev
|
||||||
|
IdentityApiHostName: identityapi.$(OpenShiftProject).svc
|
||||||
|
RedisHostname: redis.$(OpenShiftProject).svc
|
||||||
|
RabbitMqHostname: rabbitmq.$(OpenShiftProject).svc
|
||||||
|
IdentityPublicHostName: identity$(EnvironmentName)
|
||||||
|
IdentityUrlExternal: https://$(IdentityPublicHostName)
|
||||||
|
IdentityApiUrl: http://$(IdentityApiHostName):8080
|
||||||
|
jobs:
|
||||||
|
- job: Configuration_Deployment
|
||||||
|
displayName: 'Configuration Deployment'
|
||||||
|
pool:
|
||||||
|
vmImage: 'windows-latest'
|
||||||
|
steps:
|
||||||
|
- task: redhat.openshift-vsts.oc-setup-task.oc-setup@2
|
||||||
|
displayName: 'Setup Openshift CLI'
|
||||||
|
inputs:
|
||||||
|
openshiftService: $(OpenShiftServiceConnection)
|
||||||
|
- script: 'oc project $(OpenShiftProject)'
|
||||||
|
failOnStderr: true
|
||||||
|
displayName: 'Set OpenShift Project Context'
|
||||||
|
- script: 'oc process -f ./deploy/aro/openshift-templates/identityapi-deploy-template.yml -p IMAGE_REGISTRY_PROJECT_NAME=$(SourceImageRegistryProjectName) | oc apply -f-'
|
||||||
|
failOnStderr: true
|
||||||
|
displayName: 'Ensure Identity API OpenShift DeploymentConfig and Service'
|
@ -26,28 +26,39 @@ objects:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- env:
|
- env:
|
||||||
- name: IdentityUrlExternal
|
- name: SpaClient
|
||||||
value: ${IDENTITY_URL_EXTERNAL}
|
value: ${WEB_SPA_URL}
|
||||||
- name: IdentityUrl
|
- name: XamarinCallback
|
||||||
value: ${IDENTITY_URL}
|
value:
|
||||||
|
- name: MvcClient
|
||||||
|
value: ${WEB_MVC_URL}
|
||||||
|
- name: LocationApiClient
|
||||||
|
value: ${LOCATION_API_URL}
|
||||||
|
- name: MarketingApiClient
|
||||||
|
value: ${MARKETING_API_URL}
|
||||||
|
- name: BasketApiClient
|
||||||
|
value: ${BASKET_API_URL}
|
||||||
|
- name: OrderingApiClient
|
||||||
|
value: ${ORDERING_API_URL}
|
||||||
|
- name: MobileShoppingAggClient
|
||||||
|
value: ${MOBILE_SHOPPING_AGGREGATOR_URL}
|
||||||
|
- name: WebShoppingAggClient
|
||||||
|
value: ${WEB_SHOPPING_AGGREGATOR_URL}
|
||||||
|
- name: WebhooksApiClient
|
||||||
|
value: ${WEBHOOKS_API_URL}
|
||||||
|
- name: WebhooksWebClient
|
||||||
|
value: ${WEBHOOKS_WEB_CLIENT_URL}
|
||||||
- name: ConnectionString
|
- name: ConnectionString
|
||||||
value: ${REDIS_HOSTNAME}
|
valueFrom:
|
||||||
- name: EventBusConnection
|
secretKeyRef:
|
||||||
value: ${RABBITMQ_HOSTNAME}
|
key: ConnectionString
|
||||||
- name: PORT
|
name: identity-db-connection-secret
|
||||||
value: "8080"
|
|
||||||
- name: GRPC_PORT
|
|
||||||
value: "8081"
|
|
||||||
- name: PATH_BASE
|
|
||||||
value: /basket-api
|
|
||||||
image: docker-registry.default.svc:5000/${IMAGE_REGISTRY_PROJECT_NAME}/${APPLICATION_NAME}:latest
|
image: docker-registry.default.svc:5000/${IMAGE_REGISTRY_PROJECT_NAME}/${APPLICATION_NAME}:latest
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
name: ${APPLICATION_NAME}
|
name: ${APPLICATION_NAME}
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
- containerPort: 8081
|
|
||||||
protocol: TCP
|
|
||||||
resources: {}
|
resources: {}
|
||||||
terminationMessagePath: /dev/termination-log
|
terminationMessagePath: /dev/termination-log
|
||||||
terminationMessagePolicy: File
|
terminationMessagePolicy: File
|
||||||
@ -80,10 +91,6 @@ objects:
|
|||||||
port: 8080
|
port: 8080
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
targetPort: 8080
|
targetPort: 8080
|
||||||
- name: 8081-tcp-grpc
|
|
||||||
port: 8081
|
|
||||||
protocol: TCP
|
|
||||||
targetPort: 8081
|
|
||||||
selector:
|
selector:
|
||||||
app: ${APPLICATION_NAME}
|
app: ${APPLICATION_NAME}
|
||||||
deploymentconfig: ${APPLICATION_NAME}
|
deploymentconfig: ${APPLICATION_NAME}
|
||||||
@ -105,20 +112,44 @@ parameters:
|
|||||||
displayName: Template Name
|
displayName: Template Name
|
||||||
name: TEMPLATE_NAME
|
name: TEMPLATE_NAME
|
||||||
required: true
|
required: true
|
||||||
value: basketapi-deploy-template
|
value: identityapi-deploy-template
|
||||||
- description: The external URL of the Identity endpoint
|
- description: The cluster internal URL of the Web SPA endpoint
|
||||||
displayName: Identity URL External
|
displayName: Web SPA URL
|
||||||
name: IDENTITY_URL_EXTERNAL
|
name: WEB_SPA_URL
|
||||||
required: true
|
required: true
|
||||||
- description: The cluster internal URL of the Identity endpoint
|
- description: The cluster internal URL of the Web MVC endpoint
|
||||||
displayName: Identity URL
|
displayName: Web MVC URL
|
||||||
name: IDENTITY_URL
|
name: WEB_MVC_URL
|
||||||
required: true
|
required: true
|
||||||
- description: The hostname of the Redis service
|
- description: The cluster internal URL of the Location API endpoint
|
||||||
displayName: Redis Hostname
|
displayName: Location API URL
|
||||||
name: REDIS_HOSTNAME
|
name: LOCATION_API_URL
|
||||||
required: true
|
required: true
|
||||||
- description: The hostname of the RabbitMQ service
|
- description: The cluster internal URL of the Marketing API endpoint
|
||||||
displayName: RabbitMQ Hostname
|
displayName: Marketing API URL
|
||||||
name: RABBITMQ_HOSTNAME
|
name: MARKETING_API_URL
|
||||||
|
required: true
|
||||||
|
- description: The cluster internal URL of the Basket API endpoint
|
||||||
|
displayName: Basket API URL
|
||||||
|
name: BASKET_API_URL
|
||||||
|
required: true
|
||||||
|
- description: The cluster internal URL of the Ordering API endpoint
|
||||||
|
displayName: Ordering API URL
|
||||||
|
name: ORDERING_API_URL
|
||||||
|
required: true
|
||||||
|
- description: The cluster internal URL of the Mobile Shopping Aggregator endpoint
|
||||||
|
displayName: Mobile Shopping Aggregator URL
|
||||||
|
name: MOBILE_SHOPPING_AGGREGATOR_URL
|
||||||
|
required: true
|
||||||
|
- description: The cluster internal URL of the Web Shopping Aggregator endpoint
|
||||||
|
displayName: Web Shopping Aggregator URL
|
||||||
|
name: WEB_SHOPPING_AGGREGATOR_URL
|
||||||
|
required: true
|
||||||
|
- description: The cluster internal URL of the Webhooks API endpoint
|
||||||
|
displayName: Webhooks API URL
|
||||||
|
name: WEBHOOKS_API_URL
|
||||||
|
required: true
|
||||||
|
- description: The cluster internal URL of the Webhooks Client endpoint
|
||||||
|
displayName: Webhooks Client URL
|
||||||
|
name: WEBHOOKS_WEB_CLIENT_URL
|
||||||
required: true
|
required: true
|
Loading…
x
Reference in New Issue
Block a user