Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pkg/fixtures/pipelines/kustomize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ variables:
namespace: testNamespace
tag: "$(Build.BuildId)"
vmImageName: "ubuntu-latest"
resourceType: Microsoft.ContainerService/managedClusters

trigger:
- main
Expand Down Expand Up @@ -64,5 +65,6 @@ stages:
kubernetesCluster: $(clusterName)
namespace: $(namespace)
manifests: $(bake.manifestsBundle)
resourceType: $(resourceType)
containers: |
$(azureContainerRegistry).azurecr.io/$(containerName):$(tag)
3 changes: 3 additions & 0 deletions pkg/fixtures/pipelines/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ variables:
namespace: testNamespace
tag: "$(Build.BuildId)"
vmImageName: "ubuntu-latest"
resourceType: Microsoft.ContainerService/managedClusters

name: testPipeline

Expand Down Expand Up @@ -46,6 +47,7 @@ stages:
pool:
vmImage: $(vmImageName)
steps:
- task: KubeloginInstaller@0
- task: KubernetesManifest@1
displayName: Deploy to Kubernetes cluster
inputs:
Expand All @@ -56,5 +58,6 @@ stages:
kubernetesCluster: $(clusterName)
manifests: $(manifestPath)
namespace: $(namespace)
resourceType: $(resourceType)
containers: |
$(azureContainerRegistry).azurecr.io/$(containerName):$(tag)
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ variables:
dockerfile: ./Dockerfile
tag: "$(Build.BuildId)"
vmImageName: "ubuntu-latest"
resourceType: Microsoft.ContainerService/managedClusters

trigger:
- main
Expand Down Expand Up @@ -66,5 +67,6 @@ stages:
kubernetesCluster: $(clusterName)
namespace: $(namespace)
manifests: $(bake.manifestsBundle)
resourceType: $(resourceType)
containers: |
$(azureContainerRegistry).azurecr.io/$(containerName):$(tag)
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ variables:
dockerfile: ./Dockerfile
tag: "$(Build.BuildId)"
vmImageName: "ubuntu-latest"
resourceType: Microsoft.ContainerService/managedClusters

name: Build and deploy an app to AKS

Expand Down Expand Up @@ -48,6 +49,7 @@ stages:
pool:
vmImage: $(vmImageName)
steps:
- task: KubeloginInstaller@0
- task: KubernetesManifest@1
displayName: Deploy to Kubernetes cluster
inputs:
Expand All @@ -58,5 +60,6 @@ stages:
kubernetesCluster: $(clusterName)
manifests: $(manifestPath)
namespace: $(namespace)
resourceType: $(resourceType)
containers: |
$(azureContainerRegistry).azurecr.io/$(containerName):$(tag)
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func TestAzureWorkflowKustomizeTemplates(t *testing.T) {
"CLUSTERRESOURCEGROUP": "myrg",
"ACRRESOURCEGROUP": "myrg",
"CLUSTERNAME": "testcluster",
"CLUSTERRESOURCETYPE": "Microsoft.ContainerService/managedClusters",
},
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func TestAzureWorkflowManifestTemplates(t *testing.T) {
"CLUSTERRESOURCEGROUP": "myrg",
"ACRRESOURCEGROUP": "myrg",
"CLUSTERNAME": "testcluster",
"CLUSTERRESOURCETYPE": "Microsoft.ContainerService/managedClusters",
},
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ variables:
dockerfile: {{ .Config.GetVariableValue "DOCKERFILE" }}
tag: "$(Build.BuildId)"
vmImageName: "ubuntu-latest"
resourceType: {{ .Config.GetVariableValue "CLUSTERRESOURCETYPE" }}
Comment thread
audrastump marked this conversation as resolved.

trigger:
- {{ .Config.GetVariableValue "BRANCHNAME" }}
Expand Down Expand Up @@ -66,6 +67,7 @@ stages:
kubernetesCluster: $(clusterName)
namespace: $(namespace)
manifests: $(bake.manifestsBundle)
resourceType: $(resourceType)
containers: |
$(azureContainerRegistry).azurecr.io/$(containerName):$(tag)
`}}
7 changes: 7 additions & 0 deletions template/azurePipelines/kustomize/draft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,10 @@ variables:
value: "./Dockerfile"
description: "the path to the Dockerfile"
versions: ">=0.0.1"
- name: "CLUSTERRESOURCETYPE"
type: "string"
kind: "clusterResourceType"
default:
value: "Microsoft.ContainerService/managedClusters"
description: "the Azure resource type for the AKS cluster"
versions: ">=0.0.1"
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ variables:
dockerfile: {{ .Config.GetVariableValue "DOCKERFILE" }}
tag: "$(Build.BuildId)"
vmImageName: "ubuntu-latest"
resourceType: {{ .Config.GetVariableValue "CLUSTERRESOURCETYPE" }}

name: {{ .Config.GetVariableValue "PIPELINENAME" }}

Expand Down Expand Up @@ -48,6 +49,7 @@ stages:
pool:
vmImage: $(vmImageName)
steps:
- task: KubeloginInstaller@0
- task: KubernetesManifest@1
displayName: Deploy to Kubernetes cluster
inputs:
Expand All @@ -58,6 +60,7 @@ stages:
kubernetesCluster: $(clusterName)
manifests: $(manifestPath)
namespace: $(namespace)
resourceType: $(resourceType)
containers: |
$(azureContainerRegistry).azurecr.io/$(containerName):$(tag)
`}}
7 changes: 7 additions & 0 deletions template/azurePipelines/manifests/draft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ variables:
kind: "azureManagedCluster"
description: "the AKS cluster name"
versions: ">=0.0.1"
- name: "CLUSTERRESOURCETYPE"
type: "string"
kind: "clusterResourceType"
default:
value: "Microsoft.ContainerService/managedClusters"
description: "the Azure resource type for the AKS cluster"
versions: ">=0.0.1"
- name: "MANIFESTPATH"
type: "string"
kind: "dirPath"
Expand Down
Loading