1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00
Commit Graph

37 Commits

Author SHA1 Message Date
Jordi van Liempt
0ba4c2206c
chore(deps): Replace io/ioutil package (#4494)
* update all deprecated ioutil usages

* forgotten changes

* add missing imports

* undo changing comment

* add missing 'os' import

* fix integration test

---------

Co-authored-by: I557621 <jordi.van.liempt@sap.com>
Co-authored-by: Gulom Alimov <gulomjon.alimov@sap.com>
2023-08-16 12:57:04 +02:00
Vyacheslav Starostin
b305cd102d
kubernetesDeploy: Add kube-context parameter for helm test command (#4332)
* kubernetesDeploy: Add kube-context parameter for helm test command

* Resolve merge conflict
2023-05-25 17:03:33 +06:00
Pavel Busko
35a55044b4
Add renderSubchartNotes property to helmExecute and kubernetesDeploy (#4238)
Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
2023-05-05 14:23:11 +02:00
Anil Keshav
17c9f5ca65
feat (kuberenetesDeploy) allow adding a timeout to the helm test commands (#4310)
* adding a timeout for helm test

* extending test cases

* Upadate the helmTestWaitSeconds parameter

* Add timeout parameter for helm test command

* Update tests

---------

Co-authored-by: Vyacheslav Starostin <vyacheslav.starostin@sap.com>
2023-04-24 18:58:24 +06:00
Ralf Pannemans
f2c6cf7d47
fix(kubernetesDeploy): Escape imageAliases in valueMapping (#4210)
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
2023-02-08 13:41:26 +01:00
Oliver Nocon
f6a6448631
chore: fix linting issues (#3878)
* chore: fix linting issues

* add more fixes

* correct formatting

* Delete depl.yaml
2022-07-21 09:04:21 +02:00
Oliver Nocon
5da174aeb0
feat(kubernetesDeploy): add infrastructure extensibility (#3853)
* feat(kubernetesDeploy): add infrastructure extensibility

* update comment

* update error handling

* remove trailing spaces

* chore: refactor to use reuse capabilities

* chore: add tests

* fix: use proper download function

* fix: expose credentials via groovy step

* fix: test

* chore: remove comment

* chore: address CodeClimate findings
2022-06-29 12:00:37 +02:00
Vitalii Sidorov
2a4052d13c
feat(helmExecute): run complete lint, build, publish cycle (#3546)
* Add runHelmCommand

* Add dryRun for debug

* Add default case in helmExecute

* Fix unit-tests

* small fix

* Fix RunHelmAdd and change RunHelmPublish methods

* Fix RunHelmPublish

* Fix unit-tests

* Fix unit-test

* small fix

* small fix

* small fix

* Add LintFlag PackageFlag PublishFlag flags

* Add tests for httpClient.go

* test

* test

* smal fix

* small fix

* Add getting name and version from Chart.yaml

* Add test

* Fix

* small fix

* Fix according to comments

* small fix

Co-authored-by: “Vitalii <“vitalii.sidorov@sap.com”>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
Co-authored-by: Vitalii Sidorov <vitalii_sidorov@sap.com>
2022-03-17 17:13:34 +01:00
Pavel Busko
d2ef57bf5f
feat(kubernetesDeploy): support for image digests (#3613)
Co-authored-by: Sumit Kulhadia <sumit.kulhadia@sap.com>
2022-03-09 09:48:19 +01:00
Pavel Busko
e2de22f5ea
feat(kubernetesDeploy): use go templating for the deployTool: kubectl (#3600)
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
2022-03-08 14:52:43 +01:00
Pavel Busko
a67b4ce558
feat(kubernetesDeploy): added valuesMapping config option (#3568) 2022-02-28 10:43:55 +01:00
Philipp Stehle
402b8b28fa
feat(kubernetesDeploy): initial support for multiple images (#3548)
Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
2022-02-24 12:01:36 +01:00
Vitalii Sidorov
93e3801945
feat: add step for Helm execution (#3419)
* Implement helm step

* Create kubernetes package

* Refactoring helm.go

* Add package, test commands

* Add test for helm package

* Add tests for helm.go

* Add tests for helm.go

* Add tests for utils.go

* Add tests for helmExecute.go

* small fix

* Add helm lint

* small fix

* small fix

* Fix according to comments

* Fix test

* small fix

* Add helm add function

* Changes according to new comments

* Add helm push

* Add unit tests

* Add tests for helmExecute

* Add small fix

* small fix

* small fix

* Move DeployUtilsBundle from kubernetesDeploy to kubernetes package

* small fix

* small fix

* Add unit-tests

* Fix

* Update resources/metadata/helmExecute.yaml

* Update resources/metadata/helmExecute.yaml

* Add helm chart server parameterization

* small fix

* small fix

Co-authored-by: “Vitalii <“vitalii.sidorov@sap.com”>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2022-02-10 10:25:03 +01:00
Philipp Stehle
6958e028d1
chore(kubernetesDeploy): add telemetry for deployTool (#3469)
* chore(kubernetesDeploy): add telemetry for deployTool

* Update cmd/kubernetesDeploy.go

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2022-01-28 08:31:34 +01:00
Linda Siebert
480d1c260f
Add testing for helm during acceptance stage (#3402)
* Add kubernetesDeploy to Acceptance

* Add more kubernetesDeploy

* Add helm tests

* Change documentation

* Fix docu

* Change generated

* Add tests

* Add groovy tests

* Fix tests

* Change tests

Co-authored-by: Thorsten Duda <thorsten.duda@sap.com>
2022-01-25 10:42:42 +01:00
Anil Keshav
af6a1801ab
feat (kubernetesDeploy) allow secret creation in cluster with kubectl as deploy tool (#3398)
* defaulting deocker config json location

* function change

* harmonising secret creation via json config apply

* adding the env path to kaniko

* env var

* adding path

* adding path

* adding path

* rolling back changes for path

* adapting condition for secret creation

* conditions based on username and password only

* fix unit test as per new secret creation

* update documentation with regards to secret creation

* fixing yaml lint empty line

* fixing trailing line from kaniko yaml

* error condition when path of the docker config json file is not found

Co-authored-by: anilkeshav27 <you@example.com>
2022-01-11 11:30:40 +01:00
Oliver Nocon
a76b9d563d
feat(kubernetesDeploy): consume credentials from environment (#3129)
* feat(kubernetesDeploy): consume credentials from environment

* update vault

* update handling of docker config.json

* chore: remove comments
2021-12-02 12:18:21 +01:00
Oliver Feldmann
0c64917ad5
kubernetesDeploy - Add option to replace instead of apply (#3216)
* Add option to replace instead of apply

* Use deploy command string

And make --force optional

* Better force description

* Don't warn on apply + --force

* Improve description

Co-authored-by: Linda Siebert <39100394+LindaSieb@users.noreply.github.com>

Co-authored-by: Linda Siebert <39100394+LindaSieb@users.noreply.github.com>
2021-11-04 14:11:31 +01:00
Linda Siebert
8ca9f6115b
[kubernetesDeploy] add support for containerImageName and containerImageTag (#3153)
* Add params to kubeDeploy

* Add tests for using new params

* Fix formatting

* Add failure tests

* Change test title

* Fix formatting

* Fix error message

* Change error messages

* Reorder if/else

* Change helm and helm3 tests

* Reword docs

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>

* Fix test and image swap

* Generate code

* Remove unused code

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2021-10-08 14:58:32 +02:00
xgoffin
c3ace1a852
fix(kubernetesDeploy): created secret type incorrectly set because of double quotes (#3010)
* fix(kubernetesDeploy): created secret type incorrectly set because of double quotes

* fix(test): update tests

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-09-28 11:41:16 +02:00
Oliver Feldmann
d0f7400122
kubernetesDeploy - Allow docker config.json file (#2829)
* Introduce docker config.json parameter for kubectl

* Use docker config.json parameter for helm

* Export definition of kube secret parameters

* fix username password existence check

* choose more fitting name for secret spec

* Adopt review suggestions

Co-authored-by: Roland Stengel <r.stengel@sap.com>
2021-06-11 10:41:03 +02:00
Srinikitha Kondreddy
24dd9b5cec
Set some params optional for deployTool: kubectl (#2708)
* Set some params optional for deployTool: kubectl

* Add test case

* Add test case for code coverrge

* Add code review changes

* Code review changes
2021-03-25 12:26:44 +01:00
Oliver Nocon
ab3362849a
feat(kubernetesDeploy): allow disabling --force (#2495)
fixes #1731
2021-01-07 16:52:16 +01:00
Kevin Stiehl
9df9ec8ca4
(kubernetesDeploy) allow to keep a failed deployment (#2338)
* new 'keepFailedDeployments' parameter which removes the --atomic flag

* Update resources/metadata/kubernetesdeploy.yaml

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>

* go generate

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-11-10 15:43:19 +01:00
Oliver Nocon
e497b0050a
improve error categorization (#2118) 2020-10-05 17:46:44 +02:00
Sacha Droste
f6f85342b7
fix(helm): Remove double deployment of helm charts (#1947)
* Remove double deployment of helm charts

* Adapt unit test

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2020-08-24 16:05:05 +02:00
Oliver Nocon
ab64219ac4
kubernetesDeploy - improve helm parameter handling (#1931)
* kubernetesDeploy - improve helm parameter handling

* blur secret and update docs

* add support for values

* Update resources/metadata/kubernetesdeploy.yaml

* Update resources/metadata/kubernetesdeploy.yaml

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>

* Update resources/metadata/kubernetesdeploy.yaml

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-08-18 07:32:36 +02:00
Oliver Nocon
9d2621505b
kubernetesDeploy - fix & updates (#1926)
* kubernetesDeploy - updates

* add debugging output

* fix type checking

* remove debugging output

* fix secret info

* fix tests

* Update vars/commonPipelineEnvironment.groovy

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>

* Update vars/commonPipelineEnvironment.groovy

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-08-14 17:16:25 +02:00
Oliver Nocon
d34f92cd00
kubernetesDeploy: cover helm ImagePullSecrets (#1878)
* kubernetesDeploy: cover helm ImagePullSecrets

* update test

* fix formatting

* fix compatibility
2020-08-06 11:23:36 +02:00
Marcus Holl
4f2ba73314
[refactoring] move the shell/command related interfaces into pkg/command (#1737)
* [refactoring] move the shell/command related interfaces into pkg/command

otherwise we are not able to use the corresponding mocks for the items contained in pkg since
these interfaces are not visible from the pkg folder

Co-authored-by: Daniel Kurzynski <daniel.kurzynski@sap.com>
2020-07-01 11:28:16 +02:00
Oliver Nocon
ac5ae40ecb
kubernetesDeploy: categorize known errors & fix #1732 (#1727)
* kubernetesDeploy: categorize known errors

* hide Docker secret in log output
2020-06-30 10:48:30 +02:00
Stephan Aßmus
082b249cc0
Fix logrus buffer issue (#1511) 2020-05-06 13:35:40 +02:00
Arthur Lenz
b335387eac
feat(k8s): Add basic support for Helm 3 in kubernetesDeploy step (#1438)
* Extends kubernetesDeploy step to support Helm 3

Currently, the kubernetesDeploy step has no support to Helm 3 due to the fact that:
- the initialization command used works only for Helm 2
- the image used when running the helm CLI is based on Helm 2

The need for Helm 3 support comes from the fact that Helm 3 introduces major architectural changes,
more specifically, the removal of its server-side agent called Tiller - thus, being incompatible with
one another.

This commit adds this support by introducing a new configuration field (helmVersion).
By default, its values is set to 2 (Helm 2) to avoid breaking any existing functionalities.

* Use deployTool field to decide between Helm 2 or 3

* Remove helm init and replace wait for atomic in v3

* Update cmd/kubernetesDeploy.go

Nice catch!

Co-Authored-By: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>

* Add documentation for kubernetesDeploy step

* Add helm3 example for kubernetesDeploy step using mandatory fields

* Add new line at the end of kubernetesDeploy documentation

* Link kubernetesDeploy step with docs generator

* Add possible values for deployTool in kubernetesDeploy

* dummy change

* Revert "dummy change"

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2020-04-24 09:37:11 +02:00
Marcus Holl
2918ee52cc
Eliminte envMockRunner (#1233)
ExecMockRunner and ShellMockRunner both needs an environment. "Extending"
here leads to "subclasses" for both cases. That is more long-winded since
it could be.
2020-03-03 10:26:34 +01:00
Florian Geckeler
ef330e1eee
Move mock capabilities to pkg/mock/runner and adapt all tests 2020-02-27 12:11:22 +01:00
Oliver Nocon
9c1bd04752
Streamline step generation (#1142)
* Streamline step generation
* Include PR feedback, update DEVELOPMENT.md

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2020-02-04 10:46:43 +01:00
Oliver Nocon
73ab887f25
Add kubernetesDeploy step (#1073)
* Add kubernetesDeploy step

Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2020-01-24 14:30:27 +01:00