1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00
Commit Graph

3279 Commits

Author SHA1 Message Date
Daniel Kurzynski
d952cb89d6
Add docker image for whitesource and mta (#2374) 2020-11-26 10:45:47 +01:00
Christopher Fenner
860b28884c
chore(jenkins): expose artifacts save method (#2426)
* fix code smell

* expose artifact.Save function

* regenerate mock file
2020-11-26 10:06:14 +01:00
Sven Merk
26af83b1fc
Add slash backslash compatibility (#2425)
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-11-26 09:18:01 +01:00
Thilaknath
104435c8dd
Show user friendly error messages for pipeline restart step. (#2409)
* Add message parameter to pipelineRestart to make error messages user friendly

* Update the parameter to the correct name

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-11-26 08:03:22 +01:00
Kevin Stiehl
e2335b7181
(documentation) fix documentation render bug (#2423)
* fix documentation render bug

* fix tests

* fix complexity
2020-11-26 07:51:43 +01:00
Saschl
ee27cbba05
Removed hardcoded pom.xml and added test (#2393)
Test verifies that correct pom.xml is used as provided in the parameters

Also removed the --file pom.xml in the tests as maven should take pom.xml as default
2020-11-25 17:03:11 +01:00
Christopher Fenner
eff1933a61
refactor(checks): use warnings-ng plugin (#2398)
* use recordIssues

* fix c&p issue

* simplify code

* fix

* add quality gates

* change qgates to TOTAL_HIGH

* remove pattern for tasks

* use TOTAL_ERROR for checkstyle

* fix indent

* use deprecated threshold parameters

* debug messages

* transform legacy qgates

* fix

* adjust test cases

* correct qgates

* correct legacy thresholds

* fix typo

* remove deprecated defaults

* add test case

* log use tool

* add notification

* remove deprecated defaults

* remove deprecated parameter

* adjust legacy threshold message

* add q gates on error and high for all check tools

* Apply suggestions from code review

* adjust test cases

* remove duplicate assert

* Fail if aggregation is still defined

* update docs

* fix indent

* Update documentation/docs/steps/checksPublishResults.md

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

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-11-25 15:39:33 +01:00
Sven Merk
5d1782aa01
checkmarxExecuteScan: adapt to 9.2 api (#2363)
* Update checkmarxExecuteScan.go

* api mods

* Switch default

* Fix decode

* mod marshalling

* Fix unmarshalling

* Code fmt and small fix

* Optimize preset handling

* Integer handling

* Fix test

* cleanup

* go fmt

* Improve test
2020-11-25 13:47:26 +01:00
Michael
fd0e8d4c9f
[typo] relese -> release (#2420) 2020-11-25 13:35:37 +01:00
Florian Wilhelm
55f25ace49
npmExecuteScripts: install dependencies by default (#2376) 2020-11-24 18:15:30 +01:00
Florian Wilhelm
9d5bd8b09b
Remove references to cloud sdk (#2418)
Not required anymore as Cloud SDK was merged into General Purpose Pipeline
2020-11-23 17:48:53 +01:00
Peter Persiel
120afe8277
Change troubleshooting links (#2413)
Co-authored-by: Dominik Lendle <59923031+dominiklendle@users.noreply.github.com>
2020-11-23 13:59:12 +01:00
Marcus Holl
f3f221ee80
generator helper: support for map[string]interface{} (#2232)
Up to now the code generator is not able to handle the type
map[string]interface{} which is important for nested
configurations.

With that change we support such nested configuration.

Fo now parameters with a map type are not supported via
command line parameters. Those parameters are simply
ommitted. But with this change is it possible to read
such nested structures from the pipeline configuration
(.pipeline/config.yml).

As a next step we can discuss if we would like to support
such values also via command line parameters. One possible
approach could be

```
./piper <command> -myParam key1=val1 --myParam key2=val2
```

which gets finally collected inside our map:

```
map["key1"] = "val1"
map["key2"] = "val2"
```

This is of course hard to do for deeper nestings. In that case
providing a pointer to a file might be more suitable.

In that context we need to consider how to
  - declare the default values for map like parameters in our
    metadata files.
  - deal with the different types we have for the parameter
    itself wrt the yaml like config on the one hand and on the
    level of the command line parameters on the other hand. Maybe for
    that we have to extend the metadata format (e.g. describe an
    alternate type receiving the values from the command line, like
    []string. With that approach values for simple nested (... not deep
    nested) params can be provided like described above, it would be
    possible to represent these parameters for the command line parser
    as string slice entries like "[]string{key1=val1, key2=val2". These
    parameters needs in this case transformed "by us" into the map we
    use further down the road.

In case we agree in principle on an approach as outlined here we should
adjust the golden files reflecting this use case.
2020-11-23 07:55:20 +01:00
Peter Persiel
5e4e438d8e
Build and Publish Add-on Products on SAP Cloud Platform ABAP Environment: Move limitations to top (#2412)
* Move limitations to top

* Remove blank line

* Update abapEnvironmentAddons.md
2020-11-22 17:25:34 +01:00
Stephan Aßmus
008055237c
Run consumer tests in GPP instead of Cloud SDK Pipeline (#2405)
Co-authored-by: Daniel Kurzynski <daniel.kurzynski@sap.com>
Co-authored-by: Florian Wilhelm <florian.wilhelm02@sap.com>
2020-11-20 15:27:27 +01:00
lndrschlz
b9bab27833
feat: expose complete step metadata through generated function (#2329)
* exposing step metadata through generator

* add metadata_generated.go

* fix step go test generation

* metadata fields added to generated files

* added generated files

* removed image placeholder from fortify step

* refactored step meta generation

* go generate

* fixed metadata generator and tests

* added output resource fields/tags to metadata generator

* fix string in metadata_generated

* go generate

* fixed generator

* go generate

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-11-20 08:13:59 +01:00
Stephan Aßmus
cb6b34f042
Unstash buildDescriptor where neoDeploy may need it (#2408) 2020-11-19 19:18:00 +01:00
Florian Wilhelm
fc7fa9f293
Document default implementation of stages (#2403) 2020-11-19 19:04:48 +01:00
Daniel Mieg
01c896c73b
Add scenario documentation for test setup (#2402)
* Adapt docu

* Improve docu

* Small adaptions

* Small fix

* Fix typos
2020-11-19 15:47:01 +01:00
Dominik Lendle
a7994515f6
remove excess logging in abapEnvironmentPullGitRepo step (#2392)
* remove excess logging

* correct logging behaviour
2020-11-18 11:18:06 +01:00
Florian Wilhelm
0ce792fab7
Document options to deal with Docker Hub rate limit (#2382) 2020-11-18 08:41:00 +01:00
Stephan Aßmus
c74500545c
dockerExecute: Add compatibility aliasing for renamed params (#2391) 2020-11-17 17:44:19 +01:00
Daniel Kurzynski
720ba0c875
Remove sdk docs (#2365)
* Remove sdk docs

* Apply suggestions from code review

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

* Add hint regarding Cloud SDK Pipeline

* Update documentation/docs/guidedtour.md

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

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-11-17 17:35:01 +01:00
Stephan Aßmus
cbd932a5eb
dockerExecute: Wrap all code in docker.withRegistry() (#2384)
* wrap all in docker.withRegistry()

* Renamed parameter

No backwards alias, since it never worked before.

* Fix code and tests

* Rename parameter as per review

* Rename parameter as per review

Co-authored-by: Daniel Kurzynski <daniel.kurzynski@sap.com>
2020-11-17 14:53:09 +01:00
Daniel Kurzynski
d91fb9053f
Use devxci/mbtci:1.0.16.1 (#2389)
* Use docker.pkg.github.com/sap/cloud-mta-build-tool/mbtci:1.0.16

* Revert and use devxci/mbtci:1.0.16.1

* Fix typo
2020-11-17 14:24:36 +01:00
Kevin Stiehl
dfab156427
Feature/approle secret id rotation (#2311)
* add new step vault secret

* add debug log

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-11-17 13:49:31 +01:00
Daniel Kurzynski
8653780cf6
Stash also original jar (#2387) 2020-11-17 12:04:25 +01:00
Dominik Lendle
948b90b35a
catch error in ATC step (#2380)
Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>
2020-11-17 11:18:16 +01:00
tiloKo
109f5cd1bf
Wait between posts (#2355)
* Update abapEnvironmentAssemblePackages.go

* Save 6 Seconds in Unit Tests

Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>
2020-11-17 10:26:15 +01:00
Christopher Fenner
1514be9857
chore: fix markdownlint findings (#2385)
* activate MD022

* fix MD022 findings

* activate MD030

* fix MD030 findings

* activate MD038

* fix MD038 findings

* activate MD031

* fix MD031 findings

* activate MD042

* fix MD042 findings

* activate MD032

* fix MD032 findings

* activate MD039

* activate MD007

* fix MD007 findings

* activate MD026

* fix MD026 findings

* activate MD001

* fix MD001 findings

* acknowledge disabled rules

* fix code climate MD032 finding
2020-11-17 09:20:47 +01:00
Christopher Fenner
052a65d495
chore(code climate): ignore generated mock files (#2378)
fixes #2377
2020-11-17 08:23:39 +01:00
Christopher Fenner
20fd6e82ff
fix: markdownlint findings for MD012 (#2383)
* activate MD012

* activate MD012

* fix MD012 findings

* fix MD012
2020-11-16 18:22:38 +01:00
Christopher Fenner
70eab49cb7
chore(code climate):sync config with local mdlint config (#2381) 2020-11-16 17:50:31 +01:00
Stephan Aßmus
0491bf3712
Always use artifactPrepareVersion (#2360)
artifactSetVersion was documented as being "deprecated" since a while, but was still used.
2020-11-16 16:38:17 +01:00
Christopher Fenner
81c8553d6a
refactor(hadolint): implement step in GO (#1169)
* initial commit of yaml file

* initial commit for HaDoLint in GO

* add helper function to load file from url

* load config file

* write report information to disk

* comment the code

* refactor groovy code

* remove download function from FileUtils

* use http.Downloader

* rename step files

* update generated files

* update generated files

* remove duplicate commands

* add credentials for config url

* add generated test file

* reuse piperExecuteBin functions

* correct step name

* update go step

* deactivate test

* fix import

* use differing go step name

* rename step

* correct result publishing

* correct command name

* expose tls insecure flag

* hand through error

* disable tls verification

* fix tls disabling

* use credentials

* mow

* reformat

* add qgate only if set

* correct report name

* remove old defaults

* add qgate to defaults

* handle report name

* restore default

* remove unused step config

* use piperExecuteBin

* remove obsolete type

* add test cases

* remove groovy tests

* move client parameter handling to run function

* use custom interfaces and mockery

* remove commented code

* correct struct names

* rename parameter dockerfile

* add further asserts

* cleanup

* change file permission to read/write

* remove tokenize

* add further comments

* init http client only if necessary

* add todo

* Revert "rename parameter dockerfile"

This reverts commit 2a570685b8.

* add alias for dockerfile parameter

* correct test case

* Apply suggestions from code review

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

* add comment about mock assertions

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-11-16 15:14:54 +01:00
Christopher Fenner
e8c74a4867
chore(sonar): set proper error categories (#2358)
* expose GetExitCode

* set error category for user issues

* fix typo

* Update command.go

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-11-16 14:54:22 +01:00
tiloKo
2a5514c116
AAK endpoint default (#2356)
Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>
2020-11-16 13:40:57 +01:00
Kevin Stiehl
9cb605ba60
[Documentation ]fix checkmarx docs (#2372)
* fix checkmarx docs

* go generate

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-11-16 13:03:31 +01:00
Kevin Stiehl
6c51b76fcf
(documentation) Vault Setup documentation (#2366)
* add vault documentation

* fix test

* fix typo

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-11-16 11:53:52 +01:00
shellmann
61c190bb2b
Install artifacts before Fortify scan (#2351)
Co-authored-by: Daniel Kurzynski <daniel.kurzynski@sap.com>
2020-11-16 10:29:21 +01:00
Peter Persiel
fb36f9545a
abapEnvironmentCreateSystem instead of Clone Repo (#2353)
Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>
2020-11-16 09:19:05 +01:00
Christopher Fenner
b6e4ae5094
Update config.yml (#2371)
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-11-13 16:51:25 +01:00
Florian Wilhelm
647e1ef0bd
Add deployment to performance tests stage and enable stage (#2370)
Co-authored-by: Kevin Hudemann <kevin.hudemann@sap.com>
2020-11-13 16:31:45 +01:00
Marcus Holl
3e3a29ffd2
Support additional volume mounts for cm related steps (#2287)
* Fix asserts

* support additional volume mounts for cm related steps
2020-11-13 13:45:30 +01:00
Kevin Hudemann
83daa33e65
Update defaults for npmExecuteScripts and mavenExecuteIntegration to run install (#2369)
This change updates the defaults for npmExecuteScripts to run npm install and mavenExecuteIntegration to install all artifacts by default.
2020-11-13 13:01:02 +01:00
Srinikitha Kondreddy
6c26a791a3
Add an option to clone from specific repository (#2322) 2020-11-12 20:35:59 +01:00
Kevin Hudemann
7a04bb9749
Add runStep conditions for mavenExecuteIntegration and npmExecuteScripts in Integration stage (#2361)
This change adds runStep conditions for the steps mavenExecuteIntegration and
npmExecuteScripts for the stage Integration.
2020-11-12 16:50:57 +01:00
Florian Wilhelm
5fa2985d31
Unstash sources in integration tests (#2362)
* Unstash sources in integration tests

* Use stashSettings.yml instead
2020-11-12 16:23:55 +01:00
Christopher Fenner
fe58c3fed2
refactor: remove duplicate function from interface (#2359)
* remove duplicate function from interface

* remove import to net/http
2020-11-12 15:24:10 +01:00
Stephan Aßmus
23d378d4ce
Conditions for npmExecuteScripts in Additional Unit Tests (#2357) 2020-11-12 12:41:11 +01:00