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

61 Commits

Author SHA1 Message Date
Marcus Holl
190a4708a2
go: mta build (#1128)
move mtaBuild step from groovy to go.

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-02-25 14:33:34 +01:00
Florian Geckeler
48fa0a7521
Add 'Code generated by' header to stepGoTemplate 2020-02-21 12:56:09 +01:00
Marcus Holl
d04edd5e8d
unify mocking for shell and exec runner (#1120)
* same behaviour for shellRunner and execRunner wrt errors and stdout

* replace shouldFail with shouldFailOnCommand

* [formatting only] format struct

* Move to regex for execptions and stdout

* shrink code
2020-02-21 10:56:53 +01:00
redehnroV
716ac7735d
Fixed error handling gitHubPublishRelease (#1184) 2020-02-14 14:56:23 +01:00
redehnroV
be03b3dfc1
Adjust documentation for Protecode (#1175) 2020-02-12 15:57:39 +01:00
Marcus Holl
38652eed04
[refactoring] Condence common functions for execRunner and shellRunner into runner interface (#1127)
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2020-02-12 10:12:58 +01:00
dominiklendle
2007a94174
Add step cloudFoundryDeleteService (#1097) 2020-02-10 14:53:12 +01:00
redehnroV
c37df0d55e
Adjust protecode influx parameter (#1161) 2020-02-07 14:12:40 +01:00
redehnroV
2ebf2010b7
Protecode as GoLang (#1119)
* Protecode as go implementation

Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-02-06 16:16:34 +01:00
Sven Merk
3139255312
Fix chars in checkmarx test, improve development.md (#1154)
* Fix chars in test

* Update DEVELOPMENT.md

* Update DEVELOPMENT.md

* Update DEVELOPMENT.md
2020-02-06 09:43:19 +01:00
Oliver Nocon
cead027bfb
Support yml and yaml extension of config files (#1153)
* Support yml and yaml extension of config files
* Update cmd/piper.go

Co-Authored-By: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2020-02-06 09:08:15 +01:00
Daniel Mieg
2e742c7ed3
Fix formatting of documentation (#1151)
* Fix formatting of documentation

* Regenerate go files
2020-02-05 15:46:14 +01:00
Daniel Mieg
6f0bde154b
Go implementation for abapEnvironmentPullGitRepo() (#1107) 2020-02-04 11:43:27 +01:00
Oliver Nocon
9c1bd04752
Streamline step generation (#1142)
* Streamline step generation
* Include PR feedback, update DEVELOPMENT.md

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2020-02-04 10:46:43 +01:00
Sven Merk
36423eb78d
Avoid potential collisions among steps (#1141)
* Avoid potential collisions amongst steps

* Improve code, move to JenkinsUtils

* Improve code

* Improve tests

* Fix test

* Add scope on golang side
2020-02-03 15:25:49 +01:00
Oliver Nocon
b542d15998
Enhance telemetry reporting (#1133)
* Enhance telemetry reporting
* Use central telemetry data object
* Add duration

Co-Authored-By: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2020-01-31 14:06:08 +01:00
Oliver Nocon
152c4dc9d2
Pass container image via CPE (#1113)
* Pass container image via CPE
* Update generated step
* update map name to better represent content
2020-01-29 16:03:18 +01:00
Marcus Holl
40f0a17b45
re-use execRunner for envExecRunner (#1117)
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-01-29 14:22:43 +01:00
Christopher Fenner
aa3fb8adb4
feat(go): add telemetry reporting (#1100)
* Add telemetry support

* First round telemetry

* Add telemetry flag

* fix: move files to avoid import cycles

* add noTelemetry as global config option

* Respect telemetry configuration for reporting

* add site id, swa endpoint

* correct logger initialization

* add http logic

* rename init method

* rename consts & types

* convert struct to payload

* convert data to payload string

* move activation flag out of data structure

* extract types to own file

* build query using net/url

* correct field mapping

* extract notify coding to own file

* cleanup parameter mapping

* preare base data

* fix codeclimate issue

* correct test case

* fill values from env

* test all fields

* untrack notify.go

* ignore empty custom values

* cleanup data.go

* add test cases

* cleanup

* add usage reporting to karma step

* add usage reporting to step generator

* externalise siteID

* correct custom field names

* test env handling

* simplify method signature

* revert parameter negation

* correct import

* adjust golden file

* inclease log level

* ignore test case

* Revert "inclease log level"

This reverts commit 70cae0e029.

* add test case for envvars

* remove duplicate reporting

* remove duplicate reporting

* correct format

* regenerate checkmarx file

* add log message on deactivation

* rename function

* add comments to understand SWA mapping

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-01-29 13:17:54 +01:00
Christopher Fenner
92441577d8
fix(NPM): change NodeJS image to LTS (#1069)
* change NodeJS image to current LTS

* Update default_pipeline_environment.yml

* Update SonarExecuteScanTest.groovy

* use node:lts-stretch image
2020-01-29 11:17:56 +01:00
Sven Merk
cbe368fe36
Checkmarx as golang (#1075)
* Added base functionality for checkmarx interaction

* Extend http client with file upload capabilities

* Latest changes

* Add debug logging

* Introduce Uploader interface

* Add tests for checkmarx client

* Hook new checkmarx command

* Improve coverage

* Add tests

* Improved test coverage and fixed code

* Add influx reporting

* Add alternation capabilities

* Add groovy step

* Try fix cmd

* Enhancements

* Fix report generation

* Final performance improvements

* Fix code

* Structure code, cleanup

* Improvements

* Fix codeclimate issue

* Update groovy

* Adapt latest changes to http

* Fix test

* Fix http tests

* Fix test

* Fix test

* Fix test 2

* Fix code

* Fix code 2

* Fix code

* Code

* Fix

* Fix

* Add report and link handling

* Fix returns, add groovy test

* Review comments

* Added doc template

* Docs update

* Remove SAP internals

* Better status display

* Add name to link

* Fix test

* Fix

* Fix verbose handling

* Fix verbose handling 2

* Fix verbose handling 3

* Fix

* Tiny improvements

* Regenerate

* Fix test

* Fix test code

* Fix verbosity issue

* Fix test

* Fix test

* Fix test
2020-01-27 23:40:53 +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
Oliver Nocon
7597c7d228
Add step githubCreatePullRequest (#1068)
* Add step githubCreatePullRequest
2019-12-16 16:34:12 +00:00
Oliver Nocon
4f57738888
Detect: Add golang implementation (#1049)
Add detect golang implementation
2019-12-13 09:55:45 +00: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
9ee2926018
xs deploy go (#931)
introduce xs deploy
2019-12-05 14:22:38 +01:00
Oliver Nocon
8e29b70ea2
Fix parameters for githubPublishrelease (#1004) 2019-11-22 15:58:24 +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
e671094308
Use piper binary for githubPublishRelease (#990)
* Use piper binary for githubPublishRelease
2019-11-21 16:34:22 +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
e6f9d541ca
Add stdout/stderr to the interfaces (shellRunner, execRunner) (#948)
Otherwise we cannot set the streams on the level of the interfaces.
2019-11-19 14:29:53 +01:00
Marcus Holl
c9883bf5b0
Pr/read project config only if it exists (#959)
* Read the project config only if it exists

This avoid trying reading the file and have the control flow based
on errors. Beside that it helps troubleshooting when we have some
logging (debug level only).

* formatting only

* Adjust log level
2019-11-11 09:52:44 +01:00
Marcus Holl
f4aa5fc377
Let the mocks fail if error is provided from a test (#940)
There was some command parsing with failure in case it started with fail. That is
IMO less transparent. Now we prepare more explicit with a failure from outside. This
enables us to prepare an error like we expect it in the free wild.
2019-11-07 09:02:11 +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
Christopher Fenner
ae221a8ea7
Merge branch 'master' into goGithub 2019-11-06 12:28:48 +01:00
Sven Merk
6721c59a30
Merge branch 'master' into cfg-hierarchical-defaults 2019-11-06 12:13:15 +01:00
Oliver Nocon
d9a7faed0f
Merge branch 'master' into goGithub 2019-11-06 10:32:22 +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
OliverNocon
deb965e2b4 Fix CodeClimate finding with generator update 2019-11-06 09:12:50 +01:00
OliverNocon
5c87d4775c Ensure asset update for latest release only 2019-11-06 09:05:07 +01:00
Oliver Nocon
147bc745af
Merge branch 'master' into cfg-hierarchical-defaults 2019-11-05 21:52:47 +01:00
Marcus Holl
58128be970 apply formatter (#950) 2019-11-05 21:51:44 +01:00
OliverNocon
48bfc10956 Address PR feedback 2019-11-05 17:33:00 +01:00
OliverNocon
1a034aea4c Update parameter names 2019-11-05 15:13:04 +01:00
OliverNocon
50153f42c7 Add tests 2019-11-05 14:37:44 +01:00
Sven Merk
0ba9baab6a
Merge branch 'master' into cfg-hierarchical-defaults 2019-11-04 16:31:02 +01:00
Sven Merk
c241066e21 Add capability for hierarchical defaults in golang 2019-11-04 16:29:39 +01:00