1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-02-21 19:48:53 +02:00

Change default ATC CheckVariant (#3384)

* change return after files are persisted & Change logging

* Change ATC CheckVariant Default

* change default checkvariant tests

* add docu hint
This commit is contained in:
Dominik Lendle 2021-12-22 12:34:42 +01:00 committed by GitHub
parent 1930e086cc
commit 5372074d7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View File

@ -150,7 +150,7 @@ func buildATCCheckBody(ATCConfig ATCconfig) (checkVariantString string, packageS
checkVariantString += ` configuration="` + ATCConfig.Configuration + `"`
}
} else {
const defaultCheckVariant = "SAP_CLOUD_PLATFORM_ATC_DEFAULT"
const defaultCheckVariant = "ABAP_CLOUD_DEVELOPMENT_DEFAULT"
checkVariantString += ` checkVariant="` + defaultCheckVariant + `"`
log.Entry().Infof("ATC Check Variant: %s", checkVariantString)
}

View File

@ -314,7 +314,7 @@ func TestBuildATCCheckBody(t *testing.T) {
assert.EqualError(t, err, "Error while parsing ATC run config. Please provide the packages and/or the software components to be checked! No Package or Software Component specified. Please provide either one or both of them")
})
t.Run("success case: Test build body with example yaml config", func(t *testing.T) {
expectedcheckvariantstring := " checkVariant=\"SAP_CLOUD_PLATFORM_ATC_DEFAULT\""
expectedcheckvariantstring := " checkVariant=\"ABAP_CLOUD_DEVELOPMENT_DEFAULT\""
expectedpackagestring := "<obj:packages><obj:package value=\"testPackage\" includeSubpackages=\"true\"/><obj:package value=\"testPackage2\" includeSubpackages=\"false\"/></obj:packages>"
expectedsoftwarecomponentstring := "<obj:softwarecomponents><obj:softwarecomponent value=\"testSoftwareComponent\"/><obj:softwarecomponent value=\"testSoftwareComponent2\"/></obj:softwarecomponents>"
@ -346,7 +346,7 @@ func TestBuildATCCheckBody(t *testing.T) {
assert.Equal(t, nil, err)
})
t.Run("failure case: Test build body with example yaml config with only packages and no software components", func(t *testing.T) {
expectedcheckvariantstring := " checkVariant=\"SAP_CLOUD_PLATFORM_ATC_DEFAULT\""
expectedcheckvariantstring := " checkVariant=\"ABAP_CLOUD_DEVELOPMENT_DEFAULT\""
expectedpackagestring := `<obj:packages><obj:package value="testPackage" includeSubpackages="true"/><obj:package value="testPackage2" includeSubpackages="false"/></obj:packages>`
expectedsoftwarecomponentstring := ""
@ -375,7 +375,7 @@ func TestBuildATCCheckBody(t *testing.T) {
})
t.Run("success case: Test build body with example yaml config with no packages and only software components", func(t *testing.T) {
expectedcheckvariantstring := " checkVariant=\"SAP_CLOUD_PLATFORM_ATC_DEFAULT\""
expectedcheckvariantstring := " checkVariant=\"ABAP_CLOUD_DEVELOPMENT_DEFAULT\""
expectedpackagestring := ""
expectedsoftwarecomponentstring := `<obj:softwarecomponents><obj:softwarecomponent value="testSoftwareComponent"/><obj:softwarecomponent value="testSoftwareComponent2"/></obj:softwarecomponents>`

View File

@ -89,6 +89,7 @@ You can specify a list of packages and/or software components to be checked. Thi
For each package that has to be checked you can configure if you want the subpackages to be included in checks or not.
Please note that if you chose to provide both packages and software components to be checked with the `atcconfig.yml` file, the set of packages and the set of software components will be combinend by the API using a logical AND operation.
Therefore, we advise to specify either the software components or packages.
Additionally, if you don't specify a dedicated ATC check variant to be used, the `ABAP_CLOUD_DEVELOPMENT_DEFAULT` variant will be used as default. For more information on how to configure a check variant for an ATC run please check the last example on this page.
See below example for an `atcconfig.yml` file with both packages and software components to be checked: