Skip to content

Commit

Permalink
Update Helm Pipelines to use 3.7.1 (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesrcounts authored Dec 7, 2021
1 parent 6045812 commit 24db8e0
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 92 deletions.
4 changes: 0 additions & 4 deletions captainkube/azure-pipelines.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ variables:
value: 1
- name: namespace
value: charts
- name: artifact
value: "$(LOGIN_SERVER)/$(namespace)/$(containerRepository):$(chartTag)"
- name: local_chart_path
value: "$(containerRepository)-$(chartTag)"

stages:
- template: '../pipeline-templates/helm-deployment.yml'
Expand Down
55 changes: 1 addition & 54 deletions captainkube/azure-pipelines.helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,59 +20,6 @@ variables:
value: charts
- name: HELM_EXPERIMENTAL_OCI
value: 1
- name: artifact
value: "$(LOGIN_SERVER)/$(namespace)/$(containerRepository):$(Build.BuildNumber)"

stages:
- stage: Build
displayName: 'Package Helm Chart'
jobs:
- job: Helm
displayName: 'Build and Push Helm Chart'
pool:
vmImage: 'ubuntu-latest'

steps:
- checkout: self
fetchDepth: 1

- task: HelmInstaller@1
displayName: 'Initialize Helm'
inputs:
helmVersionToInstall: '3.6.0'

- task: Bash@3
displayName: 'Check Helm Chart'
inputs:
targetType: 'inline'
script: |
set -euo pipefail
helm lint $(chart_path) --strict
- task: Bash@3
displayName: 'Save Helm Chart'
inputs:
targetType: 'inline'
script: |
set -euo pipefail
helm chart save $(chart_path) $(artifact)
- task: AzureCLI@2
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
displayName: 'Push Helm Chart'
inputs:
addSpnToEnvironment: true
azureSubscription: 'AzureOps'
scriptLocation: 'inlineScript'
scriptType: 'bash'
inlineScript: |
set -euo pipefail
echo $servicePrincipalKey | \
helm registry login $(LOGIN_SERVER) \
--username $servicePrincipalId \
--password-stdin
helm chart push $(artifact)
- template: '../pipeline-templates/helm-package.yml'
4 changes: 0 additions & 4 deletions nodebrady/azure-pipelines.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ variables:
value: 1
- name: namespace
value: charts
- name: artifact
value: "$(LOGIN_SERVER)/$(namespace)/$(containerRepository):$(chartTag)"
- name: local_chart_path
value: "$(containerRepository)-$(chartTag)"

stages:
- template: '../pipeline-templates/helm-deployment.yml'
Expand Down
2 changes: 0 additions & 2 deletions nodebrady/azure-pipelines.helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ variables:
value: charts
- name: HELM_EXPERIMENTAL_OCI
value: 1
- name: artifact
value: "$(LOGIN_SERVER)/$(namespace)/$(containerRepository):$(Build.BuildNumber)"

stages:
- template: '../pipeline-templates/helm-package.yml'
4 changes: 0 additions & 4 deletions parrot/azure-pipelines.deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ variables:
value: 1
- name: namespace
value: charts
- name: artifact
value: "$(LOGIN_SERVER)/$(namespace)/$(containerRepository):$(chartTag)"
- name: local_chart_path
value: "$(containerRepository)-$(chartTag)"

stages:
- template: '../pipeline-templates/helm-deployment.yml'
Expand Down
2 changes: 0 additions & 2 deletions parrot/azure-pipelines.helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ variables:
value: charts
- name: HELM_EXPERIMENTAL_OCI
value: 1
- name: artifact
value: "$(LOGIN_SERVER)/$(namespace)/$(containerRepository):$(Build.BuildNumber)"
- name: chart_path
value: parrot/src/parrot/charts/parrot

Expand Down
4 changes: 0 additions & 4 deletions phippy/azure-pipelines.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ variables:
value: 1
- name: namespace
value: charts
- name: artifact
value: "$(LOGIN_SERVER)/$(namespace)/$(containerRepository):$(chartTag)"
- name: local_chart_path
value: "$(containerRepository)-$(chartTag)"

stages:
- template: '../pipeline-templates/helm-deployment.yml'
Expand Down
2 changes: 0 additions & 2 deletions phippy/azure-pipelines.helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ variables:
value: charts
- name: HELM_EXPERIMENTAL_OCI
value: 1
- name: artifact
value: "$(LOGIN_SERVER)/$(namespace)/$(containerRepository):$(Build.BuildNumber)"

stages:
- template: '../pipeline-templates/helm-package.yml'
16 changes: 4 additions & 12 deletions pipeline-templates/helm-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ stages:
- task: HelmInstaller@1
displayName: 'Pin Helm Version'
inputs:
helmVersionToInstall: '3.6.0'
helmVersionToInstall: '3.7.1'

- task: AzureCLI@2
displayName: 'Prepare Deployment'
Expand Down Expand Up @@ -67,15 +67,6 @@ stages:
--username $servicePrincipalId \
--password-stdin
echo "Retrieve Artifact"
helm chart pull $(artifact)
echo "Unpack Artifact"
helm chart export "$(artifact)" --destination ./${CHART_PATH}
echo "Sanity Check"
helm show chart ./${CHART_PATH}/$(containerRepository)
- task: HelmDeploy@0
displayName: 'Deploy Helm Chart'
inputs:
Expand All @@ -86,7 +77,8 @@ stages:
useClusterAdmin: true
namespace: 'apps'
command: 'upgrade'
chartType: 'FilePath'
chartPath: './$(local_chart_path)/$(containerRepository)'
chartType: 'Name'
chartName: 'oci://$(LOGIN_SERVER)/$(namespace)/$(containerRepository)'
releaseName: '$(containerRepository)'
overrideValues: $(overrideValues)
arguments: '--version $(chartTag)'
8 changes: 4 additions & 4 deletions pipeline-templates/helm-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ stages:
- task: HelmInstaller@1
displayName: 'Pin Helm Version'
inputs:
helmVersionToInstall: '3.6.0'
helmVersionToInstall: '3.7.1'

- task: Bash@3
displayName: 'Check Helm Chart'
Expand All @@ -26,13 +26,13 @@ stages:
helm lint $(chart_path) --strict
- task: Bash@3
displayName: 'Save Helm Chart'
displayName: 'Package Helm Chart'
inputs:
targetType: 'inline'
script: |
set -euo pipefail
helm chart save $(chart_path) $(artifact)
helm package $(chart_path) --version $(Build.BuildNumber)
- task: AzureCLI@2
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
Expand All @@ -50,4 +50,4 @@ stages:
--username $servicePrincipalId \
--password-stdin
helm chart push $(artifact)
helm push $(System.DefaultWorkingDirectory)/$(containerRepository)-$(Build.BuildNumber).tgz oci://$(LOGIN_SERVER)/$(namespace)

0 comments on commit 24db8e0

Please sign in to comment.