mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
0fcf1654fe
Extend mta build step to install maven artefacts after build to allow re-using them in later stages (additional unit or integration tests which might not be running as part of the "build" life-cycle).
19 lines
451 B
Bash
Executable File
19 lines
451 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Run all test if no arguments are given, run a single test function if it is passed as $1
|
|
# For example: `./run-tests.sh TestRegistrySetInNpmrc`
|
|
|
|
TEST_NAME=$1
|
|
|
|
pushd ..
|
|
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags release -o piper
|
|
|
|
if [[ "$TEST_NAME" ]]
|
|
then
|
|
go test -tags=integration -timeout 20m -run "$TEST_NAME" ./integration/...
|
|
else
|
|
go test -tags=integration -timeout 20m ./integration/...
|
|
fi
|
|
|
|
popd || exit
|