diff --git a/build/aro/webapp-build-artifacts.yml b/build/aro/webapp-build-artifacts.yml index 3bec3af71..3b97491ca 100644 --- a/build/aro/webapp-build-artifacts.yml +++ b/build/aro/webapp-build-artifacts.yml @@ -37,10 +37,17 @@ jobs: feedsToUse: config nugetConfigPath: src/NuGet.config - task: CopyFiles@2 + displayName: 'Copy OpenShift App Build Template' inputs: sourceFolder: '$(Build.SourcesDirectory)/build/aro' contents: 'openshift-app-build-template.yml' targetFolder: $(Build.ArtifactStagingDirectory) + - task: CopyFiles@2 + displayName: 'Copy OpenShift Web App Deploy Template' + inputs: + sourceFolder: '$(Build.SourcesDirectory)/deploy/aro' + contents: 'openshift-webapp-deploy-template.yml' + targetFolder: $(Build.ArtifactStagingDirectory) - task: PublishBuildArtifacts@1 displayName: 'Publish Artifact: drop' diff --git a/deploy/aro/basket-api/azure-pipelines.yml b/deploy/aro/basket-api/azure-pipelines.yml index 0c9d15419..b6d2e261b 100644 --- a/deploy/aro/basket-api/azure-pipelines.yml +++ b/deploy/aro/basket-api/azure-pipelines.yml @@ -1,3 +1,26 @@ +variables: + OpenShiftProject: development + AppName: basketapi + OpenShiftServiceConnection: 'OpenShift on ARO' +resources: + pipelines: + - pipeline: BasketApiBuild + source: Basket-API-Build stages: - - stage: test - dependsOn: test2 \ No newline at end of file + - stage: $(OpenShiftProject) + displayName: Development + jobs: + - job: Configuration + pool: + vmImage: 'windows-latest' + steps: + - task: redhat.openshift-vsts.oc-setup-task.oc-setup@2 + displayName: 'oc-setup ' + inputs: + openshiftService: $(OpenShiftServiceConnection) + - script: 'oc project $(OpenShiftProject)' + failOnStderr: true + displayName: 'Set Project Context' + - script: 'oc process -f $(Pipeline.Workspace)/openshift-webapp-deploy-template.yml -p APPLICATION_NAME=$(AppName) | oc apply -f-' + failOnStderr: true + displayName: 'Ensure OpenShift DeploymentConfig and Service' \ No newline at end of file