diff --git a/build/azure-devops/apigws/azure-pipelines.yml b/build/azure-devops/apigws/azure-pipelines.yml index 6fedf33a6..857355673 100644 --- a/build/azure-devops/apigws/azure-pipelines.yml +++ b/build/azure-devops/apigws/azure-pipelines.yml @@ -16,37 +16,14 @@ trigger: - src/ApiGateways/Mobile.Bff.Shopping/aggregator/* - src/ApiGateways/Web.Bff.Shopping/aggregator/* jobs: -- job: BuildLinux - pool: - vmImage: 'ubuntu-16.04' - steps: - - task: DockerCompose@0 - displayName: Compose build apigws - inputs: - dockerComposeCommand: 'build mobileshoppingapigw mobilemarketingapigw webshoppingapigw webmarketingapigw' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) - - task: DockerCompose@0 - displayName: Compose push apigws - inputs: - dockerComposeCommand: 'push mobileshoppingapigw mobilemarketingapigw webshoppingapigw webmarketingapigw' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) - - task: CopyFiles@2 - inputs: - sourceFolder: $(Build.SourcesDirectory)/k8s/helm - targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm - - task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm - artifactName: helm +- template: ../buildimages.yaml + parameters: + services: mobileshoppingapigw mobilemarketingapigw webshoppingapigw webmarketingapigw + registryEndpoint: $(registryEndpoint) + helmfrom: $(Build.SourcesDirectory)/k8s/helm + helmto: $(Build.ArtifactStagingDirectory)/k8s/helm +- template: ../multiarch.yaml + parameters: + image: ocelotapigw + branch: $(Build.SourceBranchName) + registryEndpoint: $(registryEndpoint) diff --git a/build/azure-devops/basket-api/azure-pipelines.yml b/build/azure-devops/basket-api/azure-pipelines.yml index 6d94c5918..730680ad9 100644 --- a/build/azure-devops/basket-api/azure-pipelines.yml +++ b/build/azure-devops/basket-api/azure-pipelines.yml @@ -1,5 +1,3 @@ -pool: - vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry trigger: @@ -12,34 +10,15 @@ trigger: - src/BuildingBlocks/* - src/Services/Basket/* - k8s/helm/basket-api/* -steps: -- task: DockerCompose@0 - displayName: Compose build basket - inputs: - dockerComposeCommand: 'build basket.api' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: DockerCompose@0 - displayName: Compose push basket - inputs: - dockerComposeCommand: 'push basket.api' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: CopyFiles@2 - inputs: - sourceFolder: $(Build.SourcesDirectory)/k8s/helm - targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm -- task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm - artifactName: helm +jobs: +- template: ../buildimages.yaml + parameters: + services: basket.api + registryEndpoint: $(registryEndpoint) + helmfrom: $(Build.SourcesDirectory)/k8s/helm + helmto: $(Build.ArtifactStagingDirectory)/k8s/helm +- template: ../multiarch.yaml + parameters: + image: basket.api + branch: $(Build.SourceBranchName) + registryEndpoint: $(registryEndpoint) diff --git a/build/azure-devops/buildimages.yaml b/build/azure-devops/buildimages.yaml new file mode 100644 index 000000000..fc2a41e72 --- /dev/null +++ b/build/azure-devops/buildimages.yaml @@ -0,0 +1,92 @@ +parameters: + services: '' + registryEndpoint: '' + helmfrom: '' + helmto: '' + +jobs: +- job: BuildContainersForPR_Linux + condition: eq('${{ variables['Build.Reason'] }}', 'PullRequest') + pool: + vmImage: 'ubuntu-16.04' + steps: + - bash: docker-compose build ${{ parameters.services }} + displayName: Create multiarch manifest + env: + TAG: ${{ variables['Build.SourceBranchName'] }} +- job: BuildContainersForPR_Windows + condition: eq('${{ variables['Build.Reason'] }}', 'PullRequest') + pool: + vmImage: 'windows-2019' + steps: + - bash: docker-compose build ${{ parameters.services }} + displayName: Create multiarch manifest + env: + TAG: ${{ variables['Build.SourceBranchName'] }} + PLATFORM: win + NODE_IMAGE: stefanscherer/node-windows:8.11 +- job: BuildLinux + condition: ne('${{ variables['Build.Reason'] }}', 'PullRequest') + pool: + vmImage: 'ubuntu-16.04' + steps: + - task: DockerCompose@0 + displayName: Compose build ${{ parameters.services }} + inputs: + dockerComposeCommand: 'build ${{ parameters.services }}' + containerregistrytype: Container Registry + dockerRegistryEndpoint: ${{ parameters.registryEndpoint }} + dockerComposeFile: docker-compose.yml + qualifyImageNames: true + projectName: "" + dockerComposeFileArgs: | + TAG=${{ variables['Build.SourceBranchName'] }} + - task: DockerCompose@0 + displayName: Compose push ${{ parameters.images }} + inputs: + dockerComposeCommand: 'push ${{ parameters.services }}' + containerregistrytype: Container Registry + dockerRegistryEndpoint: ${{ parameters.registryEndpoint }} + dockerComposeFile: docker-compose.yml + qualifyImageNames: true + projectName: "" + dockerComposeFileArgs: | + TAG=${{ variables['Build.SourceBranchName'] }} + - task: CopyFiles@2 + inputs: + sourceFolder: ${{ parameters.helmfrom }} + targetFolder: ${{ parameters.helmto }} + - task: PublishBuildArtifacts@1 + inputs: + pathtoPublish: ${{ parameters.helmto }} + artifactName: helm +- job: BuildWindows + condition: ne('${{ variables['Build.Reason'] }}', 'PullRequest') + pool: + vmImage: 'windows-2019' + steps: + - task: DockerCompose@0 + displayName: Compose build ${{ parameters.services }} + inputs: + dockerComposeCommand: 'build ${{ parameters.services }}' + containerregistrytype: Container Registry + dockerRegistryEndpoint: ${{ parameters.registryEndpoint }} + dockerComposeFile: docker-compose.yml + qualifyImageNames: true + projectName: "" + dockerComposeFileArgs: | + TAG=${{ variables['Build.SourceBranchName'] }} + PLATFORM=win + NODE_IMAGE=stefanscherer/node-windows:8.11 + - task: DockerCompose@0 + displayName: Compose push ${{ parameters.services }} + inputs: + dockerComposeCommand: 'push ${{ parameters.services }}' + containerregistrytype: Container Registry + dockerRegistryEndpoint: ${{ parameters.registryEndpoint }} + dockerComposeFile: docker-compose.yml + qualifyImageNames: true + projectName: "" + dockerComposeFileArgs: | + TAG=${{ variables['Build.SourceBranchName'] }} + PLATFORM=win diff --git a/build/azure-devops/catalog-api/azure-pipelines.yml b/build/azure-devops/catalog-api/azure-pipelines.yml index d277d4777..032d1dd2f 100644 --- a/build/azure-devops/catalog-api/azure-pipelines.yml +++ b/build/azure-devops/catalog-api/azure-pipelines.yml @@ -1,5 +1,3 @@ -pool: - vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry trigger: @@ -12,34 +10,15 @@ trigger: - src/BuildingBlocks/* - src/Services/Catalog/* - k8s/helm/catalog-api/* -steps: -- task: DockerCompose@0 - displayName: Compose build catalog - inputs: - dockerComposeCommand: 'build catalog.api' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: DockerCompose@0 - displayName: Compose push catalog - inputs: - dockerComposeCommand: 'push catalog.api' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: CopyFiles@2 - inputs: - sourceFolder: $(Build.SourcesDirectory)/k8s/helm - targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm -- task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm - artifactName: helm +jobs: +- template: ../buildimages.yaml + parameters: + services: catalog.api + registryEndpoint: $(registryEndpoint) + helmfrom: $(Build.SourcesDirectory)/k8s/helm + helmto: $(Build.ArtifactStagingDirectory)/k8s/helm +- template: ../multiarch.yaml + parameters: + image: catalog.api + branch: $(Build.SourceBranchName) + registryEndpoint: $(registryEndpoint) diff --git a/build/azure-devops/identity-api/azure-pipelines.yml b/build/azure-devops/identity-api/azure-pipelines.yml index 454c03d16..07891f32b 100644 --- a/build/azure-devops/identity-api/azure-pipelines.yml +++ b/build/azure-devops/identity-api/azure-pipelines.yml @@ -1,5 +1,3 @@ -pool: - vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry trigger: @@ -12,34 +10,15 @@ trigger: - src/BuildingBlocks/* - src/Services/Identity/* - k8s/helm/identity-api/* -steps: -- task: DockerCompose@0 - displayName: Compose build identity - inputs: - dockerComposeCommand: 'build identity.api' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: DockerCompose@0 - displayName: Compose push identity - inputs: - dockerComposeCommand: 'push identity.api' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: CopyFiles@2 - inputs: - sourceFolder: $(Build.SourcesDirectory)/k8s/helm - targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm -- task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm - artifactName: helm +jobs: +- template: ../buildimages.yaml + parameters: + services: identity.api + registryEndpoint: $(registryEndpoint) + helmfrom: $(Build.SourcesDirectory)/k8s/helm + helmto: $(Build.ArtifactStagingDirectory)/k8s/helm +- template: ../multiarch.yaml + parameters: + image: identity.api + branch: $(Build.SourceBranchName) + registryEndpoint: $(registryEndpoint) diff --git a/build/azure-devops/location-api/azure-pipelines.yml b/build/azure-devops/location-api/azure-pipelines.yml index ab3d31b3f..c926d71ac 100644 --- a/build/azure-devops/location-api/azure-pipelines.yml +++ b/build/azure-devops/location-api/azure-pipelines.yml @@ -1,5 +1,3 @@ -pool: - vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry trigger: @@ -11,35 +9,16 @@ trigger: include: - src/BuildingBlocks/* - src/Services/Location/* - - k8s/helm/locations-api/* -steps: -- task: DockerCompose@0 - displayName: Compose build locations - inputs: - dockerComposeCommand: 'build locations.api' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: DockerCompose@0 - displayName: Compose push locations - inputs: - dockerComposeCommand: 'push locations.api' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: CopyFiles@2 - inputs: - sourceFolder: $(Build.SourcesDirectory)/k8s/helm - targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm -- task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm - artifactName: helm + - k8s/helm/locations-api/* +jobs: +- template: ../buildimages.yaml + parameters: + services: locations.api + registryEndpoint: $(registryEndpoint) + helmfrom: $(Build.SourcesDirectory)/k8s/helm + helmto: $(Build.ArtifactStagingDirectory)/k8s/helm +- template: ../multiarch.yaml + parameters: + image: locations.api + branch: $(Build.SourceBranchName) + registryEndpoint: $(registryEndpoint) diff --git a/build/azure-devops/marketing-api/azure-pipelines.yml b/build/azure-devops/marketing-api/azure-pipelines.yml index 193a0cccf..c215ecb90 100644 --- a/build/azure-devops/marketing-api/azure-pipelines.yml +++ b/build/azure-devops/marketing-api/azure-pipelines.yml @@ -1,5 +1,3 @@ -pool: - vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry trigger: @@ -11,35 +9,16 @@ trigger: include: - src/BuildingBlocks/* - src/Services/Marketing/* - - k8s/helm/marketing-api/* -steps: -- task: DockerCompose@0 - displayName: Compose build marketing - inputs: - dockerComposeCommand: 'build marketing.api' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: DockerCompose@0 - displayName: Compose push marketing - inputs: - dockerComposeCommand: 'push marketing.api' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: CopyFiles@2 - inputs: - sourceFolder: $(Build.SourcesDirectory)/k8s/helm - targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm -- task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm - artifactName: helm + - k8s/helm/marketing-api/* +jobs: +- template: ../buildimages.yaml + parameters: + services: marketing.api + registryEndpoint: $(registryEndpoint) + helmfrom: $(Build.SourcesDirectory)/k8s/helm + helmto: $(Build.ArtifactStagingDirectory)/k8s/helm +- template: ../multiarch.yaml + parameters: + image: marketing.api + branch: $(Build.SourceBranchName) + registryEndpoint: $(registryEndpoint) diff --git a/build/azure-devops/mobile-shopping-agg/azure-pipelines.yml b/build/azure-devops/mobile-shopping-agg/azure-pipelines.yml index 6fb0018a1..749a589b2 100644 --- a/build/azure-devops/mobile-shopping-agg/azure-pipelines.yml +++ b/build/azure-devops/mobile-shopping-agg/azure-pipelines.yml @@ -1,5 +1,3 @@ -pool: - vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry trigger: @@ -10,35 +8,17 @@ trigger: paths: include: - src/ApiGateways/Mobile.Bff.Shopping/aggregator/* - - k8s/helm/mobileshoppingagg/* -steps: -- task: DockerCompose@0 - displayName: Compose build mobileshoppingagg - inputs: - dockerComposeCommand: 'build mobileshoppingagg' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: DockerCompose@0 - displayName: Compose push mobileshoppingagg - inputs: - dockerComposeCommand: 'push mobileshoppingagg' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: CopyFiles@2 - inputs: - sourceFolder: $(Build.SourcesDirectory)/k8s/helm - targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm -- task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm - artifactName: helm + - k8s/helm/mobileshoppingagg/* +jobs: +- template: ../buildimages.yaml + parameters: + services: mobileshoppingagg + registryEndpoint: $(registryEndpoint) + helmfrom: $(Build.SourcesDirectory)/k8s/helm + helmto: $(Build.ArtifactStagingDirectory)/k8s/helm +- template: ../multiarch.yaml + parameters: + image: mobileshoppingagg + branch: $(Build.SourceBranchName) + registryEndpoint: $(registryEndpoint) + diff --git a/build/azure-devops/multiarch.yaml b/build/azure-devops/multiarch.yaml new file mode 100644 index 000000000..78a2b92be --- /dev/null +++ b/build/azure-devops/multiarch.yaml @@ -0,0 +1,30 @@ +parameters: + image: '' + branch: '' + registry: 'eshop' + registryEndpoint: '' + +jobs: +- job: manifest + condition: and(succeeded(),ne('${{ variables['Build.Reason'] }}', 'PullRequest')) + dependsOn: + - BuildWindows + - BuildLinux + pool: + vmImage: 'Ubuntu 16.04' + steps: + - task: Docker@1 + displayName: Docker Login + inputs: + command: login + containerregistrytype: 'Container Registry' + dockerRegistryEndpoint: ${{ parameters.registryEndpoint }} + - bash: | + mkdir -p ~/.docker + sed '$ s/.$//' $DOCKER_CONFIG/config.json > ~/.docker/config.json + echo ',"experimental": "enabled" }' >> ~/.docker/config.json + docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:${{ parameters.branch }} ${{ parameters.registry }}/${{ parameters.image }}:linux-${{ parameters.branch }} ${{ parameters.registry }}/${{ parameters.image }}:win-${{ parameters.branch }} + docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:latest ${{ parameters.registry }}/${{ parameters.image }}:linux-latest ${{ parameters.registry }}/${{ parameters.image }}:win-latest + docker --config ~/.docker manifest push ${{ parameters.registry }}/${{ parameters.image }}:${{ parameters.branch }} + docker --config ~/.docker manifest push ${{ parameters.registry }}/${{ parameters.image }}:latest + displayName: Create multiarch manifest diff --git a/build/azure-devops/ordering-api/azure-pipelines.yml b/build/azure-devops/ordering-api/azure-pipelines.yml index ef0b17a32..4d688c7dc 100644 --- a/build/azure-devops/ordering-api/azure-pipelines.yml +++ b/build/azure-devops/ordering-api/azure-pipelines.yml @@ -1,5 +1,3 @@ -pool: - vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry trigger: @@ -14,34 +12,15 @@ trigger: - k8s/helm/ordering-api/* - k8s/helm/ordering-backgroundtasks/* - k8s/helm/ordering-signalrhub/* -steps: -- task: DockerCompose@0 - displayName: Compose build ordering - inputs: - dockerComposeCommand: 'build ordering.api ordering.backgroundtasks ordering.signalrhub' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: DockerCompose@0 - displayName: Compose push ordering - inputs: - dockerComposeCommand: 'push ordering.api ordering.backgroundtasks ordering.signalrhub' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: CopyFiles@2 - inputs: - sourceFolder: $(Build.SourcesDirectory)/k8s/helm - targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm -- task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm - artifactName: helm +jobs: +- template: ../buildimages.yaml + parameters: + services: ordering.api + registryEndpoint: $(registryEndpoint) + helmfrom: $(Build.SourcesDirectory)/k8s/helm + helmto: $(Build.ArtifactStagingDirectory)/k8s/helm +- template: ../multiarch.yaml + parameters: + image: ordering.api + branch: $(Build.SourceBranchName) + registryEndpoint: $(registryEndpoint) \ No newline at end of file diff --git a/build/azure-devops/payment-api/azure-pipelines.yml b/build/azure-devops/payment-api/azure-pipelines.yml index 8518c8841..0fed2db92 100644 --- a/build/azure-devops/payment-api/azure-pipelines.yml +++ b/build/azure-devops/payment-api/azure-pipelines.yml @@ -1,5 +1,3 @@ -pool: - vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry trigger: @@ -12,34 +10,15 @@ trigger: - src/BuildingBlocks/* - src/Services/Payment/* - k8s/helm/payment-api/* -steps: -- task: DockerCompose@0 - displayName: Compose build payment - inputs: - dockerComposeCommand: 'build payment.api' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: DockerCompose@0 - displayName: Compose push payment - inputs: - dockerComposeCommand: 'push payment.api' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: CopyFiles@2 - inputs: - sourceFolder: $(Build.SourcesDirectory)/k8s/helm - targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm -- task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm - artifactName: helm +jobs: +- template: ../buildimages.yaml + parameters: + services: payment.api + registryEndpoint: $(registryEndpoint) + helmfrom: $(Build.SourcesDirectory)/k8s/helm + helmto: $(Build.ArtifactStagingDirectory)/k8s/helm +- template: ../multiarch.yaml + parameters: + image: payment.api + branch: $(Build.SourceBranchName) + registryEndpoint: $(registryEndpoint) \ No newline at end of file diff --git a/build/azure-devops/web-shopping-agg/azure-pipelines.yml b/build/azure-devops/web-shopping-agg/azure-pipelines.yml index 70a4df950..9e907d2ce 100644 --- a/build/azure-devops/web-shopping-agg/azure-pipelines.yml +++ b/build/azure-devops/web-shopping-agg/azure-pipelines.yml @@ -1,5 +1,3 @@ -pool: - vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry trigger: @@ -10,35 +8,16 @@ trigger: paths: include: - src/ApiGateways/Web.Bff.Shopping/aggregator/* - - k8s/helm/webshoppingagg/* -steps: -- task: DockerCompose@0 - displayName: Compose build webshoppingagg - inputs: - dockerComposeCommand: 'build webshoppingagg' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: DockerCompose@0 - displayName: Compose push webshoppingagg - inputs: - dockerComposeCommand: 'push webshoppingagg' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: CopyFiles@2 - inputs: - sourceFolder: $(Build.SourcesDirectory)/k8s/helm - targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm -- task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm - artifactName: helm + - k8s/helm/webshoppingagg/* +jobs: +- template: ../buildimages.yaml + parameters: + services: webshoppingagg + registryEndpoint: $(registryEndpoint) + helmfrom: $(Build.SourcesDirectory)/k8s/helm + helmto: $(Build.ArtifactStagingDirectory)/k8s/helm +- template: ../multiarch.yaml + parameters: + image: webshoppingagg + branch: $(Build.SourceBranchName) + registryEndpoint: $(registryEndpoint) \ No newline at end of file diff --git a/build/azure-devops/webhooks-api/azure-pipelines.yml b/build/azure-devops/webhooks-api/azure-pipelines.yml index b48948111..d7fc14ef6 100644 --- a/build/azure-devops/webhooks-api/azure-pipelines.yml +++ b/build/azure-devops/webhooks-api/azure-pipelines.yml @@ -1,5 +1,3 @@ -pool: - vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry trigger: @@ -11,35 +9,16 @@ trigger: include: - src/BuildingBlocks/* - src/Services/Webhooks/* - - k8s/helm/webhooks-api/* -steps: -- task: DockerCompose@0 - displayName: Compose build webhooks - inputs: - dockerComposeCommand: 'build webhooks.api' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: DockerCompose@0 - displayName: Compose push webhooks - inputs: - dockerComposeCommand: 'push webhooks.api' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: CopyFiles@2 - inputs: - sourceFolder: $(Build.SourcesDirectory)/k8s/helm - targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm -- task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm - artifactName: helm + - k8s/helm/webhooks-api/* +jobs: +- template: ../buildimages.yaml + parameters: + services: webhooks.api + registryEndpoint: $(registryEndpoint) + helmfrom: $(Build.SourcesDirectory)/k8s/helm + helmto: $(Build.ArtifactStagingDirectory)/k8s/helm +- template: ../multiarch.yaml + parameters: + image: webhooks.api + branch: $(Build.SourceBranchName) + registryEndpoint: $(registryEndpoint) \ No newline at end of file diff --git a/build/azure-devops/webhooks-client/azure-pipelines.yml b/build/azure-devops/webhooks-client/azure-pipelines.yml index 71e3bbe16..76b3b63c9 100644 --- a/build/azure-devops/webhooks-client/azure-pipelines.yml +++ b/build/azure-devops/webhooks-client/azure-pipelines.yml @@ -1,5 +1,3 @@ -pool: - vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry trigger: @@ -11,35 +9,16 @@ trigger: include: - src/BuildingBlocks/* - src/Web/WebhookClient/* - - k8s/helm/webhooks-web/* -steps: -- task: DockerCompose@0 - displayName: Compose build webhooks.client - inputs: - dockerComposeCommand: 'build webhooks.client' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: DockerCompose@0 - displayName: Compose push webhooks.client - inputs: - dockerComposeCommand: 'push webhooks.client' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: CopyFiles@2 - inputs: - sourceFolder: $(Build.SourcesDirectory)/k8s/helm - targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm -- task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm - artifactName: helm + - k8s/helm/webhooks-web/* +jobs: +- template: ../buildimages.yaml + parameters: + services: webhooks.client + registryEndpoint: $(registryEndpoint) + helmfrom: $(Build.SourcesDirectory)/k8s/helm + helmto: $(Build.ArtifactStagingDirectory)/k8s/helm +- template: ../multiarch.yaml + parameters: + image: webhooks.client + branch: $(Build.SourceBranchName) + registryEndpoint: $(registryEndpoint) \ No newline at end of file diff --git a/build/azure-devops/webmvc/azure-pipelines.yml b/build/azure-devops/webmvc/azure-pipelines.yml index 66b8518fa..fc9ba2856 100644 --- a/build/azure-devops/webmvc/azure-pipelines.yml +++ b/build/azure-devops/webmvc/azure-pipelines.yml @@ -1,5 +1,3 @@ -pool: - vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry trigger: @@ -11,35 +9,14 @@ trigger: include: - src/BuildingBlocks/* - src/Web/WebMVC/* - - k8s/helm/webmvc/* -steps: -- task: DockerCompose@0 - displayName: Compose build webmvc - inputs: - dockerComposeCommand: 'build webmvc' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: DockerCompose@0 - displayName: Compose push webmvc - inputs: - dockerComposeCommand: 'push webmvc' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: CopyFiles@2 - inputs: - sourceFolder: $(Build.SourcesDirectory)/k8s/helm - targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm -- task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm - artifactName: helm + - k8s/helm/webmvc/* +jobs: +- template: ../buildimages.yaml + parameters: + services: webmvc + registryEndpoint: $(registryEndpoint) +- template: ../multiarch.yaml + parameters: + image: webmvc + branch: $(Build.SourceBranchName) + registryEndpoint: $(registryEndpoint) \ No newline at end of file diff --git a/build/azure-devops/webspa/azure-pipelines.yml b/build/azure-devops/webspa/azure-pipelines.yml index eee8cd25d..c8fc28e8b 100644 --- a/build/azure-devops/webspa/azure-pipelines.yml +++ b/build/azure-devops/webspa/azure-pipelines.yml @@ -1,5 +1,3 @@ -pool: - vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry trigger: @@ -12,34 +10,13 @@ trigger: - src/BuildingBlocks/* - src/Web/WebSPA/* - k8s/helm/webspa/* -steps: -- task: DockerCompose@0 - displayName: Compose build webspa - inputs: - dockerComposeCommand: 'build webspa' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: DockerCompose@0 - displayName: Compose push webspa - inputs: - dockerComposeCommand: 'push webspa' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: CopyFiles@2 - inputs: - sourceFolder: $(Build.SourcesDirectory)/k8s/helm - targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm -- task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm - artifactName: helm +jobs: +- template: ../buildimages.yaml + parameters: + services: webspa + registryEndpoint: $(registryEndpoint) +- template: ../multiarch.yaml + parameters: + image: webspa + branch: $(Build.SourceBranchName) + registryEndpoint: $(registryEndpoint) \ No newline at end of file diff --git a/build/azure-devops/webstatus/azure-pipelines.yml b/build/azure-devops/webstatus/azure-pipelines.yml index 311c457e2..c12347c62 100644 --- a/build/azure-devops/webstatus/azure-pipelines.yml +++ b/build/azure-devops/webstatus/azure-pipelines.yml @@ -1,5 +1,3 @@ -pool: - vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry trigger: @@ -11,35 +9,14 @@ trigger: include: - src/BuildingBlocks/* - src/Web/WebStatus/* - - k8s/helm/webstatus/* -steps: -- task: DockerCompose@0 - displayName: Compose build webstatus - inputs: - dockerComposeCommand: 'build webstatus' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: DockerCompose@0 - displayName: Compose push webstatus - inputs: - dockerComposeCommand: 'push webstatus' - containerregistrytype: Container Registry - dockerRegistryEndpoint: $(registryEndpoint) - dockerComposeFile: docker-compose.yml - qualifyImageNames: true - projectName: "" - dockerComposeFileArgs: | - TAG=$(Build.SourceBranchName) -- task: CopyFiles@2 - inputs: - sourceFolder: $(Build.SourcesDirectory)/k8s/helm - targetFolder: $(Build.ArtifactStagingDirectory)/k8s/helm -- task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm - artifactName: helm + - k8s/helm/webstatus/* +jobs: +- template: ../buildimages.yaml + parameters: + services: webstatus + registryEndpoint: $(registryEndpoint) +- template: ../multiarch.yaml + parameters: + image: webstatus + branch: $(Build.SourceBranchName) + registryEndpoint: $(registryEndpoint) \ No newline at end of file diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 9ac365d1e..563d712c1 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -111,6 +111,7 @@ services: - OrchestratorType=${ORCHESTRATOR_TYPE} - UseLoadTest=${USE_LOADTEST:-False} - Serilog__MinimumLevel__Override__Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ=Verbose + - Serilog__MinimumLevel__Override__Ordering.API=Verbose ports: - "5102:80" # Important: In a production environment your should remove the external port (5102) kept here for microservice debugging purposes. # The API Gateway redirects and access through the internal port (80). diff --git a/docker-compose.yml b/docker-compose.yml index 8c523e122..8950bdfe2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -214,6 +214,8 @@ services: build: context: . dockerfile: src/Web/WebSPA/Dockerfile + args: + - NODE_IMAGE=${NODE_IMAGE:-node:8.11} # depends_on: # - webshoppingagg # - webshoppingapigw diff --git a/docs/Containerized Docker Application Lifecycle with Microsoft Platform and Tools (eBook)-v1.1.pdf b/docs/Containerized Docker Application Lifecycle with Microsoft Platform and Tools (eBook)-v1.1.pdf deleted file mode 100644 index 118c4509e..000000000 Binary files a/docs/Containerized Docker Application Lifecycle with Microsoft Platform and Tools (eBook)-v1.1.pdf and /dev/null differ diff --git a/docs/Containerized Docker Application Lifecycle with Microsoft Platform and Tools (eBook).pdf b/docs/Containerized Docker Application Lifecycle with Microsoft Platform and Tools (eBook).pdf index c78970145..118c4509e 100644 Binary files a/docs/Containerized Docker Application Lifecycle with Microsoft Platform and Tools (eBook).pdf and b/docs/Containerized Docker Application Lifecycle with Microsoft Platform and Tools (eBook).pdf differ diff --git a/docs/MicrosoftAzure_StartGuide_Developers-old.pdf b/docs/MicrosoftAzure_StartGuide_Developers-old.pdf new file mode 100644 index 000000000..b843ec51c Binary files /dev/null and b/docs/MicrosoftAzure_StartGuide_Developers-old.pdf differ diff --git a/docs/MicrosoftAzure_StartGuide_Developers.pdf b/docs/MicrosoftAzure_StartGuide_Developers.pdf index b843ec51c..8d80c6d62 100644 Binary files a/docs/MicrosoftAzure_StartGuide_Developers.pdf and b/docs/MicrosoftAzure_StartGuide_Developers.pdf differ diff --git a/img/eShopScreen.png b/img/eShopScreen.png new file mode 100644 index 000000000..a21df7c53 Binary files /dev/null and b/img/eShopScreen.png differ diff --git a/img/ebook_arch_dev_microservices_containers_cover.png b/img/ebook_arch_dev_microservices_containers_cover.png index ae2583618..678539964 100644 Binary files a/img/ebook_arch_dev_microservices_containers_cover.png and b/img/ebook_arch_dev_microservices_containers_cover.png differ diff --git a/img/ebook_containers_lifecycle.png b/img/ebook_containers_lifecycle.png index 1ab5e6a4a..650703ae0 100644 Binary files a/img/ebook_containers_lifecycle.png and b/img/ebook_containers_lifecycle.png differ diff --git a/k8s/helm/app.yaml b/k8s/helm/app.yaml index 6b1c36922..91e829b27 100644 --- a/k8s/helm/app.yaml +++ b/k8s/helm/app.yaml @@ -29,7 +29,7 @@ app: # app global settings catalog: catalog # service name for catalog api ordering: ordering # service name for ordering api orderingbackgroundtasks: orderingbackgroundtasks # service name for orderingbackgroundtasks - orderingsignalrhub: ordering-signalrhub # service name for orderingsignalrhub + orderingsignalrhub: ordering-signalrhub # service name for orderingsignalrhub identity: identity # service name for identity api mvc: webmvc # service name for web mvc spa: webspa # service name for web spa diff --git a/k8s/helm/basket-api/templates/configmap.yaml b/k8s/helm/basket-api/templates/configmap.yaml index c851de359..911318fc1 100644 --- a/k8s/helm/basket-api/templates/configmap.yaml +++ b/k8s/helm/basket-api/templates/configmap.yaml @@ -15,5 +15,5 @@ data: urls__IdentityUrl: http://{{ $identity }} basket__EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" all__EventBusConnection: {{ .Values.inf.eventbus.constr }} - all__InstrumentationKey: {{ .Values.inf.appinsights.key }} + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" \ No newline at end of file diff --git a/k8s/helm/catalog-api/templates/configmap.yaml b/k8s/helm/catalog-api/templates/configmap.yaml index 95d8f2f9b..902b65f5c 100644 --- a/k8s/helm/catalog-api/templates/configmap.yaml +++ b/k8s/helm/catalog-api/templates/configmap.yaml @@ -16,5 +16,5 @@ data: catalog__PicBaseUrl: http://{{ $webshoppingapigw }}/api/v1/c/catalog/items/[0]/pic/ catalog__AzureStorageEnabled: "{{ .Values.inf.misc.useAzureStorage }}" all__EventBusConnection: {{ .Values.inf.eventbus.constr }} - all__InstrumentationKey: {{ .Values.inf.appinsights.key }} + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" \ No newline at end of file diff --git a/k8s/helm/deploy-all.ps1 b/k8s/helm/deploy-all.ps1 index a30fc1ee6..3cf6936bc 100644 --- a/k8s/helm/deploy-all.ps1 +++ b/k8s/helm/deploy-all.ps1 @@ -67,7 +67,7 @@ $charts = ("eshop-common", "apigwmm", "apigwms", "apigwwm", "apigwws", "basket-a if ($deployInfrastructure) { foreach ($infra in $infras) { Write-Host "Installing infrastructure: $infra" -ForegroundColor Green - helm install --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set ingress.hosts={$dns} --name="$appName-$infra" $infra + helm install --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set "ingress.hosts={$dns}" --name="$appName-$infra" $infra } } else { @@ -78,11 +78,11 @@ if ($deployCharts) { foreach ($chart in $charts) { Write-Host "Installing: $chart" -ForegroundColor Green if ($useCustomRegistry) { - helm install --set inf.registry.server=$registry --set inf.registry.login=$dockerUser --set inf.registry.pwd=$dockerPassword --set inf.registry.secretName=eshop-docker-scret --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set ingress.hosts={$dns} --set image.tag=$imageTag --set image.pullPolicy=Always --name="$appName-$chart" $chart + helm install --set inf.registry.server=$registry --set inf.registry.login=$dockerUser --set inf.registry.pwd=$dockerPassword --set inf.registry.secretName=eshop-docker-scret --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set "ingress.hosts={$dns}" --set image.tag=$imageTag --set image.pullPolicy=Always --name="$appName-$chart" $chart } else { if ($chart -ne "eshop-common") { # eshop-common is ignored when no secret must be deployed - helm install --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set ingress.hosts={$dns} --set image.tag=$imageTag --set image.pullPolicy=Always --name="$appName-$chart" $chart + helm install --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set "ingress.hosts={$dns}" --set image.tag=$imageTag --set image.pullPolicy=Always --name="$appName-$chart" $chart } } } diff --git a/k8s/helm/identity-api/templates/configmap.yaml b/k8s/helm/identity-api/templates/configmap.yaml index 67c0f21cb..264ceb745 100644 --- a/k8s/helm/identity-api/templates/configmap.yaml +++ b/k8s/helm/identity-api/templates/configmap.yaml @@ -24,7 +24,7 @@ metadata: data: identity__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.identity.db }};User Id={{ .Values.inf.sql.common.user }};Password={{ .Values.inf.sql.common.pwd }}; identity__keystore: {{ .Values.inf.redis.keystore.constr }} - all__InstrumentationKey: {{ .Values.inf.appinsights.key }} + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" mvc_e: http://{{ $mvc_url }} spa_e: http://{{ $spa_url }} locations_e: http://{{ $locations_url }} diff --git a/k8s/helm/inf.yaml b/k8s/helm/inf.yaml index b6ff102b0..ee4d1fde6 100644 --- a/k8s/helm/inf.yaml +++ b/k8s/helm/inf.yaml @@ -1,4 +1,4 @@ -# This heml values file defines all infrastructure used by eShopOnContainers. +# This helm values file defines all infrastructure used by eShopOnContainers. # It is used on all charts, so ** MUST BE INCLUDED ** on every deployment inf: @@ -15,11 +15,11 @@ inf: identity: db: IdentityDb # Ordering API SQL db name marketing: - db: MarketingDb # Marketing API SQL db name + db: MarketingDb # Marketing API SQL db name webhooks: - db: WebhooksDb # Webhooks DB + db: WebhooksDb # Webhooks DB mongo: -# host: my-nosql-data # Uncomment to use specify custom mongo host. By default nosql-data is used +# host: my-nosql-data # Uncomment to use specify custom mongo host. By default nosql-data is used locations: database: LocationsDb marketing: diff --git a/k8s/helm/locations-api/templates/configmap.yaml b/k8s/helm/locations-api/templates/configmap.yaml index 84881087d..c5d752509 100644 --- a/k8s/helm/locations-api/templates/configmap.yaml +++ b/k8s/helm/locations-api/templates/configmap.yaml @@ -13,7 +13,7 @@ metadata: heritage: {{ .Release.Service }} data: all__EventBusConnection: {{ .Values.inf.eventbus.constr }} - all__InstrumentationKey: {{ .Values.inf.appinsights.key }} + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" internalurls__IdentityUrl: http://{{ .Values.app.svc.identity }} diff --git a/k8s/helm/marketing-api/templates/configmap.yaml b/k8s/helm/marketing-api/templates/configmap.yaml index 45f21e57d..123b21adf 100644 --- a/k8s/helm/marketing-api/templates/configmap.yaml +++ b/k8s/helm/marketing-api/templates/configmap.yaml @@ -15,7 +15,7 @@ metadata: heritage: {{ .Release.Service }} data: all__EventBusConnection: {{ .Values.inf.eventbus.constr }} - all__InstrumentationKey: {{ .Values.inf.appinsights.key }} + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" internalurls__IdentityUrl: http://{{ .Values.app.svc.identity }} diff --git a/k8s/helm/mobileshoppingagg/templates/configmap.yaml b/k8s/helm/mobileshoppingagg/templates/configmap.yaml index d3e935409..6cad653a9 100644 --- a/k8s/helm/mobileshoppingagg/templates/configmap.yaml +++ b/k8s/helm/mobileshoppingagg/templates/configmap.yaml @@ -10,7 +10,7 @@ metadata: release: {{ .Release.Name }} heritage: {{ .Release.Service }} data: - all__InstrumentationKey: {{ .Values.inf.appinsights.key }} + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" mobileshoppingagg__keystore: {{ .Values.inf.redis.keystore.constr }} internalurls__basket: http://{{ .Values.app.svc.basket }} diff --git a/k8s/helm/ordering-api/templates/configmap.yaml b/k8s/helm/ordering-api/templates/configmap.yaml index de4cb2d7a..efc829cda 100644 --- a/k8s/helm/ordering-api/templates/configmap.yaml +++ b/k8s/helm/ordering-api/templates/configmap.yaml @@ -16,5 +16,5 @@ data: ordering__EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" urls__IdentityUrl: http://{{ $identity }} all__EventBusConnection: {{ .Values.inf.eventbus.constr }} - all__InstrumentationKey: {{ .Values.inf.appinsights.key }} + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" \ No newline at end of file diff --git a/k8s/helm/ordering-backgroundtasks/templates/configmap.yaml b/k8s/helm/ordering-backgroundtasks/templates/configmap.yaml index 23041d4ac..7ed4a0e8e 100644 --- a/k8s/helm/ordering-backgroundtasks/templates/configmap.yaml +++ b/k8s/helm/ordering-backgroundtasks/templates/configmap.yaml @@ -15,7 +15,7 @@ data: ordering__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.ordering.db }};User Id={{ .Values.inf.sql.common.user }};Password={{ .Values.inf.sql.common.pwd }}; ordering__EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" all__EventBusConnection: {{ .Values.inf.eventbus.constr }} - all__InstrumentationKey: {{ .Values.inf.appinsights.key }} + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" graceperiodmanager__CheckUpdateTime: "{{ .Values.cfg.checkUpdateTime }}" graceperiodmanager__GracePeriodTime: "{{ .Values.cfg.gracePeriodTime }}" \ No newline at end of file diff --git a/k8s/helm/ordering-signalrhub/templates/configmap.yaml b/k8s/helm/ordering-signalrhub/templates/configmap.yaml index addcf7e9d..bab4ebc94 100644 --- a/k8s/helm/ordering-signalrhub/templates/configmap.yaml +++ b/k8s/helm/ordering-signalrhub/templates/configmap.yaml @@ -12,7 +12,7 @@ metadata: heritage: {{ .Release.Service }} data: all__EventBusConnection: {{ .Values.inf.eventbus.constr }} - all__InstrumentationKey: {{ .Values.inf.appinsights.key }} + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" signalr__StoreConnectionString: {{ .Values.inf.redis.keystore.constr }} urls__IdentityUrl: http://{{ $identity }} \ No newline at end of file diff --git a/k8s/helm/payment-api/templates/configmap.yaml b/k8s/helm/payment-api/templates/configmap.yaml index 6717705b5..3bdb95c0f 100644 --- a/k8s/helm/payment-api/templates/configmap.yaml +++ b/k8s/helm/payment-api/templates/configmap.yaml @@ -11,5 +11,5 @@ metadata: heritage: {{ .Release.Service }} data: all__EventBusConnection: {{ .Values.inf.eventbus.constr }} - all__InstrumentationKey: {{ .Values.inf.appinsights.key }} + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" \ No newline at end of file diff --git a/k8s/helm/webhooks-api/templates/configmap.yaml b/k8s/helm/webhooks-api/templates/configmap.yaml index a18126858..ba1f21c42 100644 --- a/k8s/helm/webhooks-api/templates/configmap.yaml +++ b/k8s/helm/webhooks-api/templates/configmap.yaml @@ -16,5 +16,5 @@ data: urls__IdentityUrl: http://{{ $identity }} urls__IdentityUrlExternal: http://{{ $identity }} all__EventBusConnection: {{ .Values.inf.eventbus.constr }} - all__InstrumentationKey: {{ .Values.inf.appinsights.key }} + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" \ No newline at end of file diff --git a/k8s/helm/webmvc/templates/configmap.yaml b/k8s/helm/webmvc/templates/configmap.yaml index 55c4e6b33..3e1e10cd1 100644 --- a/k8s/helm/webmvc/templates/configmap.yaml +++ b/k8s/helm/webmvc/templates/configmap.yaml @@ -14,7 +14,7 @@ metadata: release: {{ .Release.Name }} heritage: {{ .Release.Service }} data: - all__InstrumentationKey: {{ .Values.inf.appinsights.key }} + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" webmvc__keystore: {{ .Values.inf.redis.keystore.constr }} diff --git a/k8s/helm/webshoppingagg/templates/configmap.yaml b/k8s/helm/webshoppingagg/templates/configmap.yaml index b4d3da041..efa3c7eaf 100644 --- a/k8s/helm/webshoppingagg/templates/configmap.yaml +++ b/k8s/helm/webshoppingagg/templates/configmap.yaml @@ -10,7 +10,7 @@ metadata: release: {{ .Release.Name }} heritage: {{ .Release.Service }} data: - all__InstrumentationKey: {{ .Values.inf.appinsights.key }} + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" webshoppingagg__keystore: {{ .Values.inf.redis.keystore.constr }} internalurls__basket: http://{{ .Values.app.svc.basket }} diff --git a/k8s/helm/webspa/templates/configmap.yaml b/k8s/helm/webspa/templates/configmap.yaml index 7d4651a31..ea745436b 100644 --- a/k8s/helm/webspa/templates/configmap.yaml +++ b/k8s/helm/webspa/templates/configmap.yaml @@ -16,7 +16,7 @@ metadata: release: {{ .Release.Name }} heritage: {{ .Release.Service }} data: - all__InstrumentationKey: {{ .Values.inf.appinsights.key }} + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" webspa__keystore: {{ .Values.inf.redis.keystore.constr }} internalurls__apigwws: http://{{ .Values.app.svc.webshoppingapigw }} diff --git a/k8s/helm/webstatus/templates/configmap.yaml b/k8s/helm/webstatus/templates/configmap.yaml index 3f32d7adc..4a1b612f2 100644 --- a/k8s/helm/webstatus/templates/configmap.yaml +++ b/k8s/helm/webstatus/templates/configmap.yaml @@ -15,7 +15,7 @@ metadata: release: {{ .Release.Name }} heritage: {{ .Release.Service }} data: - all__InstrumentationKey: {{ .Values.inf.appinsights.key }} + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" webstatus__keystore: {{ .Values.inf.redis.keystore.constr }} diff --git a/readme/readme.md b/readme/readme.md index b6280f56d..3515f165f 100644 --- a/readme/readme.md +++ b/readme/readme.md @@ -7,7 +7,7 @@ This file contains links to the documentation of the project. ## Documentation included in files * [Branch Guide](../branch-guide.md): List of branches used and their purpose. -* [vsts-docs folder](../vsts-docs/readme.md): Information about how to setup a CI/CD procedure using VSTS +* [vsts-docs folder](../vsts-docs/readme.md): Information about how to setup a CI/CD procedure using Azure DevOps * [Kubernetes](../k8s/readme.md): Information about how to deploy eShopOnContainers in a kubernetes cluster, and how to setup a CI/CD for k8s using VSTS * [deploy](../deploy/readme.md): Information about how deploy Azure resources using the Azure CLI 2.0. * [.env file](./README.ENV.md): What is the `.env` file and how to use it to configure eShopOnContainers to use external resources (like Azure) diff --git a/src/ApiGateways/ApiGw-Base/Dockerfile b/src/ApiGateways/ApiGw-Base/Dockerfile index f4751f2d1..9dc86a846 100644 --- a/src/ApiGateways/ApiGw-Base/Dockerfile +++ b/src/ApiGateways/ApiGw-Base/Dockerfile @@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/ COPY src/Services/*/*/*.csproj /src/csproj-files/ COPY src/Web/*/*.csproj /src/csproj-files/ -ARG RUN=pwd -RUN ${RUN} - COPY . . WORKDIR /src/src/ApiGateways/ApiGw-Base/ RUN dotnet publish -c Release -o /app diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Controllers/BasketController.cs b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Controllers/BasketController.cs index 978b1858c..a2c0d1fea 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Controllers/BasketController.cs +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Controllers/BasketController.cs @@ -36,15 +36,9 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Controllers } // Retrieve the current basket - var currentBasket = await _basket.GetByIdAsync(data.BuyerId); - - if (currentBasket == null) - { - currentBasket = new BasketData(data.BuyerId); - } + var basket = await _basket.GetByIdAsync(data.BuyerId) ?? new BasketData(data.BuyerId); var catalogItems = await _catalog.GetCatalogItemsAsync(data.Items.Select(x => x.ProductId)); - var newBasket = new BasketData(data.BuyerId); foreach (var bitem in data.Items) { @@ -54,7 +48,7 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Controllers return BadRequest($"Basket refers to a non-existing catalog item ({bitem.ProductId})"); } - newBasket.Items.Add(new BasketDataItem() + basket.Items.Add(new BasketDataItem() { Id = bitem.Id, ProductId = catalogItem.Id.ToString(), @@ -65,9 +59,9 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Controllers }); } - await _basket.UpdateAsync(newBasket); + await _basket.UpdateAsync(basket); - return newBasket; + return basket; } [HttpPut] diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile index d29c73b3e..9b03eccbd 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile @@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/ COPY src/Services/*/*/*.csproj /src/csproj-files/ COPY src/Web/*/*.csproj /src/csproj-files/ -ARG RUN=pwd -RUN ${RUN} - COPY . . WORKDIR /src/src/ApiGateways/Mobile.Bff.Shopping/aggregator RUN dotnet publish -c Release -o /app diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Controllers/BasketController.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Controllers/BasketController.cs index 6745ffa02..00cf506a4 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Controllers/BasketController.cs +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Controllers/BasketController.cs @@ -36,14 +36,9 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Controllers } // Retrieve the current basket - var currentBasket = await _basket.GetByIdAsync(data.BuyerId); - if (currentBasket == null) - { - currentBasket = new BasketData(data.BuyerId); - } + var basket = await _basket.GetByIdAsync(data.BuyerId) ?? new BasketData(data.BuyerId); var catalogItems = await _catalog.GetCatalogItemsAsync(data.Items.Select(x => x.ProductId)); - var newBasket = new BasketData(data.BuyerId); foreach (var bitem in data.Items) { @@ -53,7 +48,7 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Controllers return BadRequest($"Basket refers to a non-existing catalog item ({bitem.ProductId})"); } - newBasket.Items.Add(new BasketDataItem() + basket.Items.Add(new BasketDataItem() { Id = bitem.Id, ProductId = catalogItem.Id.ToString(), @@ -64,9 +59,9 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Controllers }); } - await _basket.UpdateAsync(newBasket); + await _basket.UpdateAsync(basket); - return newBasket; + return basket; } [HttpPut] diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile b/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile index 8ac850778..fbce2f0ab 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile @@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/ COPY src/Services/*/*/*.csproj /src/csproj-files/ COPY src/Web/*/*.csproj /src/csproj-files/ -ARG RUN=pwd -RUN ${RUN} - COPY . . WORKDIR /src/src/ApiGateways/Web.Bff.Shopping/aggregator RUN dotnet publish -c Release -o /app diff --git a/src/Services/Basket/Basket.API/Dockerfile b/src/Services/Basket/Basket.API/Dockerfile index 81955e178..909567b2c 100644 --- a/src/Services/Basket/Basket.API/Dockerfile +++ b/src/Services/Basket/Basket.API/Dockerfile @@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/ COPY src/Services/*/*/*.csproj /src/csproj-files/ COPY src/Web/*/*.csproj /src/csproj-files/ -ARG RUN=pwd -RUN ${RUN} - COPY . . WORKDIR /src/src/Services/Basket/Basket.API RUN dotnet publish -c Release -o /app diff --git a/src/Services/Catalog/Catalog.API/Dockerfile b/src/Services/Catalog/Catalog.API/Dockerfile index 70a97da27..facbb0ef3 100644 --- a/src/Services/Catalog/Catalog.API/Dockerfile +++ b/src/Services/Catalog/Catalog.API/Dockerfile @@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/ COPY src/Services/*/*/*.csproj /src/csproj-files/ COPY src/Web/*/*.csproj /src/csproj-files/ -ARG RUN=pwd -RUN ${RUN} - COPY . . WORKDIR /src/src/Services/Catalog/Catalog.API RUN dotnet publish -c Release -o /app diff --git a/src/Services/Identity/Identity.API/Dockerfile b/src/Services/Identity/Identity.API/Dockerfile index ed1502208..8196b077a 100644 --- a/src/Services/Identity/Identity.API/Dockerfile +++ b/src/Services/Identity/Identity.API/Dockerfile @@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/ COPY src/Services/*/*/*.csproj /src/csproj-files/ COPY src/Web/*/*.csproj /src/csproj-files/ -ARG RUN=pwd -RUN ${RUN} - COPY . . WORKDIR /src/src/Services/Identity/Identity.API RUN dotnet publish -c Release -o /app diff --git a/src/Services/Location/Locations.API/Dockerfile b/src/Services/Location/Locations.API/Dockerfile index 5f5a0c88a..8a173cbc1 100644 --- a/src/Services/Location/Locations.API/Dockerfile +++ b/src/Services/Location/Locations.API/Dockerfile @@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/ COPY src/Services/*/*/*.csproj /src/csproj-files/ COPY src/Web/*/*.csproj /src/csproj-files/ -ARG RUN=pwd -RUN ${RUN} - COPY . . WORKDIR /src/src/Services/Location/Locations.API RUN dotnet publish -c Release -o /app diff --git a/src/Services/Marketing/Marketing.API/Dockerfile b/src/Services/Marketing/Marketing.API/Dockerfile index bd9e3807b..3e0936e81 100644 --- a/src/Services/Marketing/Marketing.API/Dockerfile +++ b/src/Services/Marketing/Marketing.API/Dockerfile @@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/ COPY src/Services/*/*/*.csproj /src/csproj-files/ COPY src/Web/*/*.csproj /src/csproj-files/ -ARG RUN=pwd -RUN ${RUN} - COPY . . WORKDIR /src/src/Services/Marketing/Marketing.API RUN dotnet publish -c Release -o /app diff --git a/src/Services/Ordering/Ordering.API/Application/Validations/CancelOrderCommandValidator.cs b/src/Services/Ordering/Ordering.API/Application/Validations/CancelOrderCommandValidator.cs index 5c619586f..49b4c9413 100644 --- a/src/Services/Ordering/Ordering.API/Application/Validations/CancelOrderCommandValidator.cs +++ b/src/Services/Ordering/Ordering.API/Application/Validations/CancelOrderCommandValidator.cs @@ -1,17 +1,16 @@ using FluentValidation; +using Microsoft.Extensions.Logging; using Ordering.API.Application.Commands; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Ordering.API.Application.Validations { public class CancelOrderCommandValidator : AbstractValidator { - public CancelOrderCommandValidator() + public CancelOrderCommandValidator(ILogger logger) { RuleFor(order => order.OrderNumber).NotEmpty().WithMessage("No orderId found"); + + logger.LogTrace("----- INSTANCE CREATED - {ClassName}", GetType().Name); } } -} +} \ No newline at end of file diff --git a/src/Services/Ordering/Ordering.API/Application/Validations/CreateOrderCommandValidator.cs b/src/Services/Ordering/Ordering.API/Application/Validations/CreateOrderCommandValidator.cs index e6bbdd4d9..d3b09233a 100644 --- a/src/Services/Ordering/Ordering.API/Application/Validations/CreateOrderCommandValidator.cs +++ b/src/Services/Ordering/Ordering.API/Application/Validations/CreateOrderCommandValidator.cs @@ -1,5 +1,6 @@ using FluentValidation; using Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands; +using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; using System.Linq; @@ -9,19 +10,21 @@ namespace Ordering.API.Application.Validations { public class CreateOrderCommandValidator : AbstractValidator { - public CreateOrderCommandValidator() + public CreateOrderCommandValidator(ILogger logger) { RuleFor(command => command.City).NotEmpty(); RuleFor(command => command.Street).NotEmpty(); RuleFor(command => command.State).NotEmpty(); RuleFor(command => command.Country).NotEmpty(); RuleFor(command => command.ZipCode).NotEmpty(); - RuleFor(command => command.CardNumber).NotEmpty().Length(12, 19); + RuleFor(command => command.CardNumber).NotEmpty().Length(12, 19); RuleFor(command => command.CardHolderName).NotEmpty(); - RuleFor(command => command.CardExpiration).NotEmpty().Must(BeValidExpirationDate).WithMessage("Please specify a valid card expiration date"); - RuleFor(command => command.CardSecurityNumber).NotEmpty().Length(3); + RuleFor(command => command.CardExpiration).NotEmpty().Must(BeValidExpirationDate).WithMessage("Please specify a valid card expiration date"); + RuleFor(command => command.CardSecurityNumber).NotEmpty().Length(3); RuleFor(command => command.CardTypeId).NotEmpty(); - RuleFor(command => command.OrderItems).Must(ContainOrderItems).WithMessage("No order items found"); + RuleFor(command => command.OrderItems).Must(ContainOrderItems).WithMessage("No order items found"); + + logger.LogTrace("----- INSTANCE CREATED - {ClassName}", GetType().Name); } private bool BeValidExpirationDate(DateTime dateTime) @@ -34,4 +37,4 @@ namespace Ordering.API.Application.Validations return orderItems.Any(); } } -} +} \ No newline at end of file diff --git a/src/Services/Ordering/Ordering.API/Application/Validations/IdentifiedCommandValidator.cs b/src/Services/Ordering/Ordering.API/Application/Validations/IdentifiedCommandValidator.cs index 84ae48835..d79bf42e4 100644 --- a/src/Services/Ordering/Ordering.API/Application/Validations/IdentifiedCommandValidator.cs +++ b/src/Services/Ordering/Ordering.API/Application/Validations/IdentifiedCommandValidator.cs @@ -1,13 +1,16 @@ using FluentValidation; using Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands; +using Microsoft.Extensions.Logging; namespace Ordering.API.Application.Validations { public class IdentifiedCommandValidator : AbstractValidator> { - public IdentifiedCommandValidator() + public IdentifiedCommandValidator(ILogger logger) { - RuleFor(command => command.Id).NotEmpty(); + RuleFor(command => command.Id).NotEmpty(); + + logger.LogTrace("----- INSTANCE CREATED - {ClassName}", GetType().Name); } } } diff --git a/src/Services/Ordering/Ordering.API/Application/Validations/ShipOrderCommandValidator.cs b/src/Services/Ordering/Ordering.API/Application/Validations/ShipOrderCommandValidator.cs index 72a16d319..fbc294534 100644 --- a/src/Services/Ordering/Ordering.API/Application/Validations/ShipOrderCommandValidator.cs +++ b/src/Services/Ordering/Ordering.API/Application/Validations/ShipOrderCommandValidator.cs @@ -1,17 +1,16 @@ using FluentValidation; +using Microsoft.Extensions.Logging; using Ordering.API.Application.Commands; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Ordering.API.Application.Validations { public class ShipOrderCommandValidator : AbstractValidator { - public ShipOrderCommandValidator() + public ShipOrderCommandValidator(ILogger logger) { RuleFor(order => order.OrderNumber).NotEmpty().WithMessage("No orderId found"); + + logger.LogTrace("----- INSTANCE CREATED - {ClassName}", GetType().Name); } } -} +} \ No newline at end of file diff --git a/src/Services/Ordering/Ordering.API/Dockerfile b/src/Services/Ordering/Ordering.API/Dockerfile index aa1f0e9c6..63813c5ae 100644 --- a/src/Services/Ordering/Ordering.API/Dockerfile +++ b/src/Services/Ordering/Ordering.API/Dockerfile @@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/ COPY src/Services/*/*/*.csproj /src/csproj-files/ COPY src/Web/*/*.csproj /src/csproj-files/ -ARG RUN=pwd -RUN ${RUN} - COPY . . WORKDIR /src/src/Services/Ordering/Ordering.API RUN dotnet publish -c Release -o /app diff --git a/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile b/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile index 0c121f4a8..f1dbea6b1 100644 --- a/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile +++ b/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile @@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/ COPY src/Services/*/*/*.csproj /src/csproj-files/ COPY src/Web/*/*.csproj /src/csproj-files/ -ARG RUN=pwd -RUN ${RUN} - COPY . . WORKDIR /src/src/Services/Ordering/Ordering.BackgroundTasks RUN dotnet publish -c Release -o /app diff --git a/src/Services/Ordering/Ordering.SignalrHub/Dockerfile b/src/Services/Ordering/Ordering.SignalrHub/Dockerfile index a40dc797f..1dfffd839 100644 --- a/src/Services/Ordering/Ordering.SignalrHub/Dockerfile +++ b/src/Services/Ordering/Ordering.SignalrHub/Dockerfile @@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/ COPY src/Services/*/*/*.csproj /src/csproj-files/ COPY src/Web/*/*.csproj /src/csproj-files/ -ARG RUN=pwd -RUN ${RUN} - COPY . . WORKDIR /src/src/Services/Ordering/Ordering.SignalrHub RUN dotnet publish -c Release -o /app diff --git a/src/Services/Payment/Payment.API/Dockerfile b/src/Services/Payment/Payment.API/Dockerfile index dcaf9b5e8..65baf8278 100644 --- a/src/Services/Payment/Payment.API/Dockerfile +++ b/src/Services/Payment/Payment.API/Dockerfile @@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/ COPY src/Services/*/*/*.csproj /src/csproj-files/ COPY src/Web/*/*.csproj /src/csproj-files/ -ARG RUN=pwd -RUN ${RUN} - COPY . . WORKDIR /src/src/Services/Payment/Payment.API RUN dotnet publish -c Release -o /app diff --git a/src/Services/Webhooks/Webhooks.API/Dockerfile b/src/Services/Webhooks/Webhooks.API/Dockerfile index 0da59affa..9cc1828d9 100644 --- a/src/Services/Webhooks/Webhooks.API/Dockerfile +++ b/src/Services/Webhooks/Webhooks.API/Dockerfile @@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/ COPY src/Services/*/*/*.csproj /src/csproj-files/ COPY src/Web/*/*.csproj /src/csproj-files/ -ARG RUN=pwd -RUN ${RUN} - COPY . . WORKDIR "/src/src/Services/Webhooks/Webhooks.API" RUN dotnet publish -c Release -o /app diff --git a/src/Web/WebMVC/Dockerfile b/src/Web/WebMVC/Dockerfile index 4cb62e614..0e3445b57 100644 --- a/src/Web/WebMVC/Dockerfile +++ b/src/Web/WebMVC/Dockerfile @@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/ COPY src/Services/*/*/*.csproj /src/csproj-files/ COPY src/Web/*/*.csproj /src/csproj-files/ -ARG RUN=pwd -RUN ${RUN} - COPY . . WORKDIR /src/src/Web/WebMVC RUN dotnet publish -c Release -o /app diff --git a/src/Web/WebSPA/Dockerfile b/src/Web/WebSPA/Dockerfile index ef0f46c7f..d7cb7631c 100644 --- a/src/Web/WebSPA/Dockerfile +++ b/src/Web/WebSPA/Dockerfile @@ -20,9 +20,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/ COPY src/Services/*/*/*.csproj /src/csproj-files/ COPY src/Web/*/*.csproj /src/csproj-files/ -ARG RUN=pwd -RUN ${RUN} - COPY . . COPY --from=node-build /web/wwwroot /src/src/Web/WebSPA/wwwroot/ WORKDIR /src/src/Web/WebSPA diff --git a/src/Web/WebStatus/Dockerfile b/src/Web/WebStatus/Dockerfile index edb691988..92c1b2717 100644 --- a/src/Web/WebStatus/Dockerfile +++ b/src/Web/WebStatus/Dockerfile @@ -13,9 +13,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/ COPY src/Services/*/*/*.csproj /src/csproj-files/ COPY src/Web/*/*.csproj /src/csproj-files/ -ARG RUN=pwd -RUN ${RUN} - COPY . . WORKDIR /src/src/Web/WebStatus RUN dotnet publish -c Release -o /app diff --git a/src/Web/WebhookClient/Dockerfile b/src/Web/WebhookClient/Dockerfile index 0710db058..9143fd8e1 100644 --- a/src/Web/WebhookClient/Dockerfile +++ b/src/Web/WebhookClient/Dockerfile @@ -14,9 +14,6 @@ COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/ COPY src/Services/*/*/*.csproj /src/csproj-files/ COPY src/Web/*/*.csproj /src/csproj-files/ -ARG RUN=pwd -RUN ${RUN} - COPY . . WORKDIR /src/src/Web/WebhookClient RUN dotnet publish -c Release -o /app