templateName: "azure-pipeline-kustomize"
description: "This template is used to create an Azure Pipeline for deploying an app to AKS using Kustomize"
versions: ["0.0.1"]
defaultVersion: "0.0.1"
type: "workflow"
variables:
  - name: "PIPELINENAME"
    type: "string"
    kind: "workflowName"
    default:
      value: "Build and deploy an app to AKS"
    description: "the name of the azure pipeline"
    versions: ">=0.0.1"
  - name: "BRANCHNAME"
    type: "string"
    kind: "repositoryBranch"
    default:
      value: "main"
    description: "the branch to trigger the pipeline"
    versions: ">=0.0.1"
  - name: "ARMSERVICECONNECTION"
    type: "string"
    kind: "azureServiceConnection"
    description: "the name of the Azure Resource Manager service connection"
    versions: ">=0.0.1"
  - name: "AZURECONTAINERREGISTRY"
    type: "string"
    kind: "azureContainerRegistry"
    description: "the name of the Azure Container Registry"
    versions: ">=0.0.1"
  - name: "CONTAINERNAME"
    type: "string"
    kind: "containerImageName"
    description: "the container image name"
    versions: ">=0.0.1"
  - name: "CLUSTERRESOURCEGROUP"
    type: "string"
    kind: "azureResourceGroup"
    description: "the AKS cluster resource group"
    versions: ">=0.0.1"
  - name: "ACRRESOURCEGROUP"
    type: "string"
    kind: "azureResourceGroup"
    description: "the ACR resource group"
    versions: ">=0.0.1"
  - name: "CLUSTERNAME"
    type: "string"
    kind: "azureManagedCluster"
    description: "the AKS cluster name"
    versions: ">=0.0.1"
  - name: "KUSTOMIZEPATH"
    type: "string"
    kind: "dirPath"
    default:
      disablePrompt: true
      value: "./overlays/production" # keeping this as default since draft generates the manifests in the overlays/production directory
    description: "the path to the Kustomize directory"
    versions: ">=0.0.1"
  - name: "NAMESPACE"
    type: "string"
    kind: "kubernetesNamespace"
    default:
      value: "default"
    description: "the Kubernetes namespace"
    versions: ">=0.0.1"
  - name: "BUILDCONTEXTPATH"
    type: "string"
    kind: "dirPath"
    default:
      value: "."
    description: "the path to the Docker build context"
    versions: ">=0.0.1"
  - name: "DOCKERFILE"
    type: "string"
    kind: "filePath"
    default:
      value: "./Dockerfile"
    description: "the path to the Dockerfile"
    versions: ">=0.0.1"
