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

121 Commits

Author SHA1 Message Date
Jordi van Liempt
c77920946d
chore(integration): Skip failing Karma integration test for now (#4538)
Co-authored-by: jliempt <>
2023-08-28 15:50:35 +02:00
Jk1484
e54d603898
chore(deps): update golang version to 1.19 (#4533)
Co-authored-by: I557621 <jordi.van.liempt@sap.com>
2023-08-23 16:29:02 +02:00
Jordi van Liempt
0ba4c2206c
chore(deps): Replace io/ioutil package (#4494)
* update all deprecated ioutil usages

* forgotten changes

* add missing imports

* undo changing comment

* add missing 'os' import

* fix integration test

---------

Co-authored-by: I557621 <jordi.van.liempt@sap.com>
Co-authored-by: Gulom Alimov <gulomjon.alimov@sap.com>
2023-08-16 12:57:04 +02:00
Ralf Pannemans
97edad076a
feat(cnbbuild): add build summary (#4506)
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
2023-08-09 09:18:48 +02:00
aibaend1
a247dc2694
adding verbose log of cyclonedx (#4492)
* adding log of cyclonedx

* fix test

* fix integration test

* fix assertion of test

---------

Co-authored-by: asadu <aibyn_sadu@epam.com>
2023-08-02 13:47:06 +06:00
Ashly Mathew
9a0b84a953
Pin version of golang BOM to 1.4.0 (#4462) 2023-07-12 17:49:11 +02:00
Ashly Mathew
d631b98a41
chore(test): update docker image used for Gauge integration tests (#4458)
* Change gauge tests docker image to node buster
2023-07-11 15:47:57 +02:00
Pavel Busko
610e212306
feat(cnbBuild) Add support for pre and post-buildpacks (#4448)
* Add pre and post buildpacks

Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
Co-authored-by: Pavel Busko <pavel.busko@sap.com>

* fix integration tests

Co-authored-by: Pavel Busko <pavel.busko@sap.com>
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>

* simplify if clauses

Co-authored-by: Pavel Busko <pavel.busko@sap.com>

---------

Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
2023-07-06 11:34:05 +02:00
Pavel Busko
13f1e94ade
fix(cnbBuild): read dockerConfigJSON from CPE and merge it with user-provided (#4444)
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
2023-07-04 14:19:02 +02:00
Pavel Busko
1befaa80a2
fix(cnbBuild): correctly construct docker config using credentials (#4441)
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
2023-07-03 08:55:06 +00:00
Pavel Busko
d8dacda121
feat(cnbBuild): support setting registry username and password via parameters (#4426)
* feat(cnbBuild): support setting registry username and password via parameters

* fix gitops integration test assertion

Co-authored-by: Pavel Busko <pavel.busko@sap.com>

* Update integration/integration_gitops_test.go

---------

Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
2023-06-30 12:02:35 +00:00
Jk1484
a2109c59b5
fix(gradle): Pin schema version of cyclonedx (#4367)
Co-authored-by: Ashly Mathew <ashly.mathew@sap.com>
Co-authored-by: Vyacheslav Starostin <32613074+vstarostin@users.noreply.github.com>
2023-05-30 16:21:16 +06:00
Ashly Mathew
b4e678333b
fix(Python) :Pin version of cyclonedx package for python builds (#4356) 2023-05-22 14:03:40 +02:00
Jk1484
ffc931aad1
feat(golangBuild): use 'unit' build tag to include tests during test execution (#4345)
* Added unit tag as argument. Added description to runTests command. Changed code generator to have unit build tag in generated unit test files.

* Added unit build tag to all unit test files.

* added to new unit test unit build tag

* Update verify-go.yml

* small fix

---------

Co-authored-by: Muhammadali Nazarov <Muhammadali.Nazarov@acronis.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2023-05-03 21:02:11 +05:00
Christopher Fenner
bee1ffe4f1
feat(golangBuild): create test report json file (#4306)
* feat(golangBuild): create test report json file

* Update golangBuild_test.go

* Update golangBuild_test.go

* Update integration_golang_test.go

* Update integration_golang_test.go

* Update golangBuild.go

* rename test files

* rename
2023-04-05 15:07:54 +02:00
Pavel Busko
81d9a0ac8c
feat(cnbBuild): support Vault general purpose secrets as a binding content source (#4281)
* feat(cnbBuild): support Vault general purpose secrets as a binding content source

Co-authored-by: Pavel Busko <pavel.busko@sap.com>

* fix npm project integration test

Co-authored-by: Pavel Busko <pavel.busko@sap.com>

---------

Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
Co-authored-by: Sumit Kulhadia <sumit.kulhadia@sap.com>
2023-03-31 09:36:59 +02:00
gerstneralex
f5c33d51bb
Tms export (#4160)
* Change parameter type of nodeExtDescriptorMapping

(cherry picked from commit ca7ce0485a)

* Remove usage of the depricated ioutil package

(cherry picked from commit 9821915b33)

* Fix cmd failure if neither git/commitId nor customDescription are
provided

(cherry picked from commit c362681e45)

* Fix unit test

(cherry picked from commit 53a90aabb5)

* Step metadata, step code generation

* change type of nodeExtDescriptorMapping for export

* Refactoring and export implementation

* integration test

* Add export step

* Integration test

* format

* discard piper.go

* Review related changes

* restore piper.go

* remove unused method

* Extend documentation

* Add parameter useGoStep to tmsUpload.groovy

* Regenerate steps

* Rename function

* refactor constants

* Add error path tests

* Move some code to tms package

* Move more code to tms

* Combine tmsUpload, tmsUtils

* Add groovy wrapper

* add parameters to groovy step

* add import

* jenkinsUtils instance

* comment namedUser logic in groovy

* namedUser param

* remove logic for namedUser param

* Remove TMS integration tests

* discard changes in tmsUpload.groovy

* Remove parameters

* Restore parameters

* Change type of NodeExtDescriptorMapping to map[string]interface{}

* tmsUpload: Change type of NodeExtDescriptorMapping to map

* Resolve ioutil deprecation

* Review related changes

* Formatting

* Review related improvements

* Add tmsUtils test

* Formatting tmsUtils_test

* Remove parameters from groovy wrapper

* Remove tmsUtils_test

* Add TMS steps to fieldRelatedWhitelist

* Add integration test

* Add test to github_actions_integration_test_list.yml

* Move test helper method

* Step documentation placeholder

* Remove parameter StashContent

* Restore cmd/integrationArtifactTransport.go

---------

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2023-03-27 16:55:29 +02:00
gerstneralex
cfe21ebb7e
it test (#4134)
* it test

* transfer credentials

* Change parameter type of nodeExtDescriptorMapping

* Extend test

* Fix unit test

* Remove usage of the depricated ioutil package

* Fix cmd failure if neither git/commitId nor customDescription are
provided

* Extend test

* Add TMS test to the job matrix

* Map env. variable

* Remove usage of the env. TMS_UPLOAD_IT_KEY

* remove os

* update test

* use os.Gerenv

* test fix

* Update integration-tests.yml

* env mapping in it pr workflow

* print tmsServiceKey

* read env with upper case

* Update integration-tests.yml

* Update integration-tests.yml

* Update integration-tests-pr.yml

* Delete cover.out

* Remove TMS service key from environment in integration test workflow job

* Extend integration tests

* Revert change parameter type of nodeExtDescriptorMapping

* Extend tests

* Extend tests

* Remove unused method

* Change default TR description

* Add check for custom description

* Remove personal data from MTARs

* Register client secret to log as secret

* Move RegisterSecret to earlier point in runtime

* RegisterSecret for encodedUsernameColonPassword

* Update integration/integration_tms_upload_test.go

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

* Use one test data directory

* Add a negative test

* fix config file name

---------

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2023-03-07 17:49:28 +01:00
Christopher Fenner
278c5a7125
fix(sonar): update integration test (#4241)
* Update integration_sonar_test.go

* Disable TestNexusIntegration

---------

Co-authored-by: Vyacheslav Starostin <32613074+vstarostin@users.noreply.github.com>
2023-02-22 15:19:56 +06:00
Ralf Pannemans
906512a162
feat(cnbbuild): allow bindings to have multiple keys (#4231)
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
2023-02-16 15:29:08 +01:00
Pavel Busko
c16fba873e
fix(syft): correctly set DOCKER_CONFIG env variable (#4158)
* fix(syft): correctly set DOCKER_CONFIG env variable
2022-12-13 15:37:06 +01:00
Pavel Busko
63a79c9e41
feat(cnbBuild) generate SBOM files with syft (#4150)
* feat(cnbBuild) generate SBOM files with syft

Co-authored-by: Pavel Busko <pavel.busko@sap.com>
Co-authored-by: Sumit Kulhadia <sumit.kulhadia@sap.com>
2022-12-13 10:51:14 +01:00
Philipp Stehle
f5b6580e4c
feat(cnbBuild): allow setting the default process type (#4140) 2022-12-12 09:33:54 +01:00
Jakob Marius Kjaer
452b2a1ef5
refactor: rebranding from scp to btp (#4049)
* refactor: rebranding 

rebranding from SAP Cloud Platform to SAP BTP

* refactor: rebranding from SCP to BTP

Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>
2022-11-29 09:52:23 +01:00
Christopher Fenner
07eeb2f33e
feat: update node image for various steps to new LTS (#3913)
* update node image for steps

* update defaults

* update generated sources

* update tests

Co-authored-by: Vyacheslav Starostin <vyacheslav.starostin@sap.com>
2022-09-26 18:40:55 +06:00
Alexey Matvievsky
2dfca180a7
(feat) Golang integration tests dynamic workflow
* Dynamic version detection of Golang 

* Dynamic Golang integration tests run matrix

* Golang timeout to build set at 5 min

* Golang integration test timeout to run set at 10 min

* Consumer tests timeout set at 20 min

Co-authored-by: Alexey Matvievsky <alexey.matvievsky@sap.com>
2022-09-22 19:12:13 +02:00
Alexey Matvievsky
e5f2f1414e
Improve integration tests (#4019)
Improve integration tests
2022-09-19 14:47:13 +04:00
Pavel Busko
14ce92b4fb
cnbBuild: create CycloneDX SBOM file (#3959)
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
2022-08-18 10:03:24 +02:00
Ralf Pannemans
2f1f4b18ac
fix(cnbBuild): Create separate temp folder for each creator call (#3910)
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
2022-08-01 17:02:52 +02:00
R. Kloe
3cad6ac2cd
feat: allow uploading multiple boms (#3900)
* WIP: Adapt bom names

* + WIP: Adapt bom filenames

* Upgrade cyclonedx gradle plugin and use cyclonedxBom config parameters

* Fix unit tests - use correct name in bom creation

* Fix pythonBuild bom name

* introduce and use npmBomFilename const

* Introduce and use mvnBomFilename const

* Introduce and use gradleBomFilename const

* Use build-tool names for bom suffix

* + Adapt tests (build tool suffix)

* Use BOM schema version 1.2 in gradleExecuteBuild

* Pin version of cyclonedx-maven-plugin to 2.7.1

* Adapt generated files

* Fix integration tests

* Fix integration tests

* Fix gradle build integration tests

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2022-08-01 13:38:49 +02:00
Pavel Busko
5fb43a9ead
cnbBuild: update buildpack versions for integration tests (#3907)
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
2022-07-21 15:41:37 +02:00
Pavel Busko
feb5cd0f9d
fix(cnbBuild): use a single test case to lookup buildpacks by ID (#3906)
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
2022-07-21 13:16:47 +02:00
Eng Zer Jun
0f4e30e9db
test: use T.TempDir to create temporary test directory (#3721)
This commit replaces `ioutil.TempDir` with `t.TempDir` in tests. The
directory created by `t.TempDir` is automatically removed when the test
and all its subtests complete.

Prior to this commit, temporary directory created using `ioutil.TempDir`
needs to be removed manually by calling `os.RemoveAll`, which is omitted
in some tests. The error handling boilerplate e.g.
	defer func() {
		if err := os.RemoveAll(dir); err != nil {
			t.Fatal(err)
		}
	}
is also tedious, but `t.TempDir` handles this for us nicely.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2022-07-12 15:19:12 +02:00
Siarhei Pazdniakou
92837fde18
feat(gradleExecuteBuild, fortifyExecuteScan): gradle improvements (#3807)
* Improvements were made

* fixed tests

* fixed issues

* fix versioning

* fix Inclusive Language warnings

* gradle support to fortifyExecuteScan. Classpath resolving

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2022-06-07 10:24:10 +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
4b6c6e423c added integration tests
Co-authored-by: Gareth Evans <g.evans@sap.com>
2022-04-26 09:38:49 +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
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
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
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
Anil Keshav
9ab7894c1a
adding parallel execution for integration test of golang gradle and maven (#3677)
Co-authored-by: anilkeshav27 <you@example.com>
2022-03-29 07:38:11 +02:00
Johannes Dillmann
08f26e9605
chore(cnbBuild) unify integration test args (#3666)
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
2022-03-25 08:01:32 +01:00
Siarhei Pazdniakou
db5360fb89
feat(gradleExecuteBuild): BOM creation. Integration tests (#3603)
* Implemented bom creation

* Made small fixes. Added integration tests

* go generate

* minor fixes

* fix tests

* Added unit tests

* minor fixes

* use fileutils

* integration tests optimization

* change integraton tests timeout to 25m

* Fix Inclusive Language warnings

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2022-03-21 10:17:03 +01:00
Siarhei Pazdniakou
a1e2d8e8f3
Increased timeout for integration tests (#3648) 2022-03-18 16:30:41 +01:00
Pavel Busko
c086f84668
fix(cnbBuild): filter overall buildpacks key in the telemetry data (#3619)
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
2022-03-09 11:48:47 +01:00
Oliver Nocon
0998a80f07
chore: update to go 1.17 (#3557)
* chore: update to go 1.17

Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>

* update workflows

Co-authored-by: Pavel Busko <pavel.busko@sap.com>

* fixed multipart upload tests

Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>

* go fmt

Co-authored-by: Pavel Busko <pavel.busko@sap.com>

* Update to go 1.17

Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>

* Update vault to v1.9.3

Co-authored-by: Pavel Busko <pavel.busko@sap.com>

Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
Co-authored-by: ffeldmann <f.feldmann@sap.com>
2022-03-07 17:15:36 +01:00
Johannes Dillmann
0cef702d9d
bug(cnbBuild) Skip restoring image content (#3612)
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
2022-03-07 14:16:22 +01:00
Pavel Busko
0de06c6207
feat(cnbBuild): write image digests to the CPE (#3602)
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
2022-03-02 16:26:45 +01:00
Michael
2c04f0acad
(fix) gitopsUpdateDeployment - integration test for kustomize (#3572)
* (fix) gitopsUpdateDeployment - integration test for kustomize

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

* (fix) test: dash login shell is "-l"

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

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2022-02-25 16:38:02 +01:00
Siarhei Pazdniakou
d6916e8953
feat(golangBuild): Integration tests (#3575)
* Add entryPointPath option

* Integration tests for golangBuild

* Revert "Add entryPointPath option"

This reverts commit b541e64a4f.

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2022-02-24 16:57:56 +01:00