You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: learn-pr/azure/build-first-azd-template/includes/2-create-template-structure.md
+17-8Lines changed: 17 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,24 +6,33 @@ The Azure Developer CLI (`azd`) assists you with building new templates for your
6
6
azd init
7
7
```
8
8
9
-
1. The command output displays a list of starter templates and full sample app options. The starter templates include the essential folder structure, starter infrastructure as code files, and other boilerplate configuration files to get started building templates. The full sample templates also include placeholder application code and the files needed to deploy them. For this module, you'll learn to build your own template rather than modifying existing app code, so choose the **Starter - Bicep** option from the list. The Azure Developer CLI also supports [using Terraform](/azure/developer/azure-developer-cli/use-terraform-for-azd) if you prefer that option. Terraform support is currently in alpha and must be [manually enabled](/azure/developer/azure-developer-cli/use-terraform-for-azd).
9
+
1. The command output displays three different choices for initializing an `azd` template:
10
+
11
+
- **Use code in the current directory**: Analyzes your app code to create and configure certain template assets for you.
12
+
- **Select a template**: Choose an existing starter template that includes the essential folder structure, starter infrastructure as code files, and other boilerplate configuration files to streamline building templates.
13
+
- **Create a minimal project**: Generates the minimum configuration files to get started.
14
+
15
+
Read more about these different choices in the [Create Azure Developer CLI templates overview](/azure/developer/azure-developer-cli/make-azd-compatible) documentation.
16
+
17
+
1. Choose the **Select a template** option and `azd` displays a pre-configured list of available templates.
18
+
1. Search for **Starter** and then select the **Starter - Bicep** option from the results list. The Azure Developer CLI also supports [using Terraform](/azure/developer/azure-developer-cli/use-terraform-for-azd) if you prefer that option. Terraform support is currently in alpha and must be [manually enabled](/azure/developer/azure-developer-cli/use-terraform-for-azd).
10
19
11
20
1. When prompted for an environment name, enter *azdlearn* or a name of your choosing. The environment name influences the naming of provisioned resources in Azure.
12
21
13
22
1. A set of folders is created inside of the current directory:
> You may have noticed the `azd init` command also provides a project template called **Minimal**, which contains the simplest possible template structure. However, the **Starter - Bicep** template you selected includes additional scaffolding code that is very useful but still technology agnostic, so it's often a great choice for getting started.
19
28
20
29
The generated folders provide all of the essential building blocks of an `azd` template:
21
30
22
-
* **.azdo** - A folder containing the starter `.yml` configuration files for CI/CD with Azure Pipelines.
23
-
* **.azure** - A folder containing essential settings for the template's Azure environment, such as the environment name.
24
-
* **.devcontainer** - A folder containing configuration files used to run the template in a dev container environment.
25
-
* **.github** - A folder containing a starter `.yml` configuration template to set up a CI/CD pipeline through GitHub actions.
26
-
* **infra** - A folder containing starter Bicep files for the template's infrastructure as code. If you selected the Terraform starter template, this folder contains Terraform files instead.
27
-
* **azure.yaml** - A file that describes how the parts of your application map to services in Azure.
31
+
- **.azure** - A folder containing essential settings for the template's Azure environment, such as the environment name.
32
+
- **.devcontainer** - A folder containing configuration files used to run the template in a dev container environment.
33
+
- **infra** - A folder containing starter Bicep files for the template's infrastructure as code. If you selected the Terraform starter template, this folder contains Terraform files instead.
34
+
- **azure.yaml** - A file that describes how the parts of your application map to services in Azure.
35
+
- **.gitignore** - A starter .gitignore file for excluding unwanted files from git version control.
36
+
- **README.md** - A starter README file that provides general guidance for the end user of the template.
28
37
29
38
This starter template contains most of what you need to create your own `azd` template. Over the next several units, you'll learn how to update these existing files and add new assets to build a complete template.
Copy file name to clipboardExpand all lines: learn-pr/azure/build-first-azd-template/includes/7-configure-cicd.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
-
You created a template and provisioned its resources on Azure. However, the previous workflows relied on manual commands to apply changes to your environment. The starter template also provides configuration files to further automate this process using a CI/CD pipeline with either GitHub Actions or Azure Pipelines. By configuring a CI/CD pipeline, you can automatically update your Azure environment with the latest changes simply by committing and pushing your changes to GitHub.
1
+
You created a template and provisioned its resources on Azure. However, the previous workflows relied on manual commands to apply changes to your environment. By configuring a CI/CD pipeline, you can automatically update your Azure environment with the latest changes simply by committing and pushing your changes to GitHub.
2
2
3
3
## Configure the pipeline
4
4
5
-
Most `azd` templates include CI/CD workflow files in either the `.github` folder for [GitHub Actions](/training/modules/introduction-to-github-actions/) or the `.azdo` folder for [Azure Pipelines](/training/paths/deploy-applications-with-azure-devops/) (or both). The sample template created in this module was initialized with both. These workflow files use a standard structure for their respective platforms, so an in-depth exploration of CI/CD workflow configurations is beyond the scope of this module. However, a deep understanding of GitHub Actions or Azure Pipelines isn't required to complete this module, since `azd` abstracts much of the work behind simple commands that use the workflow configuration files.
5
+
Most `azd` templates include CI/CD workflow files in either the `.github` folder for [GitHub Actions](/training/modules/introduction-to-github-actions/) or the `.azdo` folder for [Azure Pipelines](/training/paths/deploy-applications-with-azure-devops/) (or both). These workflow files use a standard structure for their respective platforms, so an in-depth exploration of CI/CD workflow configurations is beyond the scope of this module. However, a deep understanding of GitHub Actions or Azure Pipelines isn't required to complete this module, since `azd` abstracts much of the work behind simple commands that use the workflow configuration files.
6
6
7
7
The `azd` command and workflow to configure a CI/CD pipeline is the same regardless of whether you choose GitHub Actions or Azure Pipelines. A GitHub repository is required for you to be able to set up CI/CD. You can either create the new repository by forking the original `azd` template repository and setting it as a remote, or you can create a repo using `azd` during the pipeline configuration process, which is the approach you'll use in this example.
8
8
@@ -14,6 +14,9 @@ Complete the following steps to configure a CI/CD pipeline for your template:
14
14
azd pipeline config
15
15
```
16
16
17
+
1. Choose **GitHub** when `azd` prompts you to select a provider. Note that Azure DevOps is also provided as an option.
18
+
1. When prompted, enter *y* and press enter to instruct `azd` to create a default `azure-dev.yaml` file for you. `azure-dev.yaml` is a standard GitHub actions configuration file required to configure workflows such as a deployment pipeline. `azd` adds the the `azure-dev.yml` file to your project inside of a new `.github` folder. You can use the `azure-dev.yaml` file as-is or modify it to suit your needs.
19
+
17
20
1. If a GitHub origin isn't set for your project, `azd` asks how you would like to configure your remote repository. Select the option **Create a new private GitHub repository** and then enter a name for the new repo. `azd` completes the following tasks for you:
18
21
* Creates a GitHub repository and commits your project code to it.
19
22
* Creates and configures a service principal for the app on the Azure subscription.
0 commit comments