Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase #2

Merged
merged 4 commits into from
Mar 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 75 additions & 50 deletions build-images.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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'))
12 changes: 9 additions & 3 deletions windows/tests/9.3.x/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 (<https://cd/>).