Skip to content

Commit 48c340a

Browse files
authored
Fix grammar
1 parent 04bcb01 commit 48c340a

File tree

1 file changed

+32
-22
lines changed

1 file changed

+32
-22
lines changed

umbraco-cloud/set-up/project-settings/umbraco-cicd/samplecicdpipeline/advanced-multiple-targets.md

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Deploy to multiple targets
2-
In this example we will show how to target deployments to more than one environment.
32

4-
The sample will make it possible for you to work on two different branches where each branch will deploy to a different environment.
3+
In this example, you will learn how to target deployments to more than one environment.
4+
5+
The sample will enable you to work on two different branches, where each branch will deploy to a different environment.
56

67
{% hint style="info" %}
7-
With the CI/CD flow you can trigger deployments to multiple environments at the same time.
8+
With the CI/CD flow, you can trigger deployments to multiple environments at the same time.
89

910
If there is already a deployment in progress to a named environment, it will not be possible to trigger another until the first is done.
1011
{% endhint %}
@@ -13,20 +14,24 @@ If there is already a deployment in progress to a named environment, it will not
1314
{% tab title="Azure DevOps" %}
1415

1516
Replace the `azure-release-pipeline.yaml` with the one called `azure-release-pipeline-more-targets.yaml`. It's okay to rename `azure-release-pipeline-more-targets.yaml`.
16-
It's locations in the samples scripts are:
17-
- For bash: `/V2/bash/azuredevops/advanded`
18-
- For PowerShell: `/V2/powershell/azuredevops/advanded`
1917

20-
Make sure you don't have multiple yaml files which contains triggers (unless you designed your pipelines workflow that way).
18+
Its locations in the sample scripts are:
19+
20+
- Bash: `/V2/bash/azuredevops/advanced`
21+
- PowerShell: `/V2/powershell/azuredevops/advanced`
22+
23+
Make sure you don't have multiple YAML files that contain triggers (unless you designed your pipeline's workflow that way).
2124

22-
Now you need the aliases of the environments you want to target.
25+
Now you need the aliases of the environments you want to target.
2326

24-
Insert the aliases into the placeholders in `azure-release-pipeline-more-targets.yaml`, the values you need to replace are:
27+
Insert the aliases into the placeholders in `azure-release-pipeline-more-targets.yaml`, the values you need to replace are:
28+
2529
- `##Your target environment alias here##`
2630
- `##Your other target environment alias here##`
27-
- Also remember to fix the projectId placeholder if you haven't already: `##Your project Id here##`
31+
32+
Remember to fix the projectId placeholder if you haven't already: `##Your project ID here##`
2833

29-
Next look at the triggers for the pipeline:
34+
Next, look at the triggers for the pipeline:
3035

3136
```yml
3237
# Trigger when committing to main or flexible branch
@@ -38,9 +43,10 @@ trigger:
3843
- flexible
3944
```
4045
41-
Here you can change when a deployment is trigger based on which branch is pushed to.
46+
Here, you can change when a deployment is triggered based on which branch is pushed to.
4247
4348
The pipeline needs to resolve the target based on the triggering branch, which is done in the following code.
49+
4450
```yml
4551
stages:
4652
# resolve which environment to deploy to based on triggering branch
@@ -65,30 +71,33 @@ stages:
6571
```
6672
6773
The triggering branch is evaluated in the statement `if [ "$(Build.SourceBranchName)" = "main" ]; then` or `elif [ "$(Build.SourceBranchName)" = "flexible" ]; then`.
68-
The code will write which alias is targeted and write a pipeline variable (`targetEnvironment`). This variable is then used by later steps.
6974

70-
Note: When updating the triggering branch names it must be updated in the two mentioned places: In the trigger and in the script.
75+
The code will write which alias is targeted and write a pipeline variable (`targetEnvironment`). This variable is then used by later steps.
7176

77+
When updating the triggering branch names, it must be updated in the two mentioned places: In the trigger and in the script.
7278

7379
{% endtab %}
7480
{% tab title="GitHub Actions" %}
7581

7682
Replace the `main.yml` with the one called `main-more-targets.yml`. It's okay to rename `main-more-targets.yml`.
77-
It's locations in the samples scripts are:
78-
- For bash: `/V2/bash/github/advanced`
79-
- For PowerShell: `/V2/powershell/github/advanced`
8083

81-
Make sure you don't have multiple yaml files which contains triggers (unless you designed your pipelines workflow that way).
84+
Its locations in the sample scripts are:
85+
86+
- Bash: `/V2/bash/github/advanced`
87+
- PowerShell: `/V2/powershell/github/advanced`
88+
89+
Make sure you don't have multiple YAML files that contain triggers (unless you designed your pipeline's workflow that way).
90+
91+
Now you need the aliases of the environments you want to target.
8292

83-
Now you need the aliases of the environments you want to target.
8493
* Now go to the repository in GitHub, and click on the Settings section.
8594
* Expand secrets and variables in the left-hand menu titled `Security` and click on `Actions`.
8695
* Now go to the **Variables** tab
8796
* Add a `repository variable` called `FLEXIBLE_ENVIRONMENT_ALIAS` and enter the environment alias you selected earlier.
8897

8998
If you followed the [GitHub guide](github-actions.md) you should already have a variable called `TARGET_ENVIRONMENT_ALIAS`.
9099

91-
Next look at the triggers for the pipeline:
100+
Next, look at the triggers for the pipeline:
92101

93102
```yml
94103
# Trigger when committing to main branch
@@ -103,6 +112,7 @@ on:
103112
Here you can change when a deployment is trigger based on which branch is pushed to.
104113

105114
The pipeline needs to resolve the target based on the triggering branch, which is done in the following code.
115+
106116
```yml
107117
jobs:
108118
# resolve which environment to deploy to based on triggering branch
@@ -133,7 +143,7 @@ jobs:
133143
The triggering branch is evaluated in the statement `if [[ "${{ github.ref_name }}" == "main" ]]; then` or `elif [ "${{ github.ref_name }}" = "flexible" ]; then`.
134144
The code will write which alias is targeted and write a pipeline variable (`targetEnvironmentAlias`). This variable is then used by later jobs.
135145

136-
Note: When updating the triggering branch names it must be updated in the two mentioned places: In the trigger and in the script.
146+
When updating the triggering branch names, it must be updated in the two mentioned places: In the trigger and in the script.
137147

138148
{% endtab %}
139-
{% endtabs %}
149+
{% endtabs %}

0 commit comments

Comments
 (0)