Oliver Nocon
bcb76eff06
fix(windows build): fix golang.org/x/sys ( #2887 )
...
* chore: release binaries for darwin and win
* fix(windows build): fix golang.org/x/sys
This is necessary doe to a dependency of github.com/hashicorp/vault to docker@v17.12.0-ce-rc1.0.20200309214505-aa6a9891b09c+incompatible\pkg\system\filesys_windows.go
This creates a build error.
Further information can be found here:
https://github.com/golang/go/issues/34610
* Update .github/workflows/upload-go-master.yml
* update go.sum
2021-06-10 16:50:17 +02:00
Christopher Fenner
824cd7d768
fix(jenkins): fix job invocation ( #2868 )
...
* update mock
* update signarture
* add test case
* use latest gojenkins
* add integration test
* update mock
* add todo
* add job wrapper
* add job mock
* add test cases
* refactor
* cleanup
* update integration test case
2021-06-02 16:45:22 +02:00
Oliver Nocon
d8a8a73184
feat(commonPipelineEnvironment): add artifact coordinates ( #2867 )
...
* add coordinates to CPE
* revert go.mod changes
2021-06-02 15:41:05 +02:00
Christopher Fenner
40c32598a4
feat(jenkins): update jenkins go dependency ( #2848 )
...
* update dependency
* use context
* regenerate mock
* decapitalize error messages
* use getBuildFromQueueID
* add comments about mockery
* update mocks
* update tests
* add context parameter
* pull up context
* update mocks
* update tests
2021-05-28 11:12:42 +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
Kevin Stiehl
f2b0683880
add token revocation ( #2686 )
...
* add token revocation
* update mocks
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-03-10 08:36:50 +01:00
Christopher Fenner
cb3fa7c293
feat(sonar): add output of measurements ( #2218 )
...
* add sonarqube measurements
* fetch measurements from API
* add api for fetching issue counts
* add debug outputs
* add further severities
* log number of issues
* report failure
* expose method to send request
* Fixed what was broken.
* add debug output
* wip
* correct opaque property
* push client handling to apiClient.go
* use correct API URL
* correct log outputs
* remove logging
* remove option validation
* extend search options
* restructure
* rename api client file
* simplify client usage
* simplify issue client
* write sonar values to influx
* extract issue service
* reorder imports
* add sonar integration test
* allow unknown fields
* add test case
* add test case
* remove
* fix
* Update http.go
* Apply suggestions from code review
* Update cmd/sonarExecuteScan.go
* rework test cases
* use explicit returns
* add task service
* add waitfortask
* fix typo
* remove fixme
* expose poll interval
* rename test cases
* add test cases
* use newAPIClient method
* use waitForTask
* rename services
* finalize code
* handle error
* move defer
* move types
* add test case
* use http.status...
* add test case
* expose api endpoint names
* extract api client
* adjust test cases
* Update integration-tests-pr.yaml
* Update integration-tests.yaml
* improve require message
* Update integration-tests-pr.yaml
* Update integration-tests-pr.yaml
2021-02-24 15:44:23 +01:00
Christopher Fenner
9ec282fd0c
test: allow usage of httpmock in tests ( #2576 )
...
* add test case
* add flag for default transport
* Update go.mod
* Update go.sum
* fix spaces
* fix format
* Update http_test.go
* Update http_test.go
* Update http_test.go
* Update http_test.go
* Update http_test.go
2021-02-04 14:58:35 +01:00
Sven Merk
205d59c1ed
Remove obsolete parameter ( #2515 )
...
* Remove obsolete parameter
* Update pkg/fortify/fortify_test.go
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
* Update fortify_test.go
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-01-15 13:55:13 +01:00
Florian Wilhelm
7dc2c86758
Revert "Update Go dependencies ( #2441 )" ( #2449 )
...
This reverts commit e03f2ba98c
.
There is a regression in the go lib which was updated in this commit
2020-12-04 16:10:47 +01:00
Florian Wilhelm
e03f2ba98c
Update Go dependencies ( #2441 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2020-12-04 11:09:11 +01:00
Christopher Fenner
8d682abc83
add package for Jenkins interactions ( #2296 )
2020-11-02 17:11:18 +01:00
Christopher Fenner
86af3efcfe
fix(influx): adjust influx field types for fortify ( #2219 )
...
* adjust influx field types
* fix test case
* simplify type conversion
2020-10-22 11:40:42 +02:00
Florian Wilhelm
f34d515a88
Automated go dependency update ( #2115 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-10-05 10:14:50 +02:00
Oliver Nocon
5856e35d50
Add step to set GitHub status ( #2012 )
...
* add step for GitHub branch protection check
* add command to piper command
* remove unnecessary parameter
* Update resources/metadata/githubbranchprotection.yaml
* Add step to set GitHub status
* add groovy part
* update generation & go mod tidy
* update groovy tests
* update github api to fix bug
* add comment
* go mod tidy
* update naming
* update docs
* update docs
* Update resources/metadata/githubstatus.yaml
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
* Update resources/metadata/githubstatus.yaml
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
* Update resources/metadata/githubstatus.yaml
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
* update generated files
* update GitHub step order
* Update interface usage
* do not export interfaces
* go mod tidy
Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-09-14 18:08:24 +02:00
Oliver Nocon
eef3bcde60
Add step for GitHub branch protection check (2) ( #2016 )
...
* 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
* Add step to check GitHub branch protection settings
* include PR review feedabck
Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2020-09-14 12:05:12 +02:00
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
Oliver Nocon
69b145e83f
artifactPrepareVersion: improve error categorization ( #1889 )
...
* artifactPrepareVersion: improve error categorization
* go mod tidy
2020-08-06 11:13:19 +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
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
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
Christopher Fenner
60b7d3a8df
refactor(sonar): implement Sonar step in GO ( #1042 )
...
* refactor(sonar): add initial metadata file for GO-based sonar step
* refactor(sonar): add initial generated files for GO-based sonar step
* refactor(sonar): add initial step file for GO-based sonar step
* refactor(sonar): add sonar cmd to executable
* refactor(sonar): cleanup metadata file
* fix(go): use capital TLS in golang names
* add download of Sonar scanner cli
* move download & unzip methods to FileUtils
* download certificate files
* use http.Downloader
* update generated code
* add slice prefix function
* update sonar step
* add test cases
* update docs
* use node:lts image
* use latest sonar-scanner
* add test cases
* use latest sonar-scanner
* fix test case
* change things
* return errors on functions
* limit changeID visibility
* use lowercase scm provider
* add test case for legacy PRs
* add test case
* update docs
* use local temp dir
* extend parameter visibility to GENERAL
* use SONAR_AUTH_TOKEN
* remove comments
* update generated code
* Apply suggestions from code review
* change to private fields
* use setter for sonar options & environment
* remove obsolete return statement
* add comment about Downloader mock
* add test case for custom options
* handle custom options
* refactor slice functions
* fix go fmt
* fix generated step code
* update docs
2020-03-23 10:38:31 +01: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
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
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
de31cde9b8
Add PiperGoUtils for downloading piper binary ( #928 )
...
* Add PiperGoUtils for downloading piper binary
PiperGoUtils provide the link between a Jenkins library step and the library step execution running in a go binary.
It makes sure that an adequate binary is available.
* fix CodeClimate finding
* Remove Delimiter and add download resilience.
2019-11-06 11:28:10 +01:00