From 203aa95f61b956c541bdb811e5f4eb1b66456c9e Mon Sep 17 00:00:00 2001 From: zhenyus Date: Tue, 11 Feb 2025 12:11:41 +0800 Subject: [PATCH] feat(helm): add common Helm chart and templates for service development fix(pipeline): update image names for frontend and backend in Jenkinsfile Signed-off-by: zhenyus --- first-class-pipeline/helm/common/.helmignore | 17 +++++++++++++++++ first-class-pipeline/helm/common/Chart.yaml | 12 ++++++++++++ .../helm/common/templates/_names.tpl | 10 ++++++++++ first-class-pipeline/tests/Jenkinsfile | 4 ++-- 4 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 first-class-pipeline/helm/common/.helmignore create mode 100644 first-class-pipeline/helm/common/Chart.yaml create mode 100644 first-class-pipeline/helm/common/templates/_names.tpl diff --git a/first-class-pipeline/helm/common/.helmignore b/first-class-pipeline/helm/common/.helmignore new file mode 100644 index 00000000..fdc05a56 --- /dev/null +++ b/first-class-pipeline/helm/common/.helmignore @@ -0,0 +1,17 @@ +.DS_Store +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +*.swp +*.bak +*.tmp +*~ +.project +.idea/ +*.tmproj +.vscode/ +img/ \ No newline at end of file diff --git a/first-class-pipeline/helm/common/Chart.yaml b/first-class-pipeline/helm/common/Chart.yaml new file mode 100644 index 00000000..d3e16436 --- /dev/null +++ b/first-class-pipeline/helm/common/Chart.yaml @@ -0,0 +1,12 @@ +annotations: + category: "infra" +apiVersion: v2 +appVersion: 0.0.1 +version: 0.0.1 +description: "A Helm charts for common templates to accelerate the development of service templates." +name: common +keywords: + - common + - infra + - templates + - helper diff --git a/first-class-pipeline/helm/common/templates/_names.tpl b/first-class-pipeline/helm/common/templates/_names.tpl new file mode 100644 index 00000000..2f9468c8 --- /dev/null +++ b/first-class-pipeline/helm/common/templates/_names.tpl @@ -0,0 +1,10 @@ +{{ + /* Expand the name of the chart */ +}} +{{- define "common.names.name" -}} +{{- define .Chart.name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{ + +}} \ No newline at end of file diff --git a/first-class-pipeline/tests/Jenkinsfile b/first-class-pipeline/tests/Jenkinsfile index c594bafe..77f98365 100644 --- a/first-class-pipeline/tests/Jenkinsfile +++ b/first-class-pipeline/tests/Jenkinsfile @@ -63,7 +63,7 @@ executeFreeleapsPipeline { // imageRepository used to specify the image repository imageRepository: 'sunzhenyucn', // imageName used to specify the image name - imageName: 'gitops-mvp-app-frontend', + imageName: 'demo-frontend', // imageBuilder used to specify the image builder // dind: using docker-in-docker to build the image // kaniko: using Kaniko to build the image @@ -110,7 +110,7 @@ executeFreeleapsPipeline { // imageRepository used to specify the image repository imageRepository: 'sunzhenyucn', // imageName used to specify the image name - imageName: 'gitops-mvp-app-backend', + imageName: 'demo-backend', // imageBuilder used to specify the image builder // dind: using docker-in-docker to build the image // kaniko: using Kaniko to build the image