github.com/ouraigua/jenkins-library@v0.0.0-20231028010029-fbeaf2f3aa9b/resources/metadata/helmExecute.yaml (about)

     1  metadata:
     2    name: helmExecute
     3    description: Executes helm3 functionality as the package manager for Kubernetes.
     4    longDescription: |-
     5      Alpha version: please expect incompatible changes
     6  
     7      Executes helm functionality as the package manager for Kubernetes.
     8  
     9      * [Helm](https://helm.sh/)  is the package manager for Kubernetes.
    10      * [Helm documentation https://helm.sh/docs/intro/using_helm/ and best practies https://helm.sh/docs/chart_best_practices/conventions/]
    11      * [Helm Charts] (https://artifacthub.io/)
    12      ```
    13      Available Commands:
    14      `upgrade`, `lint`, `install`, `test`, `uninstall`, `dependency`, `publish`
    15  
    16        upgrade       upgrade a release
    17        lint          examine a chart for possible issues
    18        install       install a chart
    19        test          run tests for a release
    20        uninstall     uninstall a release
    21        dependency     package a chart directory into a chart archive
    22        publish       package and puslish a release
    23  
    24      ```
    25  
    26      Note: piper supports only helm3 version, since helm2 is deprecated.
    27  spec:
    28    inputs:
    29      secrets:
    30        - name: kubeConfigFileCredentialsId
    31          description: Jenkins 'Secret file' credentials ID containing kubeconfig file. Details can be found in the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/).
    32          aliases:
    33            - name: kubeCredentialsId
    34              deprecated: true
    35          type: jenkins
    36        - name: dockerConfigJsonCredentialsId
    37          description: Jenkins 'Secret file' credentials ID containing Docker config.json (with registry credential(s)).
    38          type: jenkins
    39        - name: sourceRepositoryCredentialsId
    40          description: Jenkins 'Username Password' credentials ID containing username and password for the Helm Repository authentication (source repo)
    41          type: jenkins
    42        - name: targetRepositoryCredentialsId
    43          description: Jenkins 'Username Password' credentials ID containing username and password for the Helm Repository authentication (target repo)
    44          type: jenkins
    45      resources:
    46        - name: deployDescriptor
    47          type: stash
    48      params:
    49        - name: additionalParameters
    50          aliases:
    51            - name: helmDeploymentParameters
    52          type: "[]string"
    53          description: Defines additional parameters for Helm like  "helm install [NAME] [CHART] [flags]".
    54          scope:
    55            - PARAMETERS
    56            - STAGES
    57            - STEPS
    58        - name: chartPath
    59          aliases:
    60            - name: helmChartPath
    61          type: string
    62          description: Defines the chart path for helm. chartPath is mandatory for install/upgrade/publish commands.
    63          scope:
    64            - GENERAL
    65            - PARAMETERS
    66            - STAGES
    67            - STEPS
    68        - name: targetRepositoryURL
    69          description: "URL of the target repository where the compiled helm .tgz archive shall be uploaded - typically provided by the CI/CD environment."
    70          type: string
    71          scope:
    72            - PARAMETERS
    73            - STAGES
    74            - STEPS
    75          resourceRef:
    76            - name: commonPipelineEnvironment
    77              param: custom/helmRepositoryURL
    78            - name: commonPipelineEnvironment
    79              param: custom/repositoryUrl
    80        - name: targetRepositoryName
    81          type: string
    82          description: set the chart repository. The value is required for install/upgrade/uninstall commands.
    83          scope:
    84            - GENERAL
    85            - PARAMETERS
    86            - STAGES
    87            - STEPS
    88        - name: targetRepositoryUser
    89          aliases:
    90            - name: helmRepositoryUsername
    91          description: "Username for the chart repository where the compiled helm .tgz archive shall be uploaded - typically provided by the CI/CD environment."
    92          type: string
    93          scope:
    94            - PARAMETERS
    95            - STAGES
    96            - STEPS
    97          secret: true
    98          resourceRef:
    99            - name: targetRepositoryCredentialsId
   100              type: secret
   101              param: username
   102            - type: vaultSecret
   103              name: targetRepositoryUserSecretName
   104              default: publishing
   105            - name: commonPipelineEnvironment
   106              param: custom/helmRepositoryUsername
   107            - name: commonPipelineEnvironment
   108              param: custom/repositoryUsername
   109        - name: targetRepositoryPassword
   110          aliases:
   111            - name: helmRepositoryPassword
   112          description: "Password for the target repository where the compiled helm .tgz archive shall be uploaded - typically provided by the CI/CD environment."
   113          type: string
   114          scope:
   115            - PARAMETERS
   116            - STAGES
   117            - STEPS
   118          secret: true
   119          resourceRef:
   120            - name: targetRepositoryCredentialsId
   121              type: secret
   122              param: password
   123            - type: vaultSecret
   124              name: targetRepositoryPasswordSecret
   125              default: publishing
   126            - name: commonPipelineEnvironment
   127              param: custom/helmRepositoryPassword
   128            - name: commonPipelineEnvironment
   129              param: custom/repositoryPassword
   130        - name: sourceRepositoryURL
   131          description: "URL of the source repository where the dependencies can be downloaded."
   132          type: string
   133          scope:
   134            - PARAMETERS
   135            - STAGES
   136            - STEPS
   137        - name: sourceRepositoryName
   138          type: string
   139          description: Set the name of the chart repository. The value might be required for fetching dependencies.
   140          scope:
   141            - GENERAL
   142            - PARAMETERS
   143            - STAGES
   144            - STEPS
   145        - name: sourceRepositoryUser
   146          description: "Username for the chart repository for fetching the dependencies."
   147          type: string
   148          scope:
   149            - PARAMETERS
   150            - STAGES
   151            - STEPS
   152          secret: true
   153          resourceRef:
   154            - name: sourceRepositoryCredentialsId
   155              type: secret
   156              param: username
   157            - type: vaultSecret
   158              name: sourceRepositoryUserSecretName
   159              default: dependencies
   160        - name: sourceRepositoryPassword
   161          description: "Password for the chart repository for fetching the dependencies."
   162          type: string
   163          scope:
   164            - PARAMETERS
   165            - STAGES
   166            - STEPS
   167          secret: true
   168          resourceRef:
   169            - name: sourceRepositoryCredentialsId
   170              type: secret
   171              param: password
   172            - type: vaultSecret
   173              name: sourceRepositoryPasswordSecret
   174              default: dependencies
   175        - name: helmDeployWaitSeconds
   176          type: int
   177          description: Number of seconds before helm deploy returns.
   178          scope:
   179            - PARAMETERS
   180            - STAGES
   181            - STEPS
   182          default: 300
   183        - name: helmValues
   184          type: "[]string"
   185          description: List of helm values as YAML file reference or URL (as per helm parameter description for `-f` / `--values`)
   186          scope:
   187            - PARAMETERS
   188            - STAGES
   189            - STEPS
   190        - name: image
   191          aliases:
   192            - name: deployImage
   193          type: string
   194          description: Full name of the image to be deployed.
   195          resourceRef:
   196            - name: commonPipelineEnvironment
   197              param: container/imageNameTag
   198          mandatory: true
   199          scope:
   200            - PARAMETERS
   201            - STAGES
   202            - STEPS
   203        - name: keepFailedDeployments
   204          type: bool
   205          description: Defines whether a failed deployment will be purged
   206          default: false
   207          scope:
   208            - GENERAL
   209            - PARAMETERS
   210            - STAGES
   211            - STEPS
   212        - name: kubeConfig
   213          type: string
   214          description: Defines the path to the "kubeconfig" file.
   215          scope:
   216            - GENERAL
   217            - PARAMETERS
   218            - STAGES
   219            - STEPS
   220          secret: true
   221          resourceRef:
   222            - name: kubeConfigFileCredentialsId
   223              type: secret
   224            - type: vaultSecretFile
   225              name: kubeConfigFileVaultSecretName
   226              default: kube-config
   227        - name: kubeContext
   228          type: string
   229          description: Defines the context to use from the "kubeconfig" file.
   230          scope:
   231            - PARAMETERS
   232            - STAGES
   233            - STEPS
   234        - name: namespace
   235          aliases:
   236            - name: helmDeploymentNamespace
   237          type: string
   238          description: Defines the target Kubernetes namespace for the deployment.
   239          scope:
   240            - PARAMETERS
   241            - STAGES
   242            - STEPS
   243          default: default
   244        - name: dockerConfigJSON
   245          type: string
   246          description: Path to the file `.docker/config.json` - this is typically provided by your CI/CD system. You can find more details about the Docker credentials in the [Docker documentation](https://docs.docker.com/engine/reference/commandline/login/).
   247          scope:
   248            - PARAMETERS
   249            - STAGES
   250            - STEPS
   251          secret: true
   252          resourceRef:
   253            - name: dockerConfigJsonCredentialsId
   254              type: secret
   255            - type: vaultSecretFile
   256              name: dockerConfigFileVaultSecretName
   257              default: docker-config
   258        - name: helmCommand
   259          type: string
   260          description: "Helm: defines the command `upgrade`, `lint`, `install`, `test`, `uninstall`, `dependency`, `publish`."
   261          scope:
   262            - PARAMETERS
   263            - STAGES
   264            - STEPS
   265          possibleValues:
   266            - upgrade
   267            - lint
   268            - install
   269            - test
   270            - uninstall
   271            - dependency
   272            - publish
   273        - name: appVersion
   274          type: string
   275          description: set the appVersion on the chart to this version
   276          scope:
   277            - GENERAL
   278            - PARAMETERS
   279            - STAGES
   280            - STEPS
   281        - name: dependency
   282          type: string
   283          description: "manage a chart's dependencies"
   284          scope:
   285            - PARAMETERS
   286            - STAGES
   287            - STEPS
   288          possibleValues:
   289            - build
   290            - list
   291            - update
   292        - name: packageDependencyUpdate
   293          type: bool
   294          description: update dependencies from "Chart.yaml" to dir "charts/" before packaging
   295          default: false
   296          scope:
   297            - GENERAL
   298            - PARAMETERS
   299            - STAGES
   300            - STEPS
   301        - name: dumpLogs
   302          type: bool
   303          description: dump the logs from test pods (this runs after all tests are complete, but before any cleanup)
   304          default: false
   305          scope:
   306            - GENERAL
   307            - PARAMETERS
   308            - STAGES
   309            - STEPS
   310        - name: filterTest
   311          type: string
   312          description: specify tests by attribute (currently `name`) using attribute=value syntax or `!attribute=value` to exclude a test (can specify multiple or separate values with commas `name=test1,name=test2`)
   313          scope:
   314            - GENERAL
   315            - PARAMETERS
   316            - STAGES
   317            - STEPS
   318        - name: customTlsCertificateLinks
   319          type: "[]string"
   320          description: "List of download links to custom TLS certificates. This is required to ensure trusted connections to instances with repositories (like nexus) when publish flag is set to true."
   321          scope:
   322            - GENERAL
   323            - PARAMETERS
   324            - STAGES
   325            - STEPS
   326        - name: publish
   327          type: bool
   328          description: Configures helm to run the deploy command to publish artifacts to a repository.
   329          default: false
   330          scope:
   331            - GENERAL
   332            - PARAMETERS
   333            - STAGES
   334            - STEPS
   335        - name: version
   336          type: string
   337          description: Defines the artifact version to use from helm package/publish commands.
   338          scope:
   339            - GENERAL
   340            - PARAMETERS
   341            - STAGES
   342            - STEPS
   343        - name: renderSubchartNotes
   344          type: bool
   345          description: If set, render subchart notes along with the parent.
   346          default: true
   347          scope:
   348            - GENERAL
   349            - PARAMETERS
   350            - STAGES
   351            - STEPS
   352        - name: templateStartDelimiter
   353          type: string
   354          description: When templating value files, use this start delimiter.
   355          default: "{{"
   356          scope:
   357            - STEPS
   358            - PARAMETERS
   359        - name: templateEndDelimiter
   360          type: string
   361          description: When templating value files, use this end delimiter.
   362          default: "}}"
   363          scope:
   364            - STEPS
   365            - PARAMETERS
   366        - name: renderValuesTemplate
   367          type: bool
   368          description: A flag to turn templating value files on or off.
   369          default: true
   370          scope:
   371            - STEPS
   372            - PARAMETERS
   373    containers:
   374      - image: dtzar/helm-kubectl:3
   375        workingDir: /config
   376        options:
   377          - name: -u
   378            value: "0"
   379    outputs:
   380      resources:
   381        - name: commonPipelineEnvironment
   382          type: piperEnvironment
   383          params:
   384            - name: custom/helmChartUrl