mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-14 11:03:09 +02:00
e60bdb94a6
* added uiVeri5ExecuteTests step files * added confPath an regenerated step * added test for uiVeri5ExecuteTests * config modified * added groovy wrapper * ambiguous method fixed * uiveri5 wrapper * removed install command * fixed defaults * added testOptions as confPath arg * test set env * test npm install local * changed env settings * tests regenerated * go generate * fix code climate * overwrite groovy step * remove groovy wrapper go * unstash piper bin * test older node version * test piperExecuteBin * wip * wip * wip * wip * wip * wip * wip * refactored params * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * set testServerUrl as os env for uiveri5 * Update config.yml * fix naming of testServerUrl param * wip * refactored setEnv and fixed tests * wip * step param for NPM_CONFIG_PREFIX * fix runCommand * refactored step param, regenerate, docu, fix tests * fix groovy wrapper test * cleanup * add to CommonStepsTest field whitelist * fixed default pipeline environment vars * fix []string default * fix metadata.go bug * added test for docu metadata gen * fix metadata_test.go in doc gen * Update metadata_generated.go * Update metadata_generated.go * remove npm config prefix param; doc fix * remove tab * changed npm config prefix * removed groovy wrapper test * removed groovy step defaults * modify path variable * modified npm config prefix * fix error wrapper and tests * doc update * add testRepository support * wip * fix testRepository param * wip * add utils * init stash content * wip * wip * wip * add comment for deprecated parameters * fixed commonStepTest * fixed commonStepTest * added error category for testOptions failure * Update vars/uiVeri5ExecuteTests.groovy Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com> * Update vars/uiVeri5ExecuteTests.groovy Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com> * fix condition Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
44 lines
1.7 KiB
Groovy
44 lines
1.7 KiB
Groovy
import com.sap.piper.ConfigurationHelper
|
|
import com.sap.piper.GitUtils
|
|
import com.sap.piper.Utils
|
|
import groovy.text.GStringTemplateEngine
|
|
import groovy.transform.Field
|
|
|
|
import static com.sap.piper.Prerequisites.checkScript
|
|
|
|
@Field String STEP_NAME = getClass().getName()
|
|
@Field String METADATA_FILE = 'metadata/uiVeri5ExecuteTests.yaml'
|
|
|
|
/*
|
|
* Parameters read from config for backwards compatibility of groovy wrapper step:
|
|
*
|
|
* testRepository, gitBranch, gitSshKeyCredentialsId used for test repository loading
|
|
*/
|
|
@Field Set CONFIG_KEYS = [
|
|
"gitBranch",
|
|
"gitSshKeyCredentialsId",
|
|
"testRepository",
|
|
]
|
|
|
|
void call(Map parameters = [:]) {
|
|
final script = checkScript(this, parameters) ?: this
|
|
String stageName = parameters.stageName ?: env.STAGE_NAME
|
|
def utils = parameters.juStabUtils ?: new Utils()
|
|
Map config = ConfigurationHelper.newInstance(this)
|
|
.loadStepDefaults([:], stageName)
|
|
.mixinGeneralConfig(script.commonPipelineEnvironment, CONFIG_KEYS)
|
|
.mixinStepConfig(script.commonPipelineEnvironment, CONFIG_KEYS)
|
|
.mixinStageConfig(script.commonPipelineEnvironment, stageName, CONFIG_KEYS)
|
|
.mixin(parameters, CONFIG_KEYS)
|
|
.use()
|
|
|
|
if (parameters.testRepository || config.testRepository ) {
|
|
parameters.stashContent = GitUtils.handleTestRepository(this, [gitBranch: config.gitBranch, gitSshKeyCredentialsId: config.gitSshKeyCredentialsId, testRepository: config.testRepository])
|
|
}
|
|
|
|
List credentials = [
|
|
[type: 'usernamePassword', id: 'seleniumHubCredentialsId', env: ['PIPER_SELENIUM_HUB_USER', 'PIPER_SELENIUM_HUB_PASSWORD']],
|
|
]
|
|
piperExecuteBin(parameters, STEP_NAME, METADATA_FILE, credentials)
|
|
}
|