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

26 Commits

Author SHA1 Message Date
Oliver Nocon
d47a17c8fc
feat(whitesource): consolidated reporting and versioning alignment (#2571)
* update reporting and add todo comments

* enhance reporting, allow directory creation for reports

* properly pass reports

* update templating and increase verbosity of errors

* add todo

* add detail table

* update sorting

* add test and improve error message

* fix error message in test

* extend tests

* enhance tests

* enhance versioning behavior accoring to #1846

* create markdown overview report

* small fix

* fix small issue

* make sure that report directory exists

* align reporting directory with default directory from UA

* add missing comments

* add policy check incl. tests

* enhance logging and tests

* update versioning to allow custom version usage properly

* fix report paths and golang image

* update styling of md

* update test
2021-02-10 16:18:00 +01:00
Oliver Nocon
39089bed5d
kanikoExecute: improve user experience (#2141)
* kanikoExecute: improve user experience

* ensure proper tags

* update permissions

in case a container runs with a different user
we need to make sure that the orchestrator user
can work on the file

* update permissions

* ensure availablility of directories on Jenkins

* (fix) clean up tmp dir in test

* add resilience for incorrect step yaml

* incorporate PR feedback
2020-10-14 11:13:08 +02:00
Oliver Nocon
b18bcee533
artifactPrepareVersion: improve error categorization (#1936)
* artifactPrepareVersion: improve error categorization

* Update getConfig.go

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-08-19 20:20:00 +02:00
Stephan Aßmus
b1a0cb089c
piper: Use stageName from parametersJSON, log value and source (#1920)
stageName from parametersJSON was ignored up until now and there was a TODO in the code. The precedence from the TODO is not clear to me. It said "first env.STAGE_NAME, second: parametersJSON, third: flag". So maybe I implemented it wrongly, but it would be easy to change. Right now, STAGE_NAME is always in the ENV when piper is called from Jenkins, but to mimic the behavior of being able to pass `stageName` in the parameters and override the ENV value, this is what happens in go as well now.

The reason why `stageName` needs to be evaluated before other step parameters is that it affects config evaluation. So I've added a function which is called first in `PrepareConfig()`.
2020-08-13 17:55:12 +02:00
lndrschlz
db13b2f9ce
moved container context method to config package and expose for reuse (#1770) 2020-07-10 10:32:26 +02:00
Oliver Nocon
d5d510719d
piperExecuteBin - prevent non-speaking exit code 1 error (#1584)
* piperExecuteBin - prevent non-speaking exit code 1 error

Make sure that error during context resolution gets more context.

* properly provide golang errors

* improve error message, when no details are available

* Add error category

* Update getConfig.go
2020-05-26 07:58:03 +02:00
Oliver Nocon
a0ded365c5
Fix container condition handling (#1562)
* Add additional tests
* Update handling of containers
* Properly consider existing config at root level
* Fix parameter filtering
* Fix tests for adapted filter handling
2020-05-20 10:50:35 +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
70c000338f
fix: read config.yaml and config.yml in getConfig command (#1400) 2020-04-14 18:10:56 +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
Stephan Aßmus
96030304a1
Restore possibility to run piper without config file (#1345) 2020-03-31 16:06:27 +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
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
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
Marcus Holl
9cd4950437
Don't swallow error raised from file exists helper method (#1019)
* Don't swallow error raised from file exists helper method

* streamline
2019-12-11 10:13:23 +01:00
Marcus Holl
0abda0c67b
Remove redundancy: no duplicate stepName (#998)
* Remove redundancy: no duplicate stepName

Up to now: provided explicity via command line argument and also contained in the
step metadata (which are as a file also provided as command line argument).

Now it is retrieved from the metadata file.

* Step name is not a required parameter anymore

Since the step name is derived from the config file

* Adjust method signature in test
2019-11-22 10:14:21 +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
Marcus Holl
7c5a8a73bc
Helper for fileExists (#954)
Since we need it at several places (next use case will be step xsDeploy) we should
have a helper for that.
2019-11-07 08:17:42 +01:00
Oliver Nocon
ede322c8bb
Export general configuration - part 2 (#957)
* Export general configuration - part 2

First part in #956 missed to export the elements of the struct ...

* Add comment for exported struct

* Add function for opening config files
2019-11-06 16:22:50 +01:00
Oliver Nocon
bb230d3b9b
Export general configuration (#956)
Allow for package external access to general configuration.

Use-case: re-use individual steps
2019-11-06 14:07:41 +01:00
Sven Merk
6721c59a30
Merge branch 'master' into cfg-hierarchical-defaults 2019-11-06 12:13:15 +01:00
Marcus Holl
a456282d6a
fix: getting config should also work in case there is no project config (#951) 2019-11-06 10:28:15 +01:00
Sven Merk
c241066e21 Add capability for hierarchical defaults in golang 2019-11-04 16:29:39 +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
1f34511407
Provide golang based Piper library (#915)
* Provide golang based Piper  library

This includes the main command
and a sub command for config resolution
2019-10-24 10:59:58 +02:00