Skip to content

Commit

Permalink
Optionally skip SND deployment (#312)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnwatson484 authored Nov 19, 2024
1 parent d070ec3 commit c22ad93
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v-9.54.0
v-9.55.0
12 changes: 7 additions & 5 deletions vars/deployToCluster.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ void call(Map config=[:], Closure body={}) {

node {
try {
stage('Deploy Database') {
hasDatabase = database.runRemoteMigrations(config.environment, config.chartName, config.chartVersion)
}
stage('Deploy Helm chart') {
helm.deployRemoteChart(config.environment, config.namespace, config.chartName, config.chartVersion, config.helmChartRepoType)
if (config.environment != null) {
stage('Deploy Database') {
hasDatabase = database.runRemoteMigrations(config.environment, config.chartName, config.chartVersion)
}
stage('Deploy Helm chart') {
helm.deployRemoteChart(config.environment, config.namespace, config.chartName, config.chartVersion, config.helmChartRepoType)
}
}
stage('Trigger ADO pipelines') {
ado.triggerPipeline(config.namespace, config.chartName, config.chartVersion, hasDatabase)
Expand Down
10 changes: 7 additions & 3 deletions vars/deployToCluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
> The default deploy to cluster build configuration
`deployToCluster` represents a default build configuration for deploying a Helm
chart to a Kubernetes cluster. Below is an example of how this can be achieved.
chart to the SND Kubernetes cluster and subsequently triggering the Azure DevOps pipeline to production.

Below is an example of how this can be achieved.

```
@Library('defra-library@v-6') _
@Library('defra-library@v-9') _
deployToCluster environment: 'dev', namespace: 'ffc-demo', chartName: 'ffc-demo-web', chartVersion: '1.0.0', helmChartRepoType: 'acr'
deployToCluster environment: 'snd', namespace: 'ffc-demo', chartName: 'ffc-demo-web', chartVersion: '1.0.0', helmChartRepoType: 'acr'
```

If `environment` is not supplied then the deployment to Kubernetes will be skipped and the pipeline will only trigger the Azure DevOps pipeline.

0 comments on commit c22ad93

Please sign in to comment.