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

41 Commits

Author SHA1 Message Date
Oliver Nocon
d68e466c28
Revert "Add step for GitHub branch protection check (#2010)" (#2014)
This reverts commit f1cfca2e76.
2020-09-11 18:56:51 +02:00
Oliver Nocon
f1cfca2e76
Add step for GitHub branch protection check (#2010)
* add step for GitHub branch protection check

* add command to piper command

* remove unnecessary parameter

* Update resources/metadata/githubbranchprotection.yaml

* add groovy part

* update generation & go mod tidy

* update groovy tests

* fix bug with go-github version

Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2020-09-11 15:28:43 +02:00
Florian Wilhelm
ed1da5e048
Automated go dependency update (#1979)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-09-04 13:42:34 +02:00
Florian Wilhelm
869aa116e1
Automated go dependency update (#1877)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-08-03 12:51:32 +02:00
Marcus Holl
e41e43611b
cloud foundry deploy go (#1743)
Provide cloudFoundryDeploy step in GO layer.

Groovy part untouched. Groovy-Stub needs to be provided later (with a feature toggle in order to be able to switch back)

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-07-31 12:38:00 +02:00
Kevin Stiehl
644f18b491
feat(vault): Added package to get secrets from vault (#1763)
* Added Vault package

* added support for logical path lookups instead of api paths

* added integration tests

* add integration tests and mock tests

* Replace mock with mockery generated one

	* update tests to use mockery
        * create mocks sub package
2020-07-08 08:20:15 +02:00
Florian Wilhelm
f8a9abf88c
Automated go dependency update (#1756)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-07-03 13:35:09 +02:00
Jordan Levin
34967c502c
Whitesource scan (MVP) (#1658)
* Whitesource MVP for Gradle, Golang, and NPM/Yarn

* Refactoring

* Refactor and cleanup, better error checking

* publish stepResults, use pkg/versioning, bubble up errors, add gomod versioning support

* Run gofmt and cleanup comments

* Resolve PR comments

* Update resources/metadata/whitesource.yaml

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>

* Only determine project coordinates if they are missing

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

* Gradle versioning artifact

* fix gradle artifact version regexp and refactor

* Fix token extraction from output buffer

* Fix some issues with pip and jsonfile versioning logic

* Remove useless spacing

* Remove unnecessary test file and fix naming style for JSONDescriptor

* Automatically download wss-unified-agent if file does not exist

* adds downloadVulnerabilityReport, checkSecurityViolations, minor refactoring

* adds config.ReportDirectoryName, improves readability

* Version-wide reporting for vulnerabilities and list of libraries.

* Refactor and improve build accuracy

* fix sed command

* Add includes file pattern config option

* Adds --exclude command line flag

* run go mod tidy and regenerate step framework

* Fix unit tests

* revert changes

* poll project status before downloading reports

* merge with master

* go mod tidy, go fmt, and fix whitesource unit test

* sync go.mod

* sync go.mod again

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-07-01 07:54:13 +02:00
Marcus Holl
d53ff9de0b
YamlUtil (prepares for cf deploy) (#1624)
Migrates basically `com/sap/piper/variablesubstitution/YamlUtils.groovy`.
2020-06-25 10:59:30 +02:00
Oliver Nocon
eafe383d54
Add error category parsing to cmd execution (#1703)
* Add error category parsing to cmd execution

It is now possible to define `ErrorCategoryMapping` as a `map[string][]string` on a `Command`.
The format contains the category as key which has a list of error patterns assigned.
Example:

```
cmd := Command{
  ErrorCategoryMapping: map[string][]string
    "build": {"build failed"},
    "compliance": {"vulnerabilities found", "outdated components found"},
    "test": {"some tests failed"},
  },
}
```

Setting this map triggers console log parsing when executing a command.
If a match is found the error category is stored and
it will automatically be added to the `errorDetails.json`.

* clean up go.mod

* fix test

* fix test

* Update DEVELOPMENT.md

* fix tests

* address long console content without line breaks

* scan condition update

* fix test

* add missing comment for exported function

* Update pkg/command/command.go

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

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2020-06-24 10:04:05 +02:00
Daniel Kurzynski
7c0c5242e3
Revert go mod change (#1696) 2020-06-22 10:04:25 +02:00
Oliver Nocon
d8444d51f2
Add possibility to add category to failures (#1692)
* Add possibility to add category to failures

It is now possible to set the error category within the flow.
When exiting the program the error category can be used.

There is  a convenience function available for exiting with a previously set category,
for example

```
log.SetErrorCategory(log.ErrorCompliance)
...
log.FatalError(err, "configuration error")
```

* extend test

* go mod tidy

* add missing comment

* update information about error categories

* Update DEVELOPMENT.md
2020-06-22 08:21:38 +02:00
Daniel Kurzynski
be01dd3869
Add schema patch step in go (#1683)
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-06-18 14:50:46 +02:00
Florian Wilhelm
285537f6a4
Automated go dependency update (#1630)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-06-04 13:52:19 +02:00
Oliver Nocon
6053cae6c5
Cleanup go.mod (#1603)
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-05-28 11:04:28 +02:00
Sven Merk
af2a01c064
Fortify implementation in golang (#1428) 2020-05-25 19:48:59 +02:00
Florian Wilhelm
bd1e0a1071
Fix npm registry config (#1564) 2020-05-20 13:41:23 +02:00
Oliver Nocon
033ff8da6f
go: align used yaml package (#1504) 2020-05-05 15:54:50 +02:00
lndrschlz
39e30ff1b4
Added hook configuration; added sentry hook and tests (#1497)
* Added hook configuration; added sentry hook and tests
* steps generated by step framework
* added comments and renamed correlationID
* formatted comment on NewSentryHook method
* fix generator step tests
2020-05-05 08:36:24 +02:00
Chris Bo
fb4cfd84ec
Introducing new step: "gctsCreateRepository" (#1424)
With the step gctsCreateRepository it is possible to create a local gCTS repository on an ABAP server

Co-authored-by: Marcus Holl <marcus.holl@sap.com>
2020-04-24 15:31:41 +02:00
Christopher Fenner
989c47db2c
feat(sonar): extract sonar project link to report JSON (#1390)
* add test cases for sonar pkg

* add sonar pkg

* read task report and write reports JSON

* use alias

* rename type

* set read permission on created files

* archive reports

* handle empty report lists

* use filepath

* simplify report creation

* improve error message

* Revert "archive reports"

This reverts commit ba4b56fec1.

* improve test cases

* Add descriptions

Co-Authored-By: Stephan Aßmus <stephan.assmus@sap.com>

* improve tests

Co-Authored-By: Stephan Aßmus <stephan.assmus@sap.com>

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-04-21 15:45:52 +02:00
Florian Wilhelm
c9cc2e1d30
Automated go dependency update (#1423)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-04-21 09:16:08 +02:00
Oliver Nocon
b9781ce50c
artifactPrepareVersioning: support more buildTools (#1367)
* artifactPrepareVersioning: support more buildTools
2020-04-15 13:12:43 +02:00
Oliver Nocon
999197b919
Add step to prepare the version for an artifact (#1343) 2020-04-03 16:34:40 +02:00
Stephan Aßmus
20b65d5a2e
Implement nexusUpload command and tests (#1255)
Artifacts to upload are assembled for MTA projects and Maven projects with optional application sub-module. Then maven deploy:deploy-file is used as backend to upload bundles of artifacts plus sub-artifacts.

Co-authored-by: Florian Wilhelm <florian.wilhelm02@sap.com>
2020-03-20 18:20:52 +01:00
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
Oliver Nocon
e81f40f645
Provide foundation for integration-like tests (#1131) 2020-02-18 15:19:50 +01:00
redehnroV
bb068ed76b
Provide docker functionality (#1155)
* Provide docker functionality to retrieve images


Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2020-02-06 10:47:45 +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
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
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
8e29b70ea2
Fix parameters for githubPublishrelease (#1004) 2019-11-22 15:58:24 +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
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
04d288a13f Merge branch 'cfg-hierarchical-defaults' of https://github.com/SAP/jenkins-library into cfg-hierarchical-defaults 2019-11-05 16:31:50 +01:00
Sven Merk
376419e0db Add mixin of dependent defaults 2019-11-05 16:30:41 +01:00
OliverNocon
4302066327 Merge master 2019-11-04 16:11:13 +01:00
OliverNocon
6256a0b9aa Update githubPublishRelease 2019-11-04 16:07:30 +01:00
Christopher Fenner
742a67fc60 Add GO logging with logrus (#938)
* add log package
* add logrus dependency
* add logging to karma step
* add log stepName to generator, respect verbose flag
2019-11-04 14:43:33 +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