Skip to content

Commit 5d9ef8d

Browse files
authored
Merge pull request #97516 from dlepow/acrfix
[ACR] Git contexts for tasks
2 parents fd57217 + 9622bf6 commit 5d9ef8d

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

articles/container-registry/container-registry-tasks-overview.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Learn how to use quick tasks in the first ACR Tasks tutorial, [Build container i
4747
4848
## Trigger task on source code update
4949

50-
Trigger a container image build or multi-step task when code is committed, or a pull request is made or updated, to a Git repository in GitHub or Azure DevOps. For example, configure a build task with the Azure CLI command [az acr task create][az-acr-task-create] by specifying a Git repository and optionally a branch and Dockerfile. When your team updates code in the repository, an ACR Tasks-created webhook triggers a build of the container image defined in the repo.
50+
Trigger a container image build or multi-step task when code is committed, or a pull request is made or updated, to a public or private Git repository in GitHub or Azure DevOps. For example, configure a build task with the Azure CLI command [az acr task create][az-acr-task-create] by specifying a Git repository and optionally a branch and Dockerfile. When your team updates code in the repository, an ACR Tasks-created webhook triggers a build of the container image defined in the repo.
5151

5252
ACR Tasks supports the following triggers when you set a Git repo as the task's context:
5353

@@ -56,7 +56,10 @@ ACR Tasks supports the following triggers when you set a Git repo as the task's
5656
| Commit | Yes |
5757
| Pull request | No |
5858

59-
To configure the trigger, you provide the task a personal access token (PAT) to set the webhook in the GitHub or Azure DevOps repo.
59+
To configure a source code update trigger, you need to provide the task a personal access token (PAT) to set the webhook in the public or private GitHub or Azure DevOps repo.
60+
61+
> [!NOTE]
62+
> Currently, ACR Tasks doesn't support commit or pull request triggers in GitHub Enterprise repos.
6063
6164
Learn how to trigger builds on source code commit in the second ACR Tasks tutorial, [Automate container image builds with Azure Container Registry Tasks](container-registry-tutorial-build-task.md).
6265

@@ -111,12 +114,15 @@ The following table shows a few examples of supported context locations for ACR
111114
| Context location | Description | Example |
112115
| ---------------- | ----------- | ------- |
113116
| Local filesystem | Files within a directory on the local filesystem. | `/home/user/projects/myapp` |
114-
| GitHub master branch | Files within the master (or other default) branch of a GitHub repository. | `https://github.com/gituser/myapp-repo.git` |
115-
| GitHub branch | Specific branch of a GitHub repo.| `https://github.com/gituser/myapp-repo.git#mybranch` |
116-
| GitHub subfolder | Files within a subfolder in a GitHub repo. Example shows combination of a branch and subfolder specification. | `https://github.com/gituser/myapp-repo.git#mybranch:myfolder` |
117-
| Azure DevOps subfolder | Files within a subfolder in an Azure repo. Example shows combination of branch and subfolder specification. | `https://dev.azure.com/user/myproject/_git/myapp-repo#mybranch:myfolder` |
117+
| GitHub master branch | Files within the master (or other default) branch of a public or private GitHub repository. | `https://github.com/gituser/myapp-repo.git` |
118+
| GitHub branch | Specific branch of a public or private GitHub repo.| `https://github.com/gituser/myapp-repo.git#mybranch` |
119+
| GitHub subfolder | Files within a subfolder in a public or private GitHub repo. Example shows combination of a branch and subfolder specification. | `https://github.com/gituser/myapp-repo.git#mybranch:myfolder` |
120+
| Azure DevOps subfolder | Files within a subfolder in a public or private Azure repo. Example shows combination of branch and subfolder specification. | `https://dev.azure.com/user/myproject/_git/myapp-repo#mybranch:myfolder` |
118121
| Remote tarball | Files in a compressed archive on a remote webserver. | `http://remoteserver/myapp.tar.gz` |
119122

123+
> [!NOTE]
124+
> When using a private Git repo as a context for a task, you need to provide a personal access token (PAT).
125+
120126
## Image platforms
121127

122128
By default, ACR Tasks builds images for the Linux OS and the amd64 architecture. Specify the `--platform` tag to build Windows images or Linux images for other architectures. Specify the OS and optionally a supported architecture in OS/architecture format (for example, `--platform Linux/arm`). For ARM architectures, optionally specify a variant in OS/architecture/variant format (for example, `--platform Linux/arm64/v8`):

articles/container-registry/container-registry-tutorial-build-task.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ ms.custom: "seodec18, mvc"
1010

1111
# Tutorial: Automate container image builds in the cloud when you commit source code
1212

13-
In addition to a [quick task](container-registry-tutorial-quick-task.md), ACR Tasks supports automated Docker container image builds in the cloud when you commit source code to a Git repository.
13+
In addition to a [quick task](container-registry-tutorial-quick-task.md), ACR Tasks supports automated Docker container image builds in the cloud when you commit source code to a Git repository. Supported Git contexts for ACR Tasks include public or private GitHub or Azure repos.
14+
15+
> [!NOTE]
16+
> Currently, ACR Tasks doesn't support commit or pull request triggers in GitHub Enterprise repos.
1417
1518
In this tutorial, your ACR task builds and pushes a single container image specified in a Dockerfile when you commit source code to a Git repo. To create a [multi-step task](container-registry-tasks-multi-step.md) that uses a YAML file to define steps to build, push, and optionally test multiple containers on code commit, see [Tutorial: Run a multi-step container workflow in the cloud when you commit source code](container-registry-tutorial-multistep-task.md). For an overview of ACR Tasks, see [Automate OS and framework patching with ACR Tasks](container-registry-tasks-overview.md)
1619

0 commit comments

Comments
 (0)