From c486855b90e4a01b75cb49279df086848c1c5289 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20L=27Heureux?= Date: Tue, 17 Mar 2020 08:58:59 -0400 Subject: [PATCH 1/2] Add details to storefront configuration --- windows/tests/9.3.x/README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/windows/tests/9.3.x/README.md b/windows/tests/9.3.x/README.md index 526c9884b..d6d6ae435 100644 --- a/windows/tests/9.3.x/README.md +++ b/windows/tests/9.3.x/README.md @@ -70,8 +70,14 @@ To verify that everything is working okay browse to: ### Storefront Configuration -To setup a storefront, after initializing the engine you need to create a new Tenant & Site, then perform a full publish and index rebuild. - -You can follow the [standard setup instructions](https://doc.sitecore.com/users/91/sitecore-experience-commerce/en/set-up-a-storefront-site.html). +To setup a storefront, after initializing the engine you need to follow the [standard commerce SXA setup instructions](https://doc.sitecore.com/users/91/sitecore-experience-commerce/en/set-up-a-storefront-site.html): + +1. Create a new Tenant. + - Use a tenant name without spaces and special characters. +1. Create a new Site. + - Use a site name without spaces and special characters. + - Use "cd" as the host name for the site. +1. Perform a full publish. +1. Perform an index rebuild of `sitecore_master_index` and `sitecore_web_index`. After this you can access the storefront on CD (). From 0700f5d34cc3ae1dfe3fc54d033b1107f96b81d4 Mon Sep 17 00:00:00 2001 From: "J.F. Larente" Date: Tue, 17 Mar 2020 13:31:03 -0400 Subject: [PATCH 2/2] Feature/pipeline improvements (#273) * Align variables * Fix condition indent * Fix names * Fix replace * Quote password * Added display names * Replace registry.name with registry.fullname to match variable * Updated display names * Limited triggers to master branch commit only Co-authored-by: Joost Meijles --- build-images.yml | 125 ++++++++++++++++++++++++++++------------------- 1 file changed, 75 insertions(+), 50 deletions(-) diff --git a/build-images.yml b/build-images.yml index 0a353af74..0acca2ec3 100644 --- a/build-images.yml +++ b/build-images.yml @@ -1,70 +1,95 @@ +# The following variables need to be set in Azure Devops: + +# Azure +# - azure.subscription +# - azure.agentPoolName +# - azure.vm.resourceGroupName +# - (optional) azure.vm.linux.name +# - azure.vm.windows.name +# +# Image build options +# - build.tags +# - build.pushMode +# - build.pruneImages +# +# Sitecore credentials +# - sitecore.username +# - sitecore.password +# +# Container registry +# - container.registry.password +# - container.registry.username +# - container.registry.fullname +# +# Windows: +# - windows.install.source.path +# +# Assets drive +# - assets.useDrive +# - (optional) assets.azure.fileshare.password +# - (optional) assets.shared.folder.server +# +# Linux +# - linux.buildImages +# - (optional) linux.install.source.path + trigger: batch: true branches: include: - master - - integration/* -schedules: - - cron: '0 12 * * 0' +schedules: + - cron: "0 12 * * 0" displayName: Weekly Sunday build branches: include: - master always: true -pr: - autoCancel: true - branches: - include: - - master stages: - stage: Start_VMs - displayName: 'Start VMs' jobs: - job: Start_Windows_VM - displayName: 'Start Windows VM' pool: vmImage: Windows-2019 # Use Microsoft hosted image to start VMs steps: - task: vfabing.AzureVirtualMachineManagerTask.custom-build-release-task.AzureVirtualMachineManagerTask@1 - displayName: 'Start Docker Build VM' + displayName: "Start Docker Build VM" inputs: - Action: 'Start VM' - azureSubscription: $(azureSubscription) - ResourceGroupName: $(vm.resourceGroupName) - VmName: $(vm.windows.name) + Action: "Start VM" + azureSubscription: $(azure.subscription) + ResourceGroupName: $(azure.vm.resourceGroupName) + VmName: $(azure.vm.windows.name) - job: Start_Linux_VM - displayName: 'Start Linux VM' - condition: eq(variables['buildLinuxImages'], 'true') + condition: eq(variables['linux.buildImages'], 'true') pool: vmImage: Windows-2019 steps: - task: vfabing.AzureVirtualMachineManagerTask.custom-build-release-task.AzureVirtualMachineManagerTask@1 - displayName: 'Start Docker Build VM' + displayName: "Start Docker Build VM" inputs: - Action: 'Start VM' - azureSubscription: $(azureSubscription) - ResourceGroupName: $(vm.resourceGroupName) - VmName: $(vm.linux.name) + Action: "Start VM" + azureSubscription: $(azure.subscription) + ResourceGroupName: $(azure.vm.resourceGroupName) + VmName: $(azure.vm.linux.name) - stage: Build_Images - displayName: 'Build Images' dependsOn: Start_VMs jobs: - job: Build_Windows_Images timeoutInMinutes: 720 - displayName: 'Build Windows Images' + displayName: "Build Windows Images" pool: - name: $(agentPoolName) + name: $(azure.agentPoolName) steps: - powershell: | - Test-NetConnection -ComputerName "$(shared.folder.server)" -Port 445 - Invoke-Expression -Command "cmdkey /add:$(shared.folder.server) /user:Azure\dockerassets /pass:$(azure.fileshare.password)" - New-PSDrive -Name Z -PSProvider FileSystem -Root "\\$(shared.folder.server)\docker-assets" -Persist -ErrorAction SilentlyContinue - condition: eq(variables['useAssetsDrive'], 'true') - displayName: 'Connect to Asset Drive' + Test-NetConnection -ComputerName "$(assets.shared.folder.server)" -Port 445 + Invoke-Expression -Command "cmdkey /add:$(assets.shared.folder.server) /user:Azure\dockerassets /pass:$(assets.azure.fileshare.password)" + New-PSDrive -Name Z -PSProvider FileSystem -Root "\\$(assets.shared.folder.server)\docker-assets" -Persist -ErrorAction SilentlyContinue + condition: eq(variables['assets.useDrive'], 'true') + displayName: "Connect Asset Drive (optional)" - task: Docker@2 - displayName: login + displayName: "Docker registry login" inputs: containerRegistry: "docker-registry" command: login @@ -73,47 +98,47 @@ stages: - powershell: | "$(container.registry.password)" | docker login -u "$(container.registry.username)" --password-stdin $(container.registry.fullname) Import-Module (Join-Path "$(Build.SourcesDirectory)" "\modules\SitecoreImageBuilder") -Force - SitecoreImageBuilder\Invoke-PackageRestore -Tags "$(tags)" -Path (Join-Path "$(Build.SourcesDirectory)" "windows") -Destination $(install.windows.source.path) -SitecoreUsername $(sitecore.username) -SitecorePassword $(sitecore.password) - SitecoreImageBuilder\Invoke-Build -Tags "$(tags)" -Path (Join-Path "$(Build.SourcesDirectory)" "windows") -InstallSourcePath $(install.windows.source.path) -Registry $(container.registry.name) -PushMode $(PushMode) - displayName: 'Build Images' + SitecoreImageBuilder\Invoke-PackageRestore -Tags "$(build.tags)" -Path (Join-Path "$(Build.SourcesDirectory)" "windows") -Destination $(windows.install.source.path) -SitecoreUsername "$(sitecore.username)" -SitecorePassword "$(sitecore.password)" + SitecoreImageBuilder\Invoke-Build -Tags "$(build.tags)" -Path (Join-Path "$(Build.SourcesDirectory)" "windows") -InstallSourcePath $(windows.install.source.path) -Registry $(container.registry.fullname) -PushMode $(build.pushMode) + displayName: "Build Images" - powershell: | docker image prune --force - condition: and(succeeded(), eq(variables['pruneImages'], 'true')) - displayName: 'Prune' + condition: and(succeeded(), eq(variables['build.pruneImages'], 'true')) + displayName: 'Prune images (optional)' - job: Build_Linux_Images timeoutInMinutes: 720 - displayName: 'Build Linux Images' - condition: eq(variables['buildLinuxImages'], 'true') + displayName: "Build Linux Images" + condition: eq(variables['linux.buildImages'], 'true') pool: - name: $(agentPoolName) + name: $(azure.agentPoolName) demands: - Agent.OS -equals Linux steps: - task: Bash@3 - condition: eq(variables['useAssetsDrive'], 'true') + condition: eq(variables['assets.useDrive'], 'true') inputs: targetType: inline script: | - if [ -d "$(install.linux.source.path)" ]; then + if [ -d "$(linux.install.source.path)" ]; then exit 0 fi - sudo mkdir $(install.linux.source.path) - + sudo mkdir $(linux.install.source.path) + if [ ! -d "/etc/smbcredentials" ]; then sudo mkdir /etc/smbcredentials fi if [ ! -f "/etc/smbcredentials/dockerassets.cred" ]; then sudo bash -c 'echo "username=dockerassets" >> /etc/smbcredentials/dockerassets.cred' - sudo bash -c 'echo "password=$(azure.fileshare.password)" >> /etc/smbcredentials/dockerassets.cred' + sudo bash -c 'echo "password=$(assets.azure.fileshare.password)" >> /etc/smbcredentials/dockerassets.cred' fi sudo chmod 600 /etc/smbcredentials/dockerassets.cred - sudo bash -c 'echo "//$(shared.folder.server)/docker-assets $(install.linux.source.path) cifs nofail,vers=3.0,credentials=/etc/smbcredentials/dockerassets.cred,dir_mode=0777,file_mode=0777,serverino" >> /etc/fstab' - sudo mount -t cifs //$(shared.folder.server)/docker-assets $(install.linux.source.path) -o vers=3.0,credentials=/etc/smbcredentials/dockerassets.cred,dir_mode=0777,file_mode=0777,serverino + sudo bash -c 'echo "//$(assets.shared.folder.server)/docker-assets $(linux.install.source.path) cifs nofail,vers=3.0,credentials=/etc/smbcredentials/dockerassets.cred,dir_mode=0777,file_mode=0777,serverino" >> /etc/fstab' + sudo mount -t cifs //$(assets.shared.folder.server)/docker-assets $(linux.install.source.path) -o vers=3.0,credentials=/etc/smbcredentials/dockerassets.cred,dir_mode=0777,file_mode=0777,serverino - task: Docker@2 enabled: true - displayName: login + displayName: "Docker registry login" inputs: containerRegistry: "docker-registry" command: login @@ -122,8 +147,8 @@ stages: - powershell: | "$(container.registry.password)" | docker login -u "$(container.registry.username)" --password-stdin $(container.registry.fullname) Import-Module (Join-Path "$(Build.SourcesDirectory)" "\modules\SitecoreImageBuilder") -Force - SitecoreImageBuilder\Invoke-PackageRestore -Tags "$(tags)" -Path (Join-Path "$(Build.SourcesDirectory)" "linux") -Destination "$(install.linux.source.path)" -SitecoreUsername $(sitecore.username) -SitecorePassword $(sitecore.password) - SitecoreImageBuilder\Invoke-Build -Tags "$(tags)" -Path (Join-Path "$(Build.SourcesDirectory)" "linux") -InstallSourcePath "$(install.linux.source.path)" -Registry $(container.registry.name) -PushMode $(PushMode) + SitecoreImageBuilder\Invoke-PackageRestore -Tags "$(build.tags)" -Path (Join-Path "$(Build.SourcesDirectory)" "linux") -Destination "$(linux.install.source.path)" -SitecoreUsername "$(sitecore.username)" -SitecorePassword "$(sitecore.password)" + SitecoreImageBuilder\Invoke-Build -Tags "$(build.tags)" -Path (Join-Path "$(Build.SourcesDirectory)" "linux") -InstallSourcePath "$(linux.install.source.path)" -Registry $(container.registry.fullname) -PushMode $(build.pushMode) - powershell: | docker image prune --force - condition: and(succeeded(), eq(variables['pruneImages'], 'true')) + condition: and(succeeded(), eq(variables['build.pruneImages'], 'true'))