1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00
sap-jenkins-library/pkg
Linda Siebert acbcc5646b
[ANS] Change helper and re-generate steps (#3675)
* Add ans implementation

* Remove todo comment

* Rename test function

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

* Better wording

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

* Add reading of response body function

* Use http pkg ReadResponseBody

* Check read error

* Better test case description

* Fix formatting

* Create own package for read response body

* Omit empty nested resource struct

* Separate Resource struct from Event struct

* Merge and unmarshall instead of only unmarshalling

* Improve status code error message

* Remove unchangeable event fields

* Separate event parts

* Change log level setter function

* Restructure ans send test

* Revert exporting readResponseBody function

Instead the code is duplicated in the xsuaa and ans package

* Add check correct ans setup request

* Add set options function for mocking

* Review fixes

* Correct function name

* Use strict unmarshalling

* Validate event

* Move functions

* Add documentation comments

* improve test

* Validate event

* Add logrus hook for ans

* Set defaults on new hook creation

* Fix log level on error

* Don't alter entry log level

* Set severity fatal on 'fatal error' log message

* Ensure that log entries don't affect each other

* Remove unnecessary correlationID

* Use file path instead of event template string

* Improve warning messages

* Add empty log message check

* Allow configuration from file and string

* Add sourceEventId to tags

* Change resourceType to Pipeline

* Use structured config approach

* Use new log level set function

* Check correct setup and return error

* Mock http requests

* Only send log level warning or higher

* Use new function name

* One-liner ifs

* Improve test name

* Fix tests

* Prevent double firing

* Reduce Fire test size

* Add error message to test

* Reduce newANSHook test size

* Further check error

* Rename to defaultEvent in hook struct

* Reduce ifs further

* Fix set error category test

The ansHook Fire test cannot run in parallel, as it would affect the
other tests that use the error category.

* Change function name to SetServiceKey

* Validate event

* Rename to eventTemplate in hook struct

* Move copy to event.go

* Fix function mix

* Remove unnecessary cleanup

* Remove parallel test

The translation fails now and again when parallel is on.

* Remove prefix test

* Remove unused copyEvent function

* Fix ifs

* Add docu comment

* Register ans hook from pkg

* register hook and setup event template seperately

* Exclusively read eventTemplate from environment

* setupEventTemplate tests

* adjust hook levels test

* sync tests- wlill still fail

* migrate TestANSHook_registerANSHook test

* fixes

* Introduce necessary parameters

* Setup hook test

* Use file instead

* Adapt helper for ans

* Generate go files

* Add ans config to general config

* Change generator

* Regenerate steps

* Allow hook config from user config

Merges with hook config from defaults

* Remove ans flags from root command

* Get environment variables

* Generate files

* Add test when calling merge twice

* Update generator

* Regenerate steps

* Check two location for ans service key env var

* Re-generate

* Fix if

* Generate files with fix

* Duplicate config struct

* Add type casting test for ans config

* Fix helper

* Fix format

* Fix type casting of config

* Revert "Allow hook config from user config"

This reverts commit 4864499a4c497998c9ffc3e157ef491be955e68e.

* Revert "Add test when calling merge twice"

This reverts commit b82320fd07b82f5a597c5071049d918bcf62de00.

* Add ans config tests

* Improve helper code

* Re-generate commands

* Fix helper unit tests

* Change to only one argument

* Fix helper tests

* Re-generate

* Revert piper and config changes

* Re-generate missing step

* Generate new steps

* [ANS] Add servicekey credential to environment (#3684)

* Add ANS credential

* Switch to hooks and remove comments

* Add subsection for ans

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

* Remove changes to piper.go

* Remove formatting

* Add test for ANS

* Define hook credential seperately from step credential

* Add test for retrieval from general section

* Add comment

* Get ans hook info from DefaultValueCache

* [ANS] Add documentation (#3704)

* Add ANS credential

* Switch to hooks and remove comments

* Add subsection for ans

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

* Remove changes to piper.go

* Remove formatting

* Add test for ANS

* Define hook credential seperately from step credential

* Add test for retrieval from general section

* Add comment

* Add documentation

* Review changes

* Review comments

* Improve documentation further

* Add note of two event templates

* Add log level destinction

* Further improvements

* Improve text

* Remove unused things

* Add ANS credential

* Switch to hooks and remove comments

* Add subsection for ans

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

* Remove changes to piper.go

* Remove formatting

* Add test for ANS

* Define hook credential seperately from step credential

* Add test for retrieval from general section

* Add comment

* Get ans hook info from DefaultValueCache

* Improvements

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

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

* New lines

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
Co-authored-by: Roland Stengel <r.stengel@sap.com>
Co-authored-by: Thorsten Duda <thorsten.duda@sap.com>
2022-06-22 13:31:17 +02:00
..
abap enableBuildWithoutValues (#3753) 2022-04-26 17:14:55 +02:00
abaputils Handle empty http response correctly (#3805) 2022-05-25 13:57:13 +02:00
ado ADO - Vault Secret Rotation (#3084) 2021-09-08 16:48:12 +02:00
ans [ANS] logrus hook (#3671) 2022-06-17 16:40:45 +02:00
apim ApiProxyList Command (#3794) 2022-06-21 13:08:00 +02:00
blackduck detectExecuteScan: fix project version limiting api call (#3754) 2022-05-05 09:58:43 +02:00
buildsettings feat(cnbBuild): generate buildSettingInfo 2022-06-15 12:37:21 +02:00
certutils feat(golangBuild): support private modules (#3471) 2022-01-31 10:45:40 +01:00
checkmarx feat(SARIF): ContextRegion is now a pointer, can be omitted. In checkmarxExecuteScan: threadflows now added, only first location saved (#3844) 2022-06-22 08:54:24 +02:00
cloudfoundry Add telemetry for abapEnvironment steps (#3016) 2021-08-04 17:31:16 +02:00
cnbutils feat(cnbBuild): Support of username/password authorization (#3690) 2022-03-31 16:13:21 +02:00
command feat: url log parsing / reporting when executing a command (#3461) 2022-02-25 15:35:44 +01:00
config feat(getDefaults): add parameter for CRD-style config (#3736) 2022-04-19 12:34:40 +02:00
cpi ApiProxyList Command (#3794) 2022-06-21 13:08:00 +02:00
docker fix (whitesourceExecuteScan) keep tar extension for target image donwload (#3774) 2022-05-13 18:56:41 +02:00
documentation replace depreacted strings.Title function (#3786) 2022-05-20 18:50:03 +02:00
format feat(SARIF): ContextRegion is now a pointer, can be omitted. In checkmarxExecuteScan: threadflows now added, only first location saved (#3844) 2022-06-22 08:54:24 +02:00
fortify feat(SARIF): ContextRegion is now a pointer, can be omitted. In checkmarxExecuteScan: threadflows now added, only first location saved (#3844) 2022-06-22 08:54:24 +02:00
gcs GCS Upload fixes (#3387) 2022-01-19 13:16:57 +01:00
generator [ANS] Change helper and re-generate steps (#3675) 2022-06-22 13:31:17 +02:00
git feat(gitopsUpdateDeployment) forcePush (#3665) 2022-04-07 16:33:46 +02:00
github feat(whitesourceExecuteScan): GitHub issue creation + SARIF (#3535) 2022-02-23 09:30:19 +01:00
goget feat(golangBuild): support private modules (#3471) 2022-01-31 10:45:40 +01:00
gradle feat(gradleExecuteBuild, fortifyExecuteScan): gradle improvements (#3807) 2022-06-07 10:24:10 +02:00
hadolint/mocks refactor(hadolint): implement step in GO (#1169) 2020-11-16 15:14:54 +01:00
http fix(orchestrator) usage of correct env variables (#3650) 2022-03-28 09:52:15 +02:00
influx Added go-based influxWriteData step (#2890) 2021-06-30 11:18:49 +02:00
java feat(sonar): reuse existing TLS truststore (#3312) 2021-12-16 12:49:15 +01:00
jenkins fix(jenkins): fix job invocation (#2868) 2021-06-02 16:45:22 +02:00
kubernetes fix(helmExecute): respect version from Chart (#3780) 2022-05-18 08:58:01 +02:00
log [ANS] logrus hook (#3671) 2022-06-17 16:40:45 +02:00
malwarescan feat(malwareExecuteScan): refactoring and docker support (#3421) 2022-01-24 09:48:01 +01:00
maven (feat) mtaBuild publish mtar artifacts to remote remote repo (#3104) 2021-09-23 15:33:30 +02:00
mock Fix helm execute command (#3701) 2022-04-14 15:43:47 +02:00
multiarch chore(multiarch): helper to parse targetArchitectures (#3525) 2022-02-10 16:46:00 +01:00
nexus nexusUpload parameters reading from commonPipelineEnvironment (#2658) 2021-03-10 15:06:42 +01:00
npm chore(npmExecuteScripts): config@2 support (#3607) 2022-03-04 10:26:46 +01:00
orchestrator Reuse SOURCEBRANCH for branch name (#3672) 2022-03-28 13:48:55 +02:00
piperenv feat (cpe) introduce a new artifact cpe type (#3763) 2022-05-03 09:53:12 +02:00
piperutils replace depreacted strings.Title function (#3786) 2022-05-20 18:50:03 +02:00
protecode feat(docker): use crane for pulling docker images (#3652) 2022-03-23 10:02:00 +01:00
reporting feat(detectExecuteScan): SARIF export and GH issue creation (#3637) 2022-03-17 15:32:48 +01:00
sonar fix(sonarExecuteScan): error handling for report metrics (#3512) 2022-02-07 16:41:36 +01:00
splunk Activates debug information for environment variables (#3630) 2022-03-14 10:17:55 +01:00
telemetry fix(orchestrator) usage of correct env variables (#3650) 2022-03-28 09:52:15 +02:00
terraform feat(terraformExecute): pass tf outputs to cpe (#3241) 2021-11-04 10:28:41 +01:00
toolrecord toolrecord: fix web ui URLs for whitesource, close #6 (#3096) 2021-09-10 13:20:54 +02:00
transportrequest Implement Release 3.0.0 of CM-Client (#3664) 2022-04-05 12:33:19 +02:00
validation Fixed validation for possibleValues option (#3228) 2021-11-15 12:06:48 +01:00
vault chore: align Vault naming (#3372) 2021-12-21 11:52:10 +01:00
versioning feat(gradleExecuteBuild, fortifyExecuteScan): gradle improvements (#3807) 2022-06-07 10:24:10 +02:00
whitesource whitesourceExecuteScan : add log level trace (#3745) 2022-04-22 13:19:49 +02:00
xsuaa Add bearer token retrieval function (#3595) 2022-03-16 11:22:48 +01:00
yaml chore(go): simplify code using gofmt -s (#2065) 2020-09-24 08:58:53 +02:00