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

932 Commits

Author SHA1 Message Date
thtri
4c2845b79c
fix(fortify):add SSC project identifier to ouput and JSON report (#3787) 2022-05-20 10:24:16 +02:00
Adrien
3d48364862
Fix project config reset when preset is set (#3782) 2022-05-18 17:10:00 +02:00
Julian Schmitt
6714794066
Create awsS3Upload (#3737)
* add Step awsS3Upload

* fix JSON Read

* fix groovy wrapper

* change credentials to secret text

* Change credentials type to token

* add cleanup for environment variables

* Add AwsS3UploadCommand to piper.go

* add documentation of awsS3Upload

* Fix JSON String Example in Documentation

* add the Upload of whole directories

* add Logging to awsS3Upload.go

* imporve Logging

* fix and improve unit tests

* fix non-existing-filepaths-Bug

* fix windows filepaths

* remove ... from logging

* change step description

* fix PR Tests

* remove redundant code

* try to run tests sequentially

* fix file.Close

* executed go mod tidy

* requested changes

* fix comments and awsCredentials

* Update documentation/docs/steps/awsS3Upload.md

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>

* use temporary files for unit tests

* executed go generate

Co-authored-by: ffeldmann <f.feldmann@sap.com>
Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
Co-authored-by: Thorsten Duda <thorsten.duda@sap.com>
2022-05-18 10:37:54 +02:00
Oliver Nocon
6070549704
fix(helmExecute): respect version from Chart (#3780)
* fix(helmExecute): respect version from Chart

using version from CPE can create failure situations in case format is not semver.
This is the case for maven artifacts, for example.

* chore: simplify condition

* chore: cleanup

* chore: cleanup
2022-05-18 08:58:01 +02:00
Thorsten Duda
434e4529d5
cfcli update (#3777)
* cfcli update

* cfcli update
2022-05-17 08:53:19 +02:00
Mayur Belur Mohan
ef2db4c2b0
ApiProviderUpload Command (#3663)
* ApiProviderUpload Command

* formatting fix

* formatting fix

* formatting fix

* formatting fix

* CodeReview Changes

* CodeReview Fix

* CodeReview fix

* CodeReview Fix

* CodeReview FIx

* CodeReview FIxes

* CodeReview Fixes

* CodeReview Fixes

* CodeReview Fixes

* CodeReview Fix

* CodeReview Fix

* CodeReview Fixes

* CodeReview Fix

* Doc Fixes

* CodeReview Fix

* CodeReview Fixes

* Doc Fixes

* Update cmd/apiProviderUpload_test.go

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>

* CodeReview FIxes

* Update cmd/apiProviderUpload.go

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>

* CodeReview Fixes

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2022-05-16 11:52:04 +02:00
Oliver Nocon
57347702d4
fix(versioning): correct propagated version (#3778) 2022-05-16 10:02:25 +02:00
Anil Keshav
e6724d7f05
fix (whitesourceExecuteScan) keep tar extension for target image donwload (#3774)
* explicitly adding tar extension to project name when constructing the targetFilePath for whitesource docker image download

* comments

* correcting comment for better readability

* replace spaces in the project name with underscroe

* better comments

* passing legacy format download

* appending format to value

* keeping the download format for protecode as legacy

* improving docu

* keeping legacy format the default

* keeping tar file name same as project name to avoid duplicate names

* keeping legacy format download hard coded

Co-authored-by: anilkeshav27 <you@example.com>
2022-05-13 18:56:41 +02:00
Ashly Mathew
3c288e81ad
fix (golang) : publish binaries to custom in cpe (#3767)
Signed-off-by: Ashly Mathew <ashly.mathew@sap.com>
2022-05-05 15:06:42 +02:00
Ashly Mathew
823ef47db6
Golang build publish binaries and add group id (#3749)
* Add golang binaries to CPE and add groupID in coordinates

Signed-off-by: Ashly Mathew <ashly.mathew@sap.com>

* Introducing binaries as artifacts

Signed-off-by: Ashly Mathew <ashly.mathew@sap.com>
2022-05-05 12:39:59 +02:00
Giridhar Shenoy
fe9b3a796b
detectExecuteScan: fix project version limiting api call (#3754)
* fix project version limiting issue

* add tests for detectExecute
2022-05-05 09:58:43 +02:00
Adrien
9d56cda0f9
Add Checkmarx failure message to Piper error log (#3716) 2022-05-03 17:34:14 +02:00
Daniel Bernd
a3f1234a60
Feature: ATC & AUNIT - ObjectSetLibrary(OSL) usage (#3755)
* own OSL go File & first changes ATC step

* OSL Integration in AUnit & ATC steps 1

* OSL & Unit Tests

* Unit Tests 1

* OSL - AUnit & ATC usage

* Unittest ATC: packagetree --> package incl. subpackages

* correct spelling

* yaml & generated update

* generated Metadata

Co-authored-by: Daniel Bernd <93763187+danManSAP@users.noreply.github.com>
2022-04-27 13:30:43 +02:00
Anil Keshav
1272b763f8
feat (pythonBuild) enable creation of a virtual environment (venv) (#3746)
* create virtual env

* adding bin bash source

* using sources from bin bash

* trying with bash

* appending filename to source

* using standard pip install

* not using root user

* adding path for pip

* using virtual env

* using virtual env name in path

* removing virtual env

* adding file path manually

* using root

* not using root and postpone removing venv

* trying to use the python from venv

* test to remove the venve

* seeing which python

* using symlink for python

* unit test

* python docu stub

* fix unit test and yaml extra line

* fixing unit test

* unit test success case fix

* unit test fix

* unit test fixes

* unit test and default publish flag

* fix integration test

Co-authored-by: anilkeshav27 <you@example.com>
2022-04-26 14:15:24 +02:00
Pavel Busko
2740f00134 added missing git credentials handling
Co-authored-by: Gareth Evans <g.evans@sap.com>
2022-04-26 09:38:49 +02:00
Gareth Evans
74b6b09609 fix(golangBuild) properly handle multi main package builds
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
2022-04-26 09:38:49 +02:00
Jordi van Liempt
eb73cae888
feat(getDefaults): add parameter for CRD-style config (#3736)
* export LoadConditionsV1() in config pkg

* getDefaults: read stage conditions as PipelineDefinitionV1

* add getDefaults useV1 tests

* add comment (pointed out by code climate analysis)

* small addition to comment (from previous commit)

Co-authored-by: I557621 <jordi.van.liempt@sap.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2022-04-19 12:34:40 +02:00
Vitalii Sidorov
63cdfc0e68
Fix helm execute command (#3701)
* Add small fix

* fix unit-tests

* Add deploymentName and packageVersion as flags

* small fix

* Change getting version of helm chart

* small fix

Co-authored-by: “Vitalii <“vitalii.sidorov@sap.com”>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2022-04-14 15:43:47 +02:00
Siarhei Pazdniakou
d519966fe5
feat(gradleExecuteBuild): publish (upload to staging) (#3662)
* gradle publish

* Fix gradle utils

* Added unit test

* Add descriptions for parameters

* Added unit tests

* fix publish init script template

* fix artifactId and groupId

* fix project path

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2022-04-14 14:59:09 +02:00
Martin Zuber
7e0ec525bf
Use full file path when trying to publish MTAR in mtaBuild step. (#3735) 2022-04-13 14:50:13 +02:00
tiloKo
fa24ab9ed8
increase default timeout to 16min (#3732) 2022-04-13 09:03:22 +02:00
Ralf Pannemans
34a0d63d9f Use builder:base instead of builder:full because nc is no longer needed 2022-04-12 16:41:51 +02:00
rosemarieB
9fdaf86856
Enable additional piecelist for assembly (#3730)
* add useClassicCTS

* add option additionalPiecelist

* Update abapEnvironmentAssemblePackages.go
2022-04-12 16:00:17 +02:00
rosemarieB
1ffe22903e
Enable classic cts (#3728)
* add useClassicCTS

* debug output and unit test

* unsaved fix

* error logging

* Update abapEnvironmentAssemblePackages.go

* Update abapEnvironmentAssemblePackages.go

* add general scope and remove logging

* Update bfw.go

* Update abapEnvironmentAssemblePackages.go

* Update abapEnvironmentAssemblePackages.go

* Update package.go

* Update abapEnvironmentAssemblePackages.go

* change scope and add certificates

Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>
2022-04-12 14:39:42 +02:00
Ralf Pannemans
f2305a6b08
feat(cnbBuild) Allow path to be glob (#3726)
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
2022-04-12 11:04:05 +02:00
Anil Keshav
6dcda42dd6
fix (mavenBuild) removing root path when creating keystore (#3714)
* remving root paths for trust store

* adding read / write permission to keystore

Co-authored-by: anilkeshav27 <you@example.com>
2022-04-08 13:19:08 +02:00
Christopher Fenner
465bab8ddf
feat(githubRelease): publish multiple assets (#3702)
* add parameter for uploading multiple assets

* use assetPathList parameter

* add test case

* fix typo

* fix test case

* generage ghClient mock

* add test files

* make function testable

* add test case

* regenerate mock

* regenerate mocks
2022-04-08 11:29:07 +02:00
Michael
6676da1f9d
feat(gitopsUpdateDeployment) forcePush (#3665)
* feat(gitopsUpdateDeployment) forcePush

fix(gitopsUpdateDeployment) include registry

The push operation in this step can be forced to bypass branch-protection

Signed-off-by: Michael Sprauer <Michael.Sprauer@sap.com>

* add unit test

Signed-off-by: Michael Sprauer <Michael.Sprauer@sap.com>

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2022-04-07 16:33:46 +02:00
xgoffin
fb9792ad71
feat(fortifyExecuteScan): optimization of the SARIF conversion code (#3710)
* feat(fortifyExecuteScan): query SSC once for batch audit data

* fix(fortifyExecuteScan): check audit data length in all cases

* feat(fortifyExecuteScan): in fpr_to_sarif, better detection of error cases, unit tests

* fix(log): comment useless error message

* fix(fortifyExecuteScan): clarify log message

* fix(fortifyExecuteScan): adapt unit tests
2022-04-07 13:11:52 +02:00
Anke Ravalitera
5a4b7c9925
Creating a new scenario for gcts pipeline steps (#3711)
* updated gCTS_Scenario.md gCTSExecuteABAPUnitTests.md gCTSExecuteABAPUnitTests.yaml gCTSExecuteABAPQualityChecks.yaml

* add gCTS images for scenario

* text updates to gctsRollback step

* go generate

* updated gCTS_Scenario.md

* gCTS_Scenario.md updates

* corrected text in gCTS_Scenario.md

* correct formatting in gCTS_Scenario.md

* getting used to trailing spaces

Co-authored-by: Rinita Asani <rinita.asani@sap.com>
2022-04-07 09:45:14 +02:00
Anil Keshav
f8af3c154e
changing trust store permission (#3709)
Co-authored-by: anilkeshav27 <you@example.com>
2022-04-06 16:06:04 +02:00
Julian Schmitt
6151f36d88
Implement Release 3.0.0 of CM-Client (#3664)
* Remove --backend-type

* Delete CTS in isChangeDevelopment and change Dockerimage of CM-Client

* fix groovy unit tests

* another fix of groovy unit tests

* try to fix import of fork for Jenkins-Testing

* add workflow to create Go Binary for Jenkins-Server

* Change RepoOwner to test in Fork

* remove previous changes

* adjust docker image for TransportRequestCreate and Release

* Remove CTS from Documentation

Co-authored-by: Thorsten Duda <thorsten.duda@sap.com>
2022-04-05 12:33:19 +02:00
Philipp Stehle
56981b8f53
feat(cnbBuild): exclude .git folder from cnb workspace by default (#3699)
Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
2022-04-05 10:09:56 +02:00
Anil Keshav
aa74e090d5
fix (pythonBuild) run as root and generate build settings info (#3695)
* adding PIP to BuildTool.groovy

* trying to run the container with root

* only creating sdist

* including wheel distribution

* adding settings info

Co-authored-by: anilkeshav27 <you@example.com>
2022-04-05 09:16:46 +02:00
xgoffin
3c55d3c99c
feat(checkmarxExecuteScan): convert Checkmarx xml report to SARIF (#3696)
* feat(checkmarxExecuteScan): sarif conversion for Checkmarx XML reports

* feat(checkmarxExecuteScan): added taxonomies and similarityID

* fix(checkmarxExecuteScan): proper handling of ruleId and ruleIndex

* fix(sarif): mistype in checkmarx properties

* fix(checkmarxExecuteScan): fixed occasional panics when handling audit comment

* chore(sarif): proper variable naming

* chore(code): fix missing and unrecognized comments

* trigger PR

* fix(format): extra space

Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2022-04-04 16:12:35 +02:00
Philipp Stehle
6b6208a35c
remove confusing log message (#3685) 2022-04-04 15:00:14 +02:00
Anil Keshav
2bd49fbe19
feat (shellExecute) extend sources param to download scripts. (#3674)
* first version to download script from git

* unit test adjust

* adding git token

* info messages

* removing extra info message

* changing file permission for scrtips

* modying sources to handle https download

* adding script downloads

* commenting the file permission change

* changing persmission

* adding header to download file

* adding perimssions

* adding perimssions

* not touching file permissions

* adding to pipeline

* return file name

* changing script name

* adding file permission changes

* adding file permission changes

* using current directory

* file permission

* downloading in .pipeline folder

* removing permission handeling

* improving the step docu

* improving the step docu

* unit test and code cleaning

* fix typo

* adding read execute permission

* fix unit test

* fix unit test

* removing negative test

Co-authored-by: anilkeshav27 <you@example.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2022-03-31 18:18:20 +02:00
Oliver Nocon
62b3a9a459
fix(versioning): properly consider go.mod (#3687)
* fix(versioning): properly consider go.mod

* fix test
2022-03-31 17:07:10 +02:00
Oliver Nocon
20c5f0a63b
fix(optimization) use proper cpe reference (#3683) 2022-03-31 10:52:54 +02:00
Pavel Busko
1f750af16d
feat(cnbBuild): cache buildpacks during multi-image build (#3635)
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
2022-03-30 13:58:16 +02:00
Philipp Stehle
f4f11dba7f
chore(kubernetesDeploy): bump docker image to helm 3.8.1 (#3470) 2022-03-30 13:23:16 +02:00
Oliver Nocon
276844e6a2
fix(optimization): expose parameters to general section (#3680) 2022-03-30 12:20:51 +02:00
Vitalii Sidorov
d62c3d73a0
Add helm dependency command (#3669)
* Add helm dependency command

* Change name of flag for package command

Co-authored-by: “Vitalii <“vitalii.sidorov@sap.com”>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2022-03-30 08:18:51 +02:00
Anke Ravalitera
b6a5ceaa03
Update gCTS steps (#3673)
* gCTS Scenario and two images

* Updated gCTS Scenario

* updated gCTS_Scenario.md and images

* added checkstyle stage

* upated the gCTSExecuteABAPQualityChecks.yaml file with severity information

* updates to gCTSExecuteABAPQualityChecks and gCTSExecuteABAPUnitTests steps

* updated gCTS_Scenario.md and relevant images

* Add more explanation for workspace parameter, change atc variant default value to DEFAULT

* Fix a type in description of workspace parameter

* changes to gctsExecuteABApUnitTests.md gctsExecuteABAPQualityChecks.yaml and gctsExecuteABApUnitTests.yaml

* final updates to gCTS steps and scenario

* added env. to GIT_COMMIT in gCTSExecuteABAPQualityChecks.md and gCTSExecuteABAPUnitTests.md

* remove the gScenario description from the branch

* Correct column typo in yaml file and generate files

* Add a new line in docu for gCTSExecuteABAPUnitTests

* Remove blank line from docu in gctsExecuteABAPUnitTests

Co-authored-by: Rinita Asani <rinita.asani@sap.com>
Co-authored-by: Sarat Krishnan <78093145+sarat-krk@users.noreply.github.com>
2022-03-29 21:24:10 +02:00
TheShifter
188e743f7b
PythonBuild: Implementation of pythonBuild step (#3483)
* Implementation of pythonBuild step

* minor update and refactoring

* minor update

* add integration test and test project to testdata dir

* remove generated build data dir

* Rewrite some logic. Minor fix in integration tests for python

* Add new input parameters to pythonBuild.yaml

* rewrite logic
remove some checks

* rollback

* resolve merge conflict in piper.go
Update logic in python build. Create bom now works fine

* remove duplicate line

* refactoring fix

* resolve comment. Remove install build and change build command. Change twine upload command

* add groovy wrapper for pythonBuild step

* Rewrite tests. Remove some cheks from pythonBuild.go

* add some test to pythonBuild_test.go

* Add some parameters and credentials to the pythonBuild.groovy

* fix issue in unit tests

* add pythonBuild to fieldRelatedWhitelist

* update integration test for pythonBuild

* add imports

* update integration tests and add a new one

* minor fix

* fix some issues in integration tests

* update integration tests. Make it works again

Co-authored-by: Anil Keshav <anil.keshav@sap.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2022-03-29 19:01:44 +02:00
ffeldmann
ccc1c976ee
fix(orchestrator) usage of correct env variables (#3650)
* Reorders getApiInformation, changes variables to get start time, adjusts and adds test cases
* Changes the way to get apiInformation and reduces number of requests
* Changes getting pipeline start time from correct env variable
* Refactors getApiInformation functionality
* Adds GetBuildReason() for Azure and Jenkins
* Updates JobURL for ADO
2022-03-28 09:52:15 +02:00
Christian Volk
26bf3808fe
chore(checkmarxExecuteScan): split and trim filterPattern (#3661) 2022-03-23 11:45:05 +01:00
Christian Volk
22f6aa156f
feat(docker): use crane for pulling docker images (#3652) 2022-03-23 10:02:00 +01:00
Ralf Pannemans
62a7f6336a
feat(cnbbuild) use commitid fom cpe as tag if artifact version is not available (#3659)
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
Co-authored-by: Sumit Kulhadia <sumit.kulhadia@sap.com>
2022-03-22 14:25:20 +01:00
Oliver Nocon
fed08c2399
fix(whitesourceExecuteScan): proper container options for golang (#3660) 2022-03-22 10:40:33 +01:00