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
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ variables:
kustomizePath: ./overlays/production
namespace: default
buildContextPath: .
dockerfile: ./Dockerfile
tag: "$(Build.BuildId)"
vmImageName: "ubuntu-latest"

Expand All @@ -35,8 +36,8 @@ stages:
scriptType: "bash"
scriptLocation: "inlineScript"
inlineScript: |
az acr build --image $1.azurecr.io/$2:$3 --registry $1 -g $4 $(buildContextPath)
arguments: "$(azureContainerRegistry) $(containerName) $(tag) $(acrRg)"
az acr build --image $1.azurecr.io/$2:$3 --registry $1 -g $4 -f $5 $6
arguments: "$(azureContainerRegistry) $(containerName) $(tag) $(acrRg) $(dockerfile) $(buildContextPath)"

- stage: Deploy
displayName: Deploy stage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ variables:
clusterRg: myrg
acrRg: myrg
clusterName: testcluster
manifestPath: ./manifests
manifestPath: ./manifests/*
namespace: default
buildContextPath: .
dockerfile: ./Dockerfile
tag: "$(Build.BuildId)"
vmImageName: "ubuntu-latest"

Expand All @@ -35,8 +36,8 @@ stages:
scriptType: "bash"
scriptLocation: "inlineScript"
inlineScript: |
az acr build --image $1.azurecr.io/$2:$3 --registry $1 -g $4 $(buildContextPath)
arguments: "$(azureContainerRegistry) $(containerName) $(tag) $(acrRg)"
az acr build --image $1.azurecr.io/$2:$3 --registry $1 -g $4 -f $5 $6
arguments: "$(azureContainerRegistry) $(containerName) $(tag) $(acrRg) $(dockerfile) $(buildContextPath)"

- stage: Deploy
displayName: Deploy stage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ variables:
kustomizePath: {{ .Config.GetVariableValue "KUSTOMIZEPATH" }}
namespace: {{ .Config.GetVariableValue "NAMESPACE" }}
buildContextPath: {{ .Config.GetVariableValue "BUILDCONTEXTPATH" }}
dockerfile: {{ .Config.GetVariableValue "DOCKERFILE" }}
tag: "$(Build.BuildId)"
vmImageName: "ubuntu-latest"

Expand All @@ -35,8 +36,8 @@ stages:
scriptType: "bash"
scriptLocation: "inlineScript"
inlineScript: |
az acr build --image $1.azurecr.io/$2:$3 --registry $1 -g $4 $(buildContextPath)
arguments: "$(azureContainerRegistry) $(containerName) $(tag) $(acrRg)"
az acr build --image $1.azurecr.io/$2:$3 --registry $1 -g $4 -f $5 $6
arguments: "$(azureContainerRegistry) $(containerName) $(tag) $(acrRg) $(dockerfile) $(buildContextPath)"

- stage: Deploy
displayName: Deploy stage
Expand Down
7 changes: 7 additions & 0 deletions template/azurePipelines/kustomize/draft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,10 @@ variables:
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"
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ variables:
manifestPath: {{ .Config.GetVariableValue "MANIFESTPATH" }}
namespace: {{ .Config.GetVariableValue "NAMESPACE" }}
buildContextPath: {{ .Config.GetVariableValue "BUILDCONTEXTPATH" }}
dockerfile: {{ .Config.GetVariableValue "DOCKERFILE" }}
tag: "$(Build.BuildId)"
vmImageName: "ubuntu-latest"

Expand All @@ -35,8 +36,8 @@ stages:
scriptType: "bash"
scriptLocation: "inlineScript"
inlineScript: |
az acr build --image $1.azurecr.io/$2:$3 --registry $1 -g $4 $(buildContextPath)
arguments: "$(azureContainerRegistry) $(containerName) $(tag) $(acrRg)"
az acr build --image $1.azurecr.io/$2:$3 --registry $1 -g $4 -f $5 $6
arguments: "$(azureContainerRegistry) $(containerName) $(tag) $(acrRg) $(dockerfile) $(buildContextPath)"

- stage: Deploy
displayName: Deploy stage
Expand Down
9 changes: 8 additions & 1 deletion template/azurePipelines/manifests/draft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ variables:
kind: "dirPath"
default:
disablePrompt: true
value: "./manifests"
value: "./manifests/*"
description: "the path to the Kubernetes deployment manifest"
versions: ">=0.0.1"
- name: "NAMESPACE"
Expand All @@ -70,3 +70,10 @@ variables:
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"
Loading