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

Add Deploy 13.3.0 and 14.2.0 release notes and document ImportOnStartup and ValidateDependenciesOnImport settings #6699

Merged
merged 23 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e5ca81e
Add Deploy 13.3 and 14.2 release notes
ronaldbarendse Nov 21, 2024
cc1466d
Update Deploy screenshots and clean up duplicate/unused images
ronaldbarendse Nov 22, 2024
56a3a11
Add ImportOnStartup documentation
ronaldbarendse Nov 22, 2024
816acc0
Add ValidateDependenciesOnImport documentation
ronaldbarendse Nov 22, 2024
e059836
Update 10/umbraco-deploy/deployment-workflow/content-transfer.md
eshanrnh Nov 25, 2024
7af8115
Update 13/umbraco-deploy/deployment-workflow/content-transfer.md
eshanrnh Nov 25, 2024
6b5aca0
Update 14/umbraco-deploy/deployment-workflow/content-transfer.md
eshanrnh Nov 25, 2024
a12f4c2
Update umbraco-cloud/deployment/README.md
eshanrnh Nov 25, 2024
ba812e7
Update 15/umbraco-deploy/deployment-workflow/import-export.md
eshanrnh Nov 25, 2024
6c7051b
Move 'Import on startup' to dedicated page
ronaldbarendse Nov 25, 2024
394ab31
Fix typo
ronaldbarendse Nov 25, 2024
56108b9
Update 13/umbraco-deploy/deployment-workflow/import-on-startup.md
eshanrnh Nov 26, 2024
d44b819
Update 15/umbraco-deploy/deployment-workflow/import-on-startup.md
eshanrnh Nov 26, 2024
eeee300
Update 15/umbraco-deploy/deployment-workflow/import-on-startup.md
eshanrnh Nov 26, 2024
734b763
Update 15/umbraco-deploy/deployment-workflow/import-on-startup.md
eshanrnh Nov 26, 2024
57c9bbb
Update 15/umbraco-deploy/deployment-workflow/import-on-startup.md
eshanrnh Nov 26, 2024
4c970db
Update 14/umbraco-deploy/deployment-workflow/import-on-startup.md
eshanrnh Nov 26, 2024
50360a4
Update 14/umbraco-deploy/deployment-workflow/import-on-startup.md
eshanrnh Nov 26, 2024
c04d70a
Update 14/umbraco-deploy/deployment-workflow/import-on-startup.md
eshanrnh Nov 26, 2024
b497ba9
Update 14/umbraco-deploy/deployment-workflow/import-on-startup.md
eshanrnh Nov 26, 2024
147c5ac
Update 13/umbraco-deploy/deployment-workflow/import-on-startup.md
eshanrnh Nov 26, 2024
172160e
Update 13/umbraco-deploy/deployment-workflow/import-on-startup.md
eshanrnh Nov 26, 2024
8537bb8
Update 13/umbraco-deploy/deployment-workflow/import-on-startup.md
eshanrnh Nov 26, 2024
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
2 changes: 1 addition & 1 deletion 10/umbraco-deploy/deployment-workflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Umbraco Deploy uses a deployment model that relies on Git and Umbraco Deploy cor
If your project contains a Staging environment, deployments will be made from Development to Staging and then from Staging to Live.
{% endhint %}

![Left to right model](<../../../umbraco-cloud/deployment/images/left-to-right (1) (1) (1) (1) (1) (1) (1) (1) (1).png>)
![Left to right model](images/left-to-right.png)
eshanrnh marked this conversation as resolved.
Show resolved Hide resolved

## Deployment Approach

Expand Down
2 changes: 1 addition & 1 deletion 10/umbraco-deploy/deployment-workflow/content-transfer.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ This does not include entries submitted via the forms.

Sometimes a content transfer might not be possible. For example if you add a new property to the HomePage Document type and you don’t have that property in both environments, you’ll get an error with a hint on how to fix this.

![clone dialog](../../../umbraco-cloud/deployment/images/schema-mismatch.png)
![Clone dialog](images/schema-mismatch.png)

If you are seeing this type of issue when trying to transfer content, head over to our article about [Schema Mismatch errors](../troubleshooting.md), where you can read about how to resolve the issues.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
12 changes: 6 additions & 6 deletions 10/umbraco-deploy/deployment-workflow/import-export.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ When exporting, you can choose to include associated media files. Bear in mind t

If your account has access to the Settings section, you can also choose to include the schema information and related files as well.

![Export dialog](../../../10/umbraco-deploy/deployment-workflow/images/export-dialog.png)
![Export dialog](images/export-dialog.png)

Umbraco Deploy will then serialize all the selected items to individual files, archive them into a zip file and make that available for download. You can download the file using the _Download_ button.

After the download, you should also delete the archive file from the server. You can do this immediately via the _Delete_ button available in the dialog.

![Export dialog complete](../../../10/umbraco-deploy/deployment-workflow/images//export-dialog-complete.png)
![Export dialog complete](images/export-dialog-complete.png)

If you miss doing this, you can also clean up archive files from the Umbraco Deploy dashboard in the _Settings_ section.

![Delete exports](../../../10/umbraco-deploy/deployment-workflow/images//delete-exports.png)
![Delete exports](images/delete-exports.png)

{% hint style="info" %}
The exported archive files are saved to the Umbraco temp folder in the `Deploy\Export` sub-directory. This is a temporary (non-persistent) location, local to the backoffice server and therefore shouldn't be used for long-term storage of exports. You can also only download the file from the export dialog in the backoffice.
Expand All @@ -52,7 +52,7 @@ The exported archive files are saved to the Umbraco temp folder in the `Deploy\E

Having previously exported content and schema to a zip file, you can import this into a new environment.

![Import dialog](../../../10/umbraco-deploy/deployment-workflow/images//import-dialog.png)
![Import dialog](images/import-dialog.png)

You can upload the file via the browser.

Expand All @@ -62,13 +62,13 @@ Similar to when exporting, you can choose to import everything from the archive
Deploy does not touch the default maximum upload size, but can you [configure this yourself by following the CMS documentation](https://docs.umbraco.com/umbraco-cms/reference/configuration/maximumuploadsizesettings).
{% endhint %}

![Import dialog step 2](../../../10/umbraco-deploy/deployment-workflow/images//import-dialog-2.png)
![Import dialog step 2](images/import-dialog-2.png)

We validate the file before importing. Schema items that content depends on must either be in the upload itself or already exist on the target environment with the same details. If there are any issues that mean the import cannot proceed, it will be reported. You may also be given warnings for review. You can choose to ignore these and proceed if they aren't relevant to the action you are carrying out.

The import then proceeds, processing all the items provided in the zip file.

![Import dialog step 3](../../../10/umbraco-deploy/deployment-workflow/images//import-dialog-3.png)
![Import dialog step 3](images/import-dialog-3.png)

Once complete or on close of the dialog, the imported file will be deleted from the server. If this is missed, perhaps via a closed browser, you can also delete archive files from the Umbraco Deploy dashboard in the _Settings_ section.

Expand Down
1 change: 1 addition & 0 deletions 13/umbraco-deploy/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* [Import and Export](deployment-workflow/import-export.md)
* [Import and Export with Migrations](deployment-workflow/import-with-migrations.md)
* [Import and Export from version 7](deployment-workflow/import-export-v7.md)
* [Import on startup](deployment-workflow/import-on-startup.md)
* [Deploying Changes](deployment-workflow/deploying-changes.md)
* [Deploying deletions](deployment-workflow/deploying-deletions.md)
* [Restoring content](deployment-workflow/restoring-content/README.md)
Expand Down
2 changes: 1 addition & 1 deletion 13/umbraco-deploy/deployment-workflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ The extraction will end in one of two possible outcomes:

It is also possible to see which version of Umbraco Deploy you are running, when the last operation was started and the status of the deployment operation.

![Deploy Dashboard](../../../10/umbraco-deploy/deployment-workflow/images/Deploy-dahsboard.png)
![Deploy dashboard](images/deploy-dashboard.png)

{% embed url="https://www.youtube.com/embed/l5qdTsIddKM?rel=0" %}
Umbraco Deploy - Content transfer and deploy
Expand Down
2 changes: 1 addition & 1 deletion 13/umbraco-deploy/deployment-workflow/content-transfer.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ This does not include entries submitted via the forms.

Sometimes a content transfer might not be possible. For example if you add a new property to the HomePage Document type and you don’t have that property in both environments, you’ll get an error with a hint on how to fix this.

![clone dialog](<images/schema-mismatch (1).png>)
![Clone dialog](images/schema-mismatch.png)

If you are seeing this type of issue when trying to transfer content, head over to our article about [Schema Mismatch errors](../troubleshooting.md), where you can read about how to resolve the issues.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
16 changes: 10 additions & 6 deletions 13/umbraco-deploy/deployment-workflow/import-export.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,21 @@ When exporting, you can choose to include associated media files. Bear in mind t

If your account has access to the Settings section, you can also choose to include the schema information and related files as well.

![Export dialog](../../../10/umbraco-deploy/deployment-workflow/images/export-dialog.png)
![Export dialog](images/tree-export-dialog.png)

When doing a workspace export, you also have the option to include *all* schema in the export (introduced in Deploy 13.3), regardless of whether it is in use by any content.

![Workspace export dialog](images/workspace-export-dialog.png)

Umbraco Deploy will then serialize all the selected items to individual files, archive them into a zip file and make that available for download. You can download the file using the _Download_ button.

After the download, you should also delete the archive file from the server. You can do this immediately via the _Delete_ button available in the dialog.

![Export dialog complete](../../../10/umbraco-deploy/deployment-workflow/images/export-dialog-complete.png)
![Export dialog complete](images/export-complete-dialog.png)

If you miss doing this, you can also clean up archive files from the Umbraco Deploy dashboard in the _Settings_ section.

![Delete exports](../../../10/umbraco-deploy/deployment-workflow/images/delete-exports.png)
![Delete exports](images/delete-exports.png)

{% hint style="info" %}
The exported archive files are saved to the Umbraco temp folder in the `Deploy\Export` sub-directory. This is a temporary (non-persistent) location, local to the backoffice server and therefore shouldn't be used for long-term storage of exports. You can also only download the file from the export dialog in the backoffice.
Expand All @@ -52,7 +56,7 @@ The exported archive files are saved to the Umbraco temp folder in the `Deploy\E

Having previously exported content and schema to a zip file, you can import this into a new environment.

![Import dialog](../../../10/umbraco-deploy/deployment-workflow/images/import-dialog.png)
![Import dialog](images/import-dialog.png)

You can upload the file via the browser.

Expand All @@ -63,13 +67,13 @@ Deploy does not touch the default maximum upload size, but you can [configure th
On Umbraco Cloud, the upload size limit is 500 MB.
{% endhint %}

![Import dialog step 2](../../../10/umbraco-deploy/deployment-workflow/images/import-dialog-2.png)
![Import dialog step 2](images/import-dialog-2.png)

We validate the file before importing. Schema items that content depends on must either be in the upload itself or already exist on the target environment with the same details. If there are any issues that mean the import cannot proceed, it will be reported. You may also be given warnings for review. You can choose to ignore these and proceed if they aren't relevant to the action you are carrying out.

The import then proceeds, processing all the items provided in the zip file.

![Import dialog step 3](../../../10/umbraco-deploy/deployment-workflow/images/import-dialog-3.png)
![Import dialog step 3](images/import-dialog-3.png)

Once complete or on close of the dialog, the imported file will be deleted from the server. If this is missed, perhaps via a closed browser, you can also delete archive files from the Umbraco Deploy dashboard in the _Settings_ section.

Expand Down
69 changes: 69 additions & 0 deletions 13/umbraco-deploy/deployment-workflow/import-on-startup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
meta.Title: Import on startup
description: How to import content and schema on startup and implement your own `IArtifactImportOnStartupProvider`
---

# Import on startup

Deploy can import content and/or schema previously exported from another Umbraco installation on start-up. This allows for a quick setup of a baseline/starter kit or serves as a workaround for large ZIP archives that cannot be uploaded via the backoffice.

Check warning on line 8 in 13/umbraco-deploy/deployment-workflow/import-on-startup.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [UmbracoDocs.SentenceLength] Write shorter sentences (less than 25 words). Raw Output: {"message": "[UmbracoDocs.SentenceLength] Write shorter sentences (less than 25 words).", "location": {"path": "13/umbraco-deploy/deployment-workflow/import-on-startup.md", "range": {"start": {"line": 8, "column": 108}}}, "severity": "WARNING"}

## Default configuration

The default configuration will look for the ZIP archive `umbraco\Deploy\import-on-startup.zip` on start-up and if it exists, run an import and delete the file on successful completion. If you want to customize the default behavior, do so via [settings](../getting-started/deploy-settings.md#import-on-startup).

Check warning on line 12 in 13/umbraco-deploy/deployment-workflow/import-on-startup.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [UmbracoDocs.SentenceLength] Write shorter sentences (less than 25 words). Raw Output: {"message": "[UmbracoDocs.SentenceLength] Write shorter sentences (less than 25 words).", "location": {"path": "13/umbraco-deploy/deployment-workflow/import-on-startup.md", "range": {"start": {"line": 12, "column": 1}}}, "severity": "WARNING"}

This feature is extensible via a provider-based model by implementing `IArtifactImportOnStartupProvider` and registering it using `builder.DeployArtifactImportOnStartupProviders()`. The default `Umbraco.Deploy.Infrastructure.SettingsArtifactImportOnStartupProvider` implementation uses the above settings and inherits from `Umbraco.Deploy.Infrastructure.ArtifactImportOnStartupProviderZipArchiveBase` (which can be used for your own custom implementation).

## Implementing your own `IArtifactImportOnStartupProvider`

An example of an import on a start-up provider that imports from a physical directory (instead of ZIP archive) is shown below:

```csharp
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Composing;
using Umbraco.Cms.Core.Extensions;
using Umbraco.Deploy.Core;
using Umbraco.Deploy.Core.OperationStatus;
using Umbraco.Deploy.Infrastructure.Extensions;

internal sealed class DeployImportOnStartupComposer : IComposer
{
public void Compose(IUmbracoBuilder builder)
=> builder.DeployArtifactImportOnStartupProviders()
.Append<PhysicalDirectoryArtifactImportOnStartupProvider>();

private sealed class PhysicalDirectoryArtifactImportOnStartupProvider : IArtifactImportOnStartupProvider
{
private readonly IArtifactImportExportService _artifactImportExportService;
private readonly ILogger _logger;
private readonly string _artifactsPath;

public PhysicalDirectoryArtifactImportOnStartupProvider(IArtifactImportExportService artifactImportExportService, ILogger<PhysicalDirectoryArtifactImportOnStartupProvider> logger, IHostEnvironment hostEnvironment)
{
_artifactImportExportService = artifactImportExportService;
_logger = logger;
_artifactsPath = hostEnvironment.MapPathContentRoot("~/umbraco/Deploy/ImportOnStartup");
}

public Task<bool> CanImportAsync(CancellationToken cancellationToken = default)
=> Task.FromResult(Directory.Exists(_artifactsPath));

public async Task<Attempt<ImportArtifactsOperationStatus>> ImportAsync(CancellationToken cancellationToken = default)
{
_logger.LogInformation("Importing Umbraco content and/or schema import at startup from directory {FilePath}.", _artifactsPath);

Attempt<ImportArtifactsOperationStatus> attempt = await _artifactImportExportService.ImportArtifactsAsync(_artifactsPath, default, null, cancellationToken);

_logger.LogInformation("Imported Umbraco content and/or schema import at startup from directory {FilePath} with status: {OperationStatus}.", _artifactsPath, attempt.Result);

return attempt;
}

public Task OnImportCompletedAsync()
{
Directory.Delete(_artifactsPath, true);

return Task.CompletedTask;
}
}
}
```
Loading
Loading