Skip to content

Commit d54e513

Browse files
committed
Fixing task 1682134
1 parent 4075fe7 commit d54e513

File tree

1 file changed

+25
-18
lines changed

1 file changed

+25
-18
lines changed

articles/automation/source-control-integration.md

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.topic: conceptual
1010

1111
Source control integration in Azure Automation supports single-direction synchronization from your source control repository. Source control allows you to keep your runbooks in your Automation account up to date with scripts in your GitHub or Azure Repos source control repository. This feature makes it easy to promote code that has been tested in your development environment to your production Automation account.
1212

13-
Using source control integration, you can easily collaborate with your team, track changes, and roll back to earlier versions of your runbooks. For example, source control allows you to synchronize different branches in source control with your development, test, and production Automation accounts.
13+
Source control integration lets you easily collaborate with your team, track changes, and roll back to earlier versions of your runbooks. For example, source control allows you to synchronize different branches in source control with your development, test, and production Automation accounts.
1414

1515
>[!NOTE]
1616
>This article has been updated to use the new Azure PowerShell Az module. You can still use the AzureRM module, which will continue to receive bug fixes until at least December 2020. To learn more about the new Az module and AzureRM compatibility, see [Introducing the new Azure PowerShell Az module](https://docs.microsoft.com/powershell/azure/new-azureps-module-az?view=azps-3.5.0). For Az module installation instructions on your Hybrid Runbook Worker, see [Install the Azure PowerShell Module](https://docs.microsoft.com/powershell/azure/install-az-ps?view=azps-3.5.0). For your Automation account, you can update your modules to the latest version using [How to update Azure PowerShell modules in Azure Automation](automation-update-azure-modules.md).
@@ -36,11 +36,11 @@ Azure Automation supports three types of source control:
3636

3737
This section tells how to configure source control for your Automation account. You can use either the Azure portal or PowerShell.
3838

39-
### Configure source control -- Azure portal
39+
### Configure source control in Azure portal
4040

4141
Use this procedure to configure source control using the Azure portal.
4242

43-
1. Within your Automation account, select **Source Control** and click **+ Add**.
43+
1. In your Automation account, select **Source Control** and click **Add**.
4444

4545
![Select source control](./media/source-control-integration/select-source-control.png)
4646

@@ -66,14 +66,14 @@ Use this procedure to configure source control using the Azure portal.
6666
![Source control summary](./media/source-control-integration/source-control-summary.png)
6767

6868
> [!NOTE]
69-
> The login for your source control repository might be different from your login for the Azure portal. Ensure that you are logged in with the correct account for your source control repository when configuring source control. If there is a doubt, open a new tab in your browser, log out from **visualstudio.com** or **github.com**, and try connecting to source control again.
69+
> The login for your source control repository might be different from your login for the Azure portal. Ensure that you are logged in with the correct account for your source control repository when configuring source control. If there is a doubt, open a new tab in your browser, log out from **dev.azure.com**, **visualstudio.com**, or **github.com**, and try reconnecting to source control.
7070
71-
### Configure source control -- PowerShell
71+
### Configure source control in PowerShell
7272

7373
You can also use PowerShell to configure source control in Azure Automation. To use the PowerShell cmdlets for this operation, you need a personal access token (PAT). Use the [New-AzAutomationSourceControl](https://docs.microsoft.com/powershell/module/az.automation/new-azautomationsourcecontrol?view=azps-3.5.0
7474
) cmdlet to create the source control connection. This cmdlet requires a secure string for the PAT. To learn how to create a secure string, see [ConvertTo-SecureString](/powershell/module/microsoft.powershell.security/convertto-securestring?view=powershell-6).
7575

76-
The following subsections illustrate PowerShell creation of the source control connection for GitHub, Azure Repos (Git), and Azure Repos (TFVC).
76+
The following subsections illustrate PowerShell creation of the source control connection for GitHub, Azure Repos (Git), and Azure Repos (TFVC).
7777

7878
#### Create source control connection for GitHub
7979

@@ -83,14 +83,21 @@ New-AzAutomationSourceControl -Name SCGitHub -RepoUrl https://github.com/<accoun
8383

8484
#### Create source control connection for Azure Repos (Git)
8585

86+
> [!NOTE]
87+
> Azure Repos (Git) uses a URL that accesses **dev.azure.com** instead of **visualstudio.com**, used in earlier formats. The older URL format `https://<accountname>.visualstudio.com/<projectname>/_git/<repositoryname>` is deprecated but still supported. The new format is preferred.
88+
89+
8690
```powershell-interactive
87-
New-AzAutomationSourceControl -Name SCReposGit -RepoUrl https://<accountname>.visualstudio.com/<projectname>/_git/<repositoryname> -SourceType VsoGit -AccessToken <secureStringofPAT> -Branch master -ResourceGroupName <ResourceGroupName> -AutomationAccountName <AutomationAccountName> -FolderPath "/Runbooks"
91+
New-AzAutomationSourceControl -Name SCReposGit -RepoUrl https://dev.azure.com/<accountname>/<adoprojectname>/_git/<repositoryname> -SourceType VsoGit -AccessToken <secureStringofPAT> -Branch master -ResourceGroupName <ResourceGroupName> -AutomationAccountName <AutomationAccountName> -FolderPath "/Runbooks"
8892
```
8993

9094
#### Create source control connection for Azure Repos (TFVC)
9195

96+
> [!NOTE]
97+
> Azure Repos (TFVC) uses a URL that accesses **dev.azure.com** instead of **visualstudio.com**, used in earlier formats. The older URL format `https://<accountname>.visualstudio.com/<projectname>/_versionControl` is deprecated but still supported. The new format is preferred.
98+
9299
```powershell-interactive
93-
New-AzAutomationSourceControl -Name SCReposTFVC -RepoUrl https://<accountname>.visualstudio.com/<projectname>/_versionControl -SourceType VsoTfvc -AccessToken <secureStringofPAT> -ResourceGroupName <ResourceGroupName> -AutomationAccountName <AutomationAccountName> -FolderPath "/Runbooks"
100+
New-AzAutomationSourceControl -Name SCReposTFVC -RepoUrl https://dev.azure.com/<accountname>/<adoprojectname>/_git/<repositoryname> -SourceType VsoTfvc -AccessToken <secureStringofPAT> -ResourceGroupName <ResourceGroupName> -AutomationAccountName <AutomationAccountName> -FolderPath "/Runbooks"
94101
```
95102

96103
#### Personal access token (PAT) permissions
@@ -117,14 +124,14 @@ The following list defines the minimum PAT permissions required for Azure Repos.
117124

118125
| Scope | Access Type |
119126
|---------| ----------|
120-
| Code | Read |
121-
| Project and team | Read |
122-
| Identity | Read |
123-
| User profile | Read |
124-
| Work items | Read |
125-
| Service connections | Read, query, manage<sup>1</sup> |
127+
| `Code` | Read |
128+
| `Project and team` | Read |
129+
| `Identity` | Read |
130+
| `User profile` | Read |
131+
| `Work items` | Read |
132+
| `Service connections` | Read, query, manage<sup>1</sup> |
126133

127-
<sup>1</sup> The Service connections permission is only required if you have enabled autosync.
134+
<sup>1</sup> The `Service connections` permission is only required if you have enabled autosync.
128135

129136
## Synchronizing
130137

@@ -143,7 +150,7 @@ Follow these steps to synchronize with source control.
143150
5. Clicking on a job allows you to view the job output. The following example is the output from a source control sync job.
144151

145152
```output
146-
============================================================================
153+
===================================================================
147154
148155
Azure Automation Source Control.
149156
Supported runbooks to sync: PowerShell Workflow, PowerShell Scripts, DSC Configurations, Graphical, and Python 2.
@@ -168,7 +175,7 @@ Follow these steps to synchronize with source control.
168175
- ExampleRunbook1.ps1
169176
- ExampleRunbook2.ps1
170177
171-
=========================================================================
178+
==================================================================
172179
173180
```
174181
@@ -190,7 +197,7 @@ If multiple people are editing runbooks in your source control repository using
190197
191198
## Updating the PAT
192199
193-
Currently, there is no way to use the Azure portal to update the PAT in source control. After your PAT has expired or been revoked, you can update source control with a new access token in one of these ways:
200+
Currently, you can't use the Azure portal to update the PAT in source control. When your PAT is expired or revoked, you can update source control with a new access token in one of these ways:
194201
195202
* Use the [REST API](https://docs.microsoft.com/rest/api/automation/sourcecontrol/update).
196203
* Use the [Update-AzAutomationSourceControl](/powershell/module/az.automation/update-azautomationsourcecontrol) cmdlet.

0 commit comments

Comments
 (0)