Skip to content

Commit

Permalink
Merge pull request SAP-samples#3 from LindaSieb/organize
Browse files Browse the repository at this point in the history
Organize and remove unnecessary items
  • Loading branch information
LindaSieb authored Aug 25, 2023
2 parents ac10808 + 14a1400 commit f06f25a
Showing 1 changed file with 19 additions and 35 deletions.
54 changes: 19 additions & 35 deletions .pipeline/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -25,52 +23,43 @@ 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
srv.image.repository: image.susaas_images/susaas_srv.repository
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
Expand All @@ -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
Expand All @@ -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

0 comments on commit f06f25a

Please sign in to comment.