Siarhei Pazdniakou
cd243ee542
feat(gcs): allow upload to gcs from steps ( #3034 )
...
* Upload reports to Google Cloud Storage bucket
* Added tests. Made fixes
* Update step generation. GCS client was moved to GeneralConfig
* Code was refactored
* Fixed issues
* Fixed issues
* Code correction due to PR comments
* Improved gcs client and integration tests
* Integrated gcp config. Updated step metadata
* Fixed issues. Added tests
* Added cpe, vault, aliases resolving for reporting parameters
* Added tests
* Uncommented DeferExitHandler. Removed useless comments
* fixed cloning of config
* Added comments for exported functions. Removed unused mock
* minor fix
* Implemented setting of report name via paramRef
* some refactoring. Writing tests
* Update pkg/config/reporting.go
* Update cmd/sonarExecuteScan_generated.go
* Apply suggestions from code review
* Update pkg/config/reporting.go
* Update pkg/config/reporting.go
* fixed removing valut secret files
* Update pkg/config/reporting.go
* restore order
* restore order
* Apply suggestions from code review
* go generate
* fixed tests
* Update resources/metadata/sonarExecuteScan.yaml
* Update resources.go
* Fixed tests. Code was regenerated
* changed somewhere gcp to gcs. Fixed one test
* move gcsSubFolder to input parameters
* fixed removing valut secret files
* minor fix in integration tests
* fix integration tests
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2021-12-15 15:07:47 +01:00
Oliver Nocon
f308fbfc0d
feat(getConfig) allow reading stage configuration ( #3026 )
...
* feat(getConfig) allow reading stage configuration
* update test
* use fix version of Selenium Image for Karma tests
2021-08-04 10:09:02 +02:00
Oliver Nocon
805a8fd88f
feat(config): read config/defaults with authentication ( #2975 )
...
* feat(config):read config/defaults with authentication
This change allows to use defaults and config files from a protected GitHub repository.
The options `--customConfig` and `--defaultConfig` already allowed to provide a link to an uprotected file.
Now, by passing a value in the form `<hostname>:<token>` to parameter `gitHubTokens` (this parameter can be passed multiple times) a token can be provided for dedicated hosts.
This makes it possible to use a link like
`https://api.github.com/repos/SAP/jenkins-library/contents/resources/my-defaults.yml?ref=master `
as reference to a default file or similarly as reference to a configuration file.
* update generation to allow protected config/defaults
* fix CodeClimate issues
* update missing generations
2021-07-08 15:26:07 +02:00
Oliver Nocon
0b48bfcc73
feat: retrieve metadata by stepName - corrected ( #2892 )
...
* refactored getConfig to allow stepName param for metadata fetching
* extended step generator
* go generate
* Update cmd/getConfig.go
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
* Update cmd/getConfig.go
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
* Update cmd/getConfig.go
* update generated files
* update golden files to care for generator update
* update and add tests
* update generated files
* Update cmd/getConfig.go
* Update cmd/getConfig.go
* update/fix formatting
* feat: retrieve metadata by stepName - corrected
* update generation
* update condition logic for defaults
* update generation & tests
* support multiple conditions
* update generation
* Add generated
Co-authored-by: Leander Schulz <leander.schulz01@sap.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
Co-authored-by: Sven Merk <s.merk@sap.com>
2021-06-16 08:43:30 +02:00
ffeldmann
b88ebdad6c
feat(splunk) Sending telemetry and logging information to Splunk ( #2796 )
...
* Adds inital splunk hook and logCollector
* Adds documentation of the Splunk hook
* Fixes markdown lint issues and removes comment from telemetry.go file
* Fixes markdown lint issues and adds missing generated file
* Markdown linting
* Changes documentation according to review, adds Splunk token automatically during init
* Adds error handling for marshalling hook config
* Markdown lint und correct Splunk token in httpclient
* Registeres Splunk token as secret and adjusts test cases
* Adds missing error handling and removes unnecessary comments
* Creates new function readPipelineEnvironment, adds tests
* Moves MonitoringData struct, edits defaults for json fields
* Adds gitRepository and gitOwner to telemetry information
* Simplifies readCommonPipelineEnvironment function, adds more descriptive errors, adds automated adding of Splunk prefix token
* Adjusts error handling
* Cleaner error logging
2021-05-17 12:14:04 +02:00
Siarhei Pazdniakou
0673d3fed6
Writing secrets to vault ( #2770 )
...
Co-authored-by: Kevin Stiehl <kevin.stiehl@numericas.de>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-05-06 10:27:23 +02:00
Oliver Nocon
d769fb5148
fix(config): properly handle empty values from cpe ( #2682 )
2021-03-09 09:30:18 +01:00
Christopher Fenner
6999380ee3
chore(go): simplify code using gofmt -s ( #2065 )
2020-09-24 08:58:53 +02:00
Kevin Stiehl
116a91ce28
Fetch config parameters from vault ( #1782 )
...
* added secret fetching from vault
* added rootPath and vault namespaces
* write tests for vault config loading
* fix smaller bugs
* rename rootPath to basePath
* fix integration test
* make basePath optional
* write more tests
* remove unnecessary code
* make basePath configurable
* remove mixin for vault
* rewrite tests
* fix tests for searching over multiple paths
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-07-22 11:15:48 +02:00
Daniel Kurzynski
61a669778a
Apply alias to secrets ( #1802 )
2020-07-15 21:05:22 +02:00
Daniel Mieg
7f69f4eb16
Support lists in commonPipelineEnvironment ( #1797 )
...
* Enable write Lists
* Enable read
* Add tests
* Fix unit test
* CodeClimate Refactor
* Add comment
2020-07-15 10:09:42 +02:00
Daniel Kurzynski
fb3c6b5978
Ignore wrong type of alias ( #1778 )
2020-07-09 14:13:06 +02:00
Daniel Kurzynski
9a30758115
Consider stage config from custom defaults ( #1670 )
2020-06-16 09:06:37 +02:00
Stephan Aßmus
5ab4dedcb2
Optionally ignore custom defaults ( #1538 )
...
* Add parameter "--ignoreCustomDefaults"
* Pass to piper customDefaults from config also via --defaultConfig
... and add "--ignoreCustomDefaults".
* Log output when ignoring customDefaults
Co-authored-by: Daniel Kurzynski <daniel.kurzynski@sap.com>
2020-05-14 10:50:58 +02:00
Christopher Fenner
b0144614e5
improve error message when parsing config ( #1387 )
...
* improve error message when parsing config
* adjust test case
Co-authored-by: Florian Wilhelm <florian.wilhelm02@sap.com>
2020-04-09 13:40:04 +02:00
Stephan Aßmus
da0f25fd7b
Piper-Go: Allow aliases also for inputs of type "secret" ( #1355 )
...
* Fix typos
* Support aliases also for secrets
* Adapt & extend Unit Tests
* Output deprecation warning for param/secret aliases
... if the alias is marked as 'deprecated'.
2020-04-01 20:46:33 +02:00
Oliver Nocon
91b6b0900f
Config and Defaults via http(s) ( #1302 )
...
* Config and Defaults via http(s)
Add the possibility to use http(s) urls as path to
* config.yml
* defaults
* Remove comment
* Addressing PR feedback
* Fix error handling
2020-03-31 08:47:09 +02:00
Oliver Nocon
8fbeddb26c
Golang step metadata: Config aliases for steps ( #1293 )
...
* Golang step metadata: Config aliases for steps
This will ease following scenarios:
* config migration due to step name changes
* re-use of more general config, e.g. `mavenExecute` in `mavenBuild`
* fix CodeClimate finding
* Fix panic if original stage config does not exist yet
2020-03-19 17:24:35 +01:00
Oliver Nocon
a46b57e6b4
Persisted pipeline environment for golang library ( #1091 )
...
* Use commonPipelineEnvironment in go binary
* Update groovy part incl. tests
* Rework structure and naming
* Support influx resources in steps
* Update tests and some cleanups
* Add correct defer handling
* Address PR feedback
* Fix test
* Update resources.go
Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2020-01-15 12:16:25 +01:00
Oliver Nocon
69bb2c9e60
Fix issues in config resolution ( #1000 )
...
* Respect defaults from step definition everywhere
* prevent empty config to overwrite default in aliasing
Address PR feedback
2019-11-22 10:30:44 +01:00
Oliver Nocon
0f33f7a2ef
Consider custom defaults in config.yml ( #995 )
...
* Consider custom defaults in config.yml
2019-11-21 16:09:57 +01:00
Sven Merk
376419e0db
Add mixin of dependent defaults
2019-11-05 16:30:41 +01:00
Oliver Nocon
e01b3327fd
Go configuration - add aliasing functionality ( #925 )
...
* Go configuration - add aliasing functionality
This assists in backward compatibility cases.
It is now possible to define per parameter aliases.
2019-10-29 10:58:24 +01:00
Oliver Nocon
c1eb9f5c70
Provide first parts for golang implementation ( #905 )
...
* Provide first parts for golang implementation
2019-10-22 15:41:27 +02:00