From 14a140002f22ea1fc3e586c646f76e5692cad198 Mon Sep 17 00:00:00 2001 From: Linda Siebert Date: Fri, 25 Aug 2023 16:26:06 +0200 Subject: [PATCH] Organize and remove unnecessary items --- .pipeline/config.yml | 54 ++++++++++++++++---------------------------- 1 file changed, 19 insertions(+), 35 deletions(-) diff --git a/.pipeline/config.yml b/.pipeline/config.yml index f48c755..eef0167 100644 --- a/.pipeline/config.yml +++ b/.pipeline/config.yml @@ -2,9 +2,7 @@ general: buildTool: "npm" containerRegistryUrl: https://concise.common.repositories.cloud.sap - # this does not work currently since GENERAL was not provided for the chartPath - # I guess this will start working when we have a pipeline go released which - # accespt the chartPath in general + # the chartPath will be activated in general once piper PRs are merged # chartPath: charts/sustainable-saas service: buildToolVersion: "N18" @@ -25,38 +23,19 @@ stages: cloudFoundryDeploy: false tmsUpload: false kubernetesDeploy: true - # in case we have a deployment also in the acceptance stage we should provide the chartPath in the general - # section so that it is shared between the stages - # ... does not work with the general section at the moment since we do not have a corresponding piper-go version + # the chartPath will be moved to general once piper PRs are merged chartPath: charts/sustainable-saas - forceUpdates: false # custom defaults + additionalParameters: # we should keep the debug flag. Otherwise there is not much written to the log during deployment. That look like we are stuck. - --debug - --set - global.imagePullSecret.name=concise - # deploy tool is used for resolving the deploy tool and a corresponding docker image, in our case dtzar/helm-kubectl:3 + # we will currently only offer helm3, not kubectl deployTool deployTool: helm3 deploymentName: mh-deployment-01 - # the kube config file for the k8s system where we would like to deploy to kubeConfigFileCredentialsId: kube-config - # The source stash is required for the deployment (... values.yaml, Chart.yaml) - # the charts stash is not a piper stash, but provided by us. It should provide the chart dependencies from outside - # materialized earlier by a helm dependency update. There are currently these related PRs: - # - https://github.com/SAP/jenkins-library/pull/4512 With that the chart dependencies are retrieved inside kubernetesDeploy. - # With that the "charts" stash is not required anymore. - # - https://github.com/SAP/jenkins-library/pull/4519 With that the chart dependencies are retrieved inside the stages prio to - # invoking the kubernetesDeploy-step. - # Other option would be to create the chart-stash in our pipeline (... and not inside piper-os). - # - stashContent: - - source - - buildResult - # maybe the verbosity flag could be omitted - verbose: true - # the namespace where we deploy into namespace: mh-01 - helmDeployWaitSeconds: 300 valuesMapping: api.image.repository: image.susaas_image/susaas_api.repository api.image.tag: image.susaas_image/susaas_api.tag @@ -64,13 +43,23 @@ stages: srv.image.tag: image.susaas_images/susaas_srv.tag broker.image.repository: image.susaas_image/broker.repository broker.image.tag: image.susaas_image/broker.tag + + ## VV PUT THESE INTO CUSTOM DEFAULTS IN PIPELINE-LIB VV## + # The source stash is required for the deployment (... values.yaml, Chart.yaml) + # the build result stash should have the updated chart dependencies + forceUpdates: false # custom defaults + stashContent: # custom defaults + - source # custom defaults + - buildResult # custom defaults + ## ^^ PUT THESE INTO CUSTOM DEFAULTS IN PIPELINE-LIB ^^## + steps: artifactPrepareVersion: versioningType: "cloud_noTag" cloudFoundryDeploy: mtaDeployParameters: "-f --version-rule ALL" - # custom additions to make nom build work + # custom additions to make npm build work buildExecute: npmRunScripts: [ 'cds-build' ] npmInstall: false @@ -85,11 +74,8 @@ steps: # is already contained in the source stash buildResult: '**/*' - # cnbBuild config cnbBuild: - # this refers to a docker config which is used for deploying into the docker registry (deploy credentials) dockerConfigJsonCredentialsId: docker-config - # the docker registry where we would like to deploy to multipleImages: - path: gen/srv containerImageName: susaas-images/susaas-srv @@ -99,21 +85,19 @@ steps: containerImageName: susaas-image/broker - path: gen/db-com containerImageName: susaas-image/susaas-db-com - # no containerImageTag, this means a guid prepared by artifactSetVersion will be used + # containerImageTag is optional. When turned off, this means a guid prepared by artifactSetVersion will be used helmExecute: - # the template delimeters here are a workaround. We are forced to use a values.yaml-preprocessing which fails in our - # case when we have the defaults ( {{}} ). There is this PR: https://github.com/SAP/jenkins-library/pull/4511 for opting-out from the preprocessing helmCommand: dependency dependency: update stashContent: - source - # should be provided finally in the general section in order not to have the twice. Does not work at the moment - # since chartPath is not / was not labeled with GENERAL + # the chartPath will be moved to general once piper PRs are merged chartPath: charts/sustainable-saas + # the template delimeters will be removed once piper PRs are merged. Another flag will take it's place- this can go in custom defaults? templateStartDelimiter: '[[' templateEndDelimiter: ']]' dockerExecuteOnKubernetes: - # should be removed finally + # should be removed for final publish verbose: true