Skip to content

Commit

Permalink
Initial back-port from baloise generic-chart (preparing 4.0.0 release)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolas Philips committed Aug 12, 2023
1 parent 5abcfff commit 46f6c61
Show file tree
Hide file tree
Showing 74 changed files with 2,825 additions and 390 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.tgz
*.lock
*.iml
.idea/
.idea/
.project
1 change: 1 addition & 0 deletions charts/generic-chart/.helmignore → .helmignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
.idea/
*.tmproj
.vscode/
tests/
2 changes: 1 addition & 1 deletion charts/generic-chart/Chart.yaml → Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
apiVersion: v2
name: generic-chart
version: 2.3.0
version: 4.0.0-alpha
65 changes: 65 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
@Library('jenkins-shared-library@release') _

pipeline {

agent {
kubernetes(agents().helm().startContainers())
}

options {
skipStagesAfterUnstable()
disableConcurrentBuilds()
buildDiscarder(logRotator(numToKeepStr: '28'))
timeout(time: 1, unit: 'HOURS')
timestamps()
}

stages {
stage("Helm Lint") {
steps {
helmLint()
}
}

stage("Helm Test") {
steps {
container("helm") {
sh 'helm unittest -o test-results.xml -t junit -3 $(find tests/**/test.yaml | sed \'s:tests/:-f tests/:g\') .'
}
}
post {
always {
junit 'test-results.xml'
}
}
}

stage("Helm Push") {
when {
not {
branch 'master'
}
}
steps {
script {
def version = "3.0.0-${GIT_COMMIT}"
currentBuild.displayName = version
helmPush tenant: 'shared', version: version
}
}
}

stage("Helm Release") {
when {
branch 'master'
}
steps {
script {
def chart = readYaml file: 'Chart.yaml'
currentBuild.displayName = chart.version
helmPush tenant: 'shared'
}
}
}
}
}
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
current_dir := $(shell pwd)
helm3_image := docker.io/baloisegroup/helm:v3.12.3
helm_command := docker run --rm -w /apps/ -v $(current_dir):/apps $(helm3_image)
tests_args := $(shell find tests/**/test.yaml | sed 's:tests/:-f tests/:g')

test:
$(helm_command) unittest $(tests_args) .

test-update:
$(helm_command) unittest -u $(tests_args) .

template:
$(helm_command) template -f values.yaml -f .values-example.yaml example-app .
178 changes: 126 additions & 52 deletions README.md

Large diffs are not rendered by default.

37 changes: 0 additions & 37 deletions charts/generic-chart/templates/_helpers.tpl

This file was deleted.

132 changes: 0 additions & 132 deletions charts/generic-chart/templates/deployment.yaml

This file was deleted.

33 changes: 0 additions & 33 deletions charts/generic-chart/templates/ingress-route.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions charts/generic-chart/templates/serviceaccount.yaml

This file was deleted.

6 changes: 3 additions & 3 deletions examples/app-test/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: app-test
version: 1.0.0
dependencies:
- name: generic-chart
version: 2.3.0
repository: https://baloise-incubator.github.io/generic-chart/
- name: generic-chart
version: 3.14.0
repository: https://charts.shapp.os1.balgroupit.com/shared/release/
alias: app
6 changes: 4 additions & 2 deletions examples/app-test/values.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
app:
replicaCount: 2
revisionHistoryLimit: 1
image:
repository: nginx:1.19.1
repository: example/nginx-sample
tag: latest
pullPolicy: IfNotPresent
network:
http:
servicePort: 8080
ingress:
host: demo.apps.example.tld
host: example.org
readinessProbe:
httpGet:
path: /
Expand Down
8 changes: 8 additions & 0 deletions examples/sidecar/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v2
name: app-test
version: 1.0.0
dependencies:
- name: generic-chart
version: 3.14.0
repository: https://baloise-charts.github.io/
alias: app
Loading

0 comments on commit 46f6c61

Please sign in to comment.