Skip to content

Commit abedb23

Browse files
committed
add current options
1 parent 69a380c commit abedb23

File tree

4 files changed

+120
-0
lines changed

4 files changed

+120
-0
lines changed

umbraco-cloud/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
* [Configuring a CI/CD pipeline](build-and-customize-your-solution/handle-deployments-and-environments/umbraco-cicd/samplecicdpipeline/README.md)
6969
* [Azure DevOps](build-and-customize-your-solution/handle-deployments-and-environments/umbraco-cicd/samplecicdpipeline/azure-devops.md)
7070
* [GitHub Actions](build-and-customize-your-solution/handle-deployments-and-environments/umbraco-cicd/samplecicdpipeline/github-actions.md)
71+
* [Advanced Setup: Deployment options](build-and-customize-your-solution/handle-deployments-and-environments/umbraco-cicd/samplecicdpipeline/advanced-deployment-options.md)
7172
* [Advanced Setup: Deploy to multiple targets](build-and-customize-your-solution/handle-deployments-and-environments/umbraco-cicd/samplecicdpipeline/advanced-multiple-targets.md)
7273
* [Migrate from V1 to V2](build-and-customize-your-solution/handle-deployments-and-environments/umbraco-cicd/samplecicdpipeline/migrate.md)
7374
* [Deployment Artifact best practice](build-and-customize-your-solution/handle-deployments-and-environments/umbraco-cicd/samplecicdpipeline/artifact-best-practice.md)
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# Advanced Setup: Deployment options
2+
3+
In this example, you will learn how to use the deployment options available with the v2 endpoints for CI/CD.
4+
5+
This provides some control to the deployment process.
6+
7+
| Option | Description |
8+
| --- | --- |
9+
| noBuildAndRestore | The Umbraco CI/CD Flow runs the deployment in an isolated instance before doing the actual deployment to cloud. In the isolated instance we will try to do a `Dotnet restore` and `Dotnet build` of the incoming solution. This is a safeguard to prevent CI/CD isolated instance from sending broken code to the Umbraco Cloud environment. Enabling this option will skip the `restore` and `build` process in the isolated instance. This can take a couple of minutes of the deployment process. The final deployment on the actual website still runs it's own Restore and Build, which cannot be skipped. |
10+
| skipVersionCheck | When deploying, we will do an automatic check for Cloud dependency downgrades. This is to prevent customers from downgrading the packages that may have been autou pgraded in Umbraco Cloud, by accident. Enabling this option will skip that check and let any deployments with downgraded packages through. This is generally not recommended |
11+
12+
13+
{% tabs %}
14+
{% tab title="Azure DevOps Bash" %}
15+
Locate the main entry pipeline file. It will usually be this one: `azure-release-pipeline.yaml`.
16+
17+
```yml
18+
# Deploy to Umbraco Cloud
19+
# ####
20+
# you can edit the variables noBuildAndRestore and skipVersionCheck
21+
# use booleans but as strings
22+
- stage: CloudDeploymentStage
23+
displayName: Deploy To Cloud
24+
dependsOn: cloudPrepareArtifact
25+
condition: in(dependencies.cloudPrepareArtifact.result, 'Succeeded')
26+
variables:
27+
artifactId: $[ stageDependencies.cloudPrepareArtifact.PrepareAndUploadArtifact.outputs['uploadArtifact.artifactId'] ]
28+
jobs:
29+
- template: cloud-deployment.yml
30+
parameters:
31+
artifactId: $(artifactId)
32+
noBuildAndRestore: 'false'
33+
skipVersionCheck: 'false'
34+
```
35+
36+
The fields: `noBuildAndRestore` and `skipVersionCheck` can be marked with a `'true'`.
37+
38+
39+
{% endtab %}
40+
{% tab title="Azure DevOps PowerShell" %}
41+
Locate the main entry pipeline file. It will usually be this one: `azure-release-pipeline.yaml`.
42+
43+
```yml
44+
# Deploy to Umbraco Cloud
45+
# ####
46+
# you can edit the variables noBuildAndRestore and skipVersionCheck
47+
# use booleans
48+
- stage: CloudDeploymentStage
49+
displayName: Deploy To Cloud
50+
dependsOn: cloudPrepareArtifact
51+
condition: in(dependencies.cloudPrepareArtifact.result, 'Succeeded')
52+
variables:
53+
artifactId: $[ stageDependencies.cloudPrepareArtifact.PrepareAndUploadArtifact.outputs['uploadArtifact.artifactId'] ]
54+
jobs:
55+
- template: cloud-deployment.yml
56+
parameters:
57+
artifactId: $(artifactId)
58+
noBuildAndRestore: false
59+
skipVersionCheck: false
60+
61+
```
62+
63+
The fields: `noBuildAndRestore` and `skipVersionCheck` can be marked with a `true`.
64+
65+
66+
{% endtab %}
67+
{% tab title="GitHub Actions Bash" %}
68+
Locate the main entry pipeline file. It will usually be this one: `main.yml`.
69+
70+
```yml
71+
# Deploy to Umbraco Cloud
72+
# ####
73+
# you can edit the variables noBuildAndRestore and skipVersionCheck
74+
# use booleans but as strings
75+
cloud-deployment:
76+
name: "Deploy to Cloud"
77+
needs: cloud-artifact
78+
uses: ./.github/workflows/cloud-deployment.yml
79+
with:
80+
artifactId: ${{ needs.cloud-artifact.outputs.artifactId }}
81+
targetEnvironmentAlias: ${{ vars.TARGET_ENVIRONMENT_ALIAS }}
82+
noBuildAndRestore: "false"
83+
skipVersionCheck: "false"
84+
secrets:
85+
projectId: ${{ secrets.PROJECT_ID }}
86+
umbracoCloudApiKey: ${{ secrets.UMBRACO_CLOUD_API_KEY }}
87+
```
88+
89+
The fields: `noBuildAndRestore` and `skipVersionCheck` can be marked with a `"true"`.
90+
91+
{% endtab %}
92+
{% tab title="GitHub Actions PowerShell" %}
93+
Locate the main entry pipeline file. It will usually be this one: `main.yml`.
94+
95+
```yml
96+
# Deploy to Umbraco Cloud
97+
# ####
98+
# you can edit the variables noBuildAndRestore and skipVersionCheck
99+
# use 0 for false and 1 for true
100+
cloud-deployment:
101+
name: "Deploy to Cloud"
102+
needs: cloud-artifact
103+
uses: ./.github/workflows/cloud-deployment.yml
104+
with:
105+
artifactId: ${{ needs.cloud-artifact.outputs.artifactId }}
106+
targetEnvironmentAlias: ${{ vars.TARGET_ENVIRONMENT_ALIAS }}
107+
noBuildAndRestore: 0
108+
skipVersionCheck: 0
109+
secrets:
110+
projectId: ${{ secrets.PROJECT_ID }}
111+
umbracoCloudApiKey: ${{ secrets.UMBRACO_CLOUD_API_KEY }}
112+
```
113+
114+
The fields: `noBuildAndRestore` and `skipVersionCheck` can be marked with a `1`.
115+
116+
{% endtab %}
117+
{% endtabs %}

umbraco-cloud/build-and-customize-your-solution/handle-deployments-and-environments/umbraco-cicd/samplecicdpipeline/azure-devops.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ If you have frontend assets that needs to be built (using tools like npm/yarn or
243243

244244
Please follow the above guide first.
245245

246+
* [Deployment options](advances-deployment-options.md)
246247
* [Deploy to multiple targets](advanced-multiple-targets.md)
247248

248249
## Further information

umbraco-cloud/build-and-customize-your-solution/handle-deployments-and-environments/umbraco-cicd/samplecicdpipeline/github-actions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ If you have frontend assets that needs to be built (using tools like npm/yarn or
275275

276276
Please follow the above guide first.
277277

278+
* [Deployment options](advances-deployment-options.md)
278279
* [Deploy to multiple targets](advanced-multiple-targets.md)
279280

280281
## Further information

0 commit comments

Comments
 (0)