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

4336 Commits

Author SHA1 Message Date
Giridhar Shenoy
d31c0584ff
detectExecuteScan : Add minScanInterval parameter through Piper (#4006)
* add minscaninterval parameter

* update detectExec

* removed a single trailing space which caused a lint failure

* Add test case

* Ensure unmap is false

* fix test case

* update format of param value
2022-09-26 14:08:12 +02:00
Peter Persiel
bfca6eb020
Reuse software component before leading software component (#4046) 2022-09-26 12:37:39 +02:00
Vyacheslav Starostin
6cadb15a11
kubernetesDeploy: add additional unstashing (#4017)
Co-authored-by: Alexey Matvievsky <72048991+matvievsky@users.noreply.github.com>
2022-09-23 17:46:05 +06:00
Jan von Löwenstein
2843d6ae75
Remove leftover Printf (#4002)
Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>
2022-09-23 10:01:12 +02:00
Alexey Matvievsky
2dfca180a7
(feat) Golang integration tests dynamic workflow
* Dynamic version detection of Golang 

* Dynamic Golang integration tests run matrix

* Golang timeout to build set at 5 min

* Golang integration test timeout to run set at 10 min

* Consumer tests timeout set at 20 min

Co-authored-by: Alexey Matvievsky <alexey.matvievsky@sap.com>
2022-09-22 19:12:13 +02:00
Alexey Matvievsky
b28df9d9dd
it/integration-tests-event-fix@v4 (#4040)
* uses: styfle/cancel-workflow-action@0.10.0

* specify pull request repository directly

Co-authored-by: Alexey Matvievsky <alexey.matvievsky@sap.com>
2022-09-22 13:14:53 +03:00
Alexey Matvievsky
2ac8ead02c
Integration tests workflow quick fix 3 (#4033)
* Integration tests fix #2

* Now on event GHA job should look at the pull request branch

* fix

Co-authored-by: Alexey Matvievsky <alexey.matvievsky@sap.com>
2022-09-21 13:08:15 +06:00
Alexey Matvievsky
e61d358306
Integration tests workflow fix 2 (#4032) 2022-09-20 22:29:21 +06:00
Alexey Matvievsky
881d10354f
Integration tests workflow event triggering quick fix (#4031) 2022-09-20 12:23:31 +02:00
Alexey Matvievsky
a6a8f4b142
Integration tests workflow fix and execution time reduction (#4026)
Consumer tests moved to separate workflow
2022-09-20 10:24:04 +04:00
Alexey Matvievsky
e5f2f1414e
Improve integration tests (#4019)
Improve integration tests
2022-09-19 14:47:13 +04:00
Linda Siebert
3ba7a8dfa4
Adapt npmExecuteEndToEndTests (#4008)
* Adapt step

* Adapt comment
2022-09-16 17:30:19 +02:00
Srinikitha Kondreddy
25bfc61e95
Revert changes from PR #3982 (#4015) 2022-09-16 13:12:29 +02:00
Srinikitha Kondreddy
4da4ced95e
Add new param for npmExecuteEndToEndTests step (#4012)
* Set default docker image for npmExecuteEndToEndTests

* Adapt docker image param

* Update npmExecuteEndToEndTests.groovy

* Update npmExecuteEndToEndTests.groovy

* Update npmExecuteScripts.groovy

* Update npmExecuteEndToEndTests.groovy

* Update npmExecuteEndToEndTests.groovy

* Clean up

* Remove default image
2022-09-15 19:32:09 +02:00
Mayur Belur Mohan
32152be940
API Changes For Integration Artifact Deploy Command (#3992)
* API Changes For Integration Artifact Deploy Command

* CodeReview Fixes

* Change wording

Co-authored-by: Linda Siebert <39100394+LindaSieb@users.noreply.github.com>
2022-09-15 11:01:36 +02:00
Srinikitha Kondreddy
3432637320
Add npmExecuteScripts to Acceptance stage (#3982)
* Enable npmExecuteScripts in Acceptance stage

* Add test case
2022-09-12 17:51:44 +02:00
Vyacheslav Starostin
eba9890e62
helmExecute: change permissions for downloaded dependency (#3991)
* Change permissions for downloaded dependency

* Add check if charts exists
2022-09-07 02:28:07 +06:00
Srinikitha Kondreddy
ac9bd28c42
[E2E Tests step] Allow Conditional check with on_k8s env variable (#3985)
* Conditional check with on_k8s env variable

* Add ON_K8S unit test

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2022-09-06 11:23:12 +02:00
Srinikitha Kondreddy
e610bda779
Set script 'ci-e2e' as default for acceptance stage (#4000)
* Set script 'ci-e2e' as default for acceptance stage

* Refactor test case

* Clean up

* Adjust parameter comment
2022-09-05 09:38:45 +00:00
Ashly Mathew
c7342cfb0e
fix(general purpose pipeline): enable checkIfStepActive to handle use case with no .pipeline/config.yaml (#3993)
* Fix for making config.yaml not mandatory in checkifstepactive

* Create customConfig.yaml

* Revert resource

* Remove nil for customConfig

* Fix tests
2022-09-05 10:20:32 +02:00
Vyacheslav Starostin
72e257e83e
helmExecute: rename remoteHelmChartPath to helmChartUrl (#3999) 2022-09-02 15:55:30 +06:00
Anil Keshav
6b5bf5232a
fix(ssh auth) downgrade x/crypto to allow ssh auth with all git instances (#3998)
* fixing ssh by downgrading x/crypto

* comments on the why downgrade is needed

* comment update

Co-authored-by: anilkeshav27 <you@example.com>
2022-09-02 10:59:13 +02:00
Christopher Fenner
0554f3cdb8
chore(protecode): reduct polling interval during tests (#3995)
* cleanup imports

* reduce wait time during tests

* cleanup imports

* cleanup imports
2022-09-02 10:07:04 +02:00
raman-susla-epam
bf57938520
fix(getConfig): add error handling for config JSON marshalling
Co-authored-by: Ashly Mathew <ashly.mathew@sap.com>
Co-authored-by: Jordi van Liempt <35920075+jliempt@users.noreply.github.com>
2022-09-01 11:33:28 +02:00
tiloKo
0ef399cd1c
Reserve package log output (#3981)
* beautify log output
2022-09-01 08:53:41 +02:00
Daniel Bernd
721994fac5
Feature ATC Run Step - fail on severity (#3986)
* new Parameter - for ATC step "Fail on Severity"

* .yml - add description

* fail on Severity & Unit Test

* Update abapEnvironmentRunATCCheck_test.go

Unit Test correction

* Fail Message

* Fail Step - at last (after persisting files)

* Parameter description change

* yaml trailing spaces removal

* correct Parameter typo and description adjust

* Unit Test correct

* Update cmd/abapEnvironmentRunATCCheck.go

Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>

* Update abapEnvironmentRunATCCheck.go

* Update abapEnvironmentRunATCCheck_test.go

typo

Co-authored-by: Daniel Bernd <93763187+danManSAP@users.noreply.github.com>
Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>
Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>
2022-08-31 16:57:20 +02:00
Ashly Mathew
3fb034b629
Fix for checkIfStepActive custom config (#3987)
* Fix for checkIfStepActive custom config

* convert JSONObjects to LinkedHashMap

* fix null pointer

Co-authored-by: Raman Susla<“raman_susla@epam.com”>
2022-08-31 16:11:51 +03:00
Ralf Pannemans
3a476b2c6d cnbBuild: bump platform api version to 0.9
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
2022-08-31 14:22:32 +02:00
Vyacheslav Starostin
1a07ae37b7
Versioning for helm charts (#3980)
* Replace '+' to '_' in appVersion

* Add test

* Fix test

* Update test name

Co-authored-by: Vyacheslav Starostin <vyacheslav.starostin@sap.com>
Co-authored-by: Anil Keshav <anil.keshav@sap.com>
2022-08-31 13:39:00 +02:00
Artem Bannikov
4b257377ec
[TMS] Reimplement tmsUpload step in Go (#3399)
* Initially generated tmsUpload<...> files

* First provisioning of parameters supported by tmsUpload step

* Refer to Go step from tmsUpload.groovy

* Initial client implementation

* Reverting line delimiters in tmsUpoad.groovy back to Unix ones

* Temporarily remove when-condition for Release stage

* Define useGoStep parameter in tmsUpload.groovy

* Unstash buildResult if useGoStep is true

* No unstashing and empty credentials, when using go step

* Register TmsUploadCommand in piper.go

* Cleanup groovy-related changes - they will be temporarily implemented in a different repo

* Make getting OAuth token success

* Look through the code and cleanup it a bit

* Read service key from Jenkins credentials store

* Provide initial set of unit tests for methods in /pkg/tms/tms.go file

* Minor improvements on logging response on http call error

* Check, if positive HTTP status code is as expected

* Cleanup tms.yaml file, provide additional unit test for tms.go

* Provide unit test for the case, when request body contains spaces

* Specify nodeExtDescriptorMapping parameter as of type map in tms.yaml

* Implement client method for getting nodes

* Write tests for GetNodes method

* Add GetMtaExtDescriptor client method and cover it with unit tests

* Provide first implementation for Update- and UploadMtaExtDescriptor
client methods

* Provide first implementation for Update- and UploadMtaExtDescriptor
client methods

* Provide UploadFile and UploadFileToNode client methods

* Provide tests for Update- and UploadMtaExtDescriptor client methods

* Write tests for FileUpload and FileUploadToNode client methods

* Minor corrections

* Remove some TODO comments

* Rename some of response structures

* Revert change for line delimiters in cmd/piper.go

* Add uploadType string parameter to UploadFile and UploadRequest methods
of uploader mock to reflect the changed Uploader implementation

* Start to implement execution logic in tmsUpload.go

* Changes in tms.yaml file

- remove resources from inputs in tms.yaml and implement mtaPath
parameter settings in the yaml file the same way, as it is done in
cloudFoundryDeploy.yaml
- rename tms.yaml to tmsUpload.yaml, since some generation policy
changed meanwhile

* Rename tms.yaml to tmsUpload.yaml and do go generate

* Use provided proxy on communication with UAA and TMS

* Set proxy even before getting OAuth token

* Further implementation of tmsUpload.go

* Continuation on implementing the tmsUpload.go executor

* Get mtarFilePath and git commitId from commonPipelineEnvironment, if
they are missing in configuration file + minor changes

* Implement a happy path test for tmsUpload logic

* Cover with unit tests main happy and error paths of tmsUpload.go logic

* Extend set of unit tests for tmsUpload.go

* Eliminate some TODOs, extend unit tests for tmsUpload.go

* Delete some TODOs

* Remove a couple of more TODOs from tms_test.go file

* Provide additional unit test for error due unexpected positive http
status code on upload

* Revert back line delimiters in cmd/piper.go

* Comment out file uploading calls in tmsUpload.go

* Run go generate to update generated files

* Convert line delimiters in tmsUpload.yaml to Unix ones, as well as
provide new line character in the end of the file, plus minor fix for
logging in tmsUpload.go file (pipeline complained)

* Correct description of a parameter in tmsUpload.yaml, extend unit tests
to check for trimming a slash in the end of TMS url for client methods
that do upload

* [minor] Add a comment in the test code

* Add stashContent parameter to do unstashing in tmsUpload.groovy, remove
some of the clarified TODOs

* Uncomment uploading file calls in tmsUpload.go, declare buildResult
stash in tmsUpload.yaml

* Remove clarified TODOs from the tmsUpload.go file

* Run go fmt for jenkins-library/pkg/tms

* Do not get explicitly values from common pipeline environment - all
configurations are provided in yaml file

* Remove unused struct from tmsUpload_test.go

* Run go fmt jenkins-library\pkg\tms

* Revise descriptions of parameters provided in tmsUpload.yaml file

* Specify STAGES scope for tmsUpload parameters

* Provide STAGES scope for the tmsUpload parameters, provide default value
for stashContent parameter

* Remove trailing space from tmsUpload.yaml

* Provide unit tests for proxy-related changes in http.go file

* Improve proxy implementation in tmsUpload.go file

* Make tmsServiceKey again a mandatory parameter

* Run go generate command to make the generated files correspond the yaml
state

* Change line delimiters back to Unix ones (were switched while resolving
the conflicts)

* Remove trailing spaces from tmsUpload.yaml

* Minor change in a comment to trigger pipelines with commit

* Improve checks for zero-structs and for empty maps, as well as use
different package to read files in the tests

* Revert line endings in http.go

* Revert comments formatting changes in files that do not belong to the tmsUpload step
2022-08-30 10:16:09 +02:00
Jordi van Liempt
402c6085c9
feat(checkIfStepActive): enhance with pipelineEnvironmentFilled condition (#3975)
* add CommonPipelineEnvironmentVariableExists to StepCondition

* add CPE variable existance check to checkIfStepActive

* refactor getCPEEntry()

* condition type -> string

* rename CPE filled condition

* rename CPE condition

Co-authored-by: I557621 <jordi.van.liempt@sap.com>
Co-authored-by: Anil Keshav <anil.keshav@sap.com>
2022-08-29 13:44:32 +02:00
Ashly Mathew
b75d6cf9ed
Enable Jenkins to use checkIfStepActive go step (#3931)
* Extend checkIfStepActive

* adapt default format in abap Tests
Co-authored-by: dominiklendle <d.lendle@sap.com>
Co-authored-by: “Raman <“raman_susla@epam.com”>
2022-08-29 11:39:08 +02:00
Vyacheslav Starostin
5e305eca40
kubernetesDeploy: add resourceRef (custom/localHelmChartPath) (#3977) 2022-08-25 17:12:13 +06:00
Anil Keshav
5b581efc31
fix (mtaBuild) keep .mtar if added as a part of mta id (#3935)
* only remove mtar when its an file extension not other

* keep .mtar if added as a part of mta id

* not adding an addional mtar

* keeping the mtaId intact if the condition

* respecting mta artifact name

* removing condition

* trim only when suffix

* chaging the suffix

* handle case when mtar is natively suffixed

Co-authored-by: anilkeshav27 <you@example.com>
Co-authored-by: Ashly Mathew <ashly.mathew@sap.com>
2022-08-24 14:19:04 +02:00
tiloKo
0a2327dda8
Abap relese confirm fault tollerant (#3916)
* no error if package release fails
2022-08-23 15:33:42 +02:00
Daniel Bernd
f089e3d89e
Optimized json handling during Patch Request build. No fix json struc… (#3976)
* Optimized json handling during Patch Request build. No fix json struct for Config Base Json

* Error handling

* Update abapEnvironmentPushATCSystemConfig.go

Error Handling 2

* Update abapEnvironmentPushATCSystemConfig.go

Error Handling 3

Co-authored-by: Daniel Bernd <93763187+danManSAP@users.noreply.github.com>
2022-08-23 09:49:03 +02:00
Pavel Busko
14ce92b4fb
cnbBuild: create CycloneDX SBOM file (#3959)
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
2022-08-18 10:03:24 +02:00
Oliver Nocon
85b277c7c6
fix: register base64 encoded secret (#3973)
fixes #3908
2022-08-16 17:52:20 +02:00
Oliver Feldmann
3da753930c
Allow transport request id from config (#3969) 2022-08-16 11:33:04 +02:00
ffeldmann
c52e42fc84
feat(orchestrator) Adds BuildReasons to Jenkins Orchestrator. (#3961)
* Adds PullRequest and ResourceTrigger as BuildReason for Jenkins
2022-08-16 08:33:23 +02:00
Vyacheslav Starostin
b31549cf7f
helmExecute: add remoteHelmChartPath CPE value (#3965)
* Add remoteHelmChartPath CPE value

* Fix tests

* Add empty line at the end of yaml file

* Fix yaml file
2022-08-16 01:41:24 +06:00
Oliver Nocon
74cc828221
chore!: improve performance on Kubernetes (#3932)
* chore: test stashBack excludes

* improve logging

* chore!: improve performance on Kubernetes

* update stash pattern

* update test

Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2022-08-15 12:55:51 +02:00
Daniel Bernd
11e7b5e137
Feature usage com scen901 (#3917)
* Usage of Communication Scenario 901 (instead 510)

* Stage Defaults ATC - Com.Scen 901

* added missing step in Introduction docu

* Correct Link

* Link adapt 2 - generated

* remove Push ATC system configuration again (as only substep)

* feat: allow uploading multiple boms (#3900)

* WIP: Adapt bom names

* + WIP: Adapt bom filenames

* Upgrade cyclonedx gradle plugin and use cyclonedxBom config parameters

* Fix unit tests - use correct name in bom creation

* Fix pythonBuild bom name

* introduce and use npmBomFilename const

* Introduce and use mvnBomFilename const

* Introduce and use gradleBomFilename const

* Use build-tool names for bom suffix

* + Adapt tests (build tool suffix)

* Use BOM schema version 1.2 in gradleExecuteBuild

* Pin version of cyclonedx-maven-plugin to 2.7.1

* Adapt generated files

* Fix integration tests

* Fix integration tests

* Fix gradle build integration tests

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

* fix(cnbBuild): Create separate temp folder for each creator call (#3910)

Co-authored-by: Pavel Busko <pavel.busko@sap.com>

* feat(fortifyExecuteScan): new spotcheck flags (#3923)

* feat: improve vulnerability reporting via GitHub issues (#3924)

* feat: improve vulnerability reporting via GitHub issues

* feat: update reports

* chore: add tls cert links

* only write log on error

* chore: update formatting

* chore: update handling of direct dependencies

* chore: fix linting issue

* chore: minor updates

* correct typo

Co-authored-by: Daniel Bernd <93763187+danManSAP@users.noreply.github.com>
Co-authored-by: R. Kloe <55529941+rkloe@users.noreply.github.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
Co-authored-by: sumeet patil <sumeet.patil@sap.com>
2022-08-15 10:56:08 +02:00
Ashly Mathew
62f47e2d1f
Changes to point release commitish to head commit (#3776)
* Changes to point release commitish to head commit

Signed-off-by: Ashly Mathew <ashly.mathew@sap.com>
2022-08-15 09:48:28 +02:00
Oliver Nocon
05319abfa3
fix(kanikoExecute): enforce image name for multi image build (#3909)
Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2022-08-15 09:05:20 +02:00
Oliver Nocon
1e2f2d93e3
feat: add commit and pipeline to GitHub reporting (#3930)
Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2022-08-15 07:48:22 +02:00
sumeet patil
91eb80fc68
feat(checkmarxExecuteScan): new json report flag (#3964) 2022-08-12 18:39:28 +02:00
Peter Persiel
5d2ab86674
Add-on Build Pipeline: cause the current build to stop depending on ATC check quality gate (#3833)
* Update extensibility.md

* Update abapEnvironmentAddons.md

* Update documentation/docs/pipelines/abapEnvironment/extensibility.md

Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>

* Update extensibility.md

Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>
2022-08-12 16:03:44 +02:00
sumeet patil
be565f1543
feat(fortifyExecuteScan): set python version (#3960)
* set python version
2022-08-12 15:17:11 +02:00
sumeet patil
89bc41a3d0
feat(fortifyExecuteScan): json report new flag (#3963)
- json report new flag isSpotChecksPerCategoryAudited for spotchecks

Co-authored-by: thtri <thanh.hai.trinh@sap.com>
2022-08-12 13:27:31 +02:00