1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-03-05 15:15:44 +02:00

rename debug to verbose et al.

This commit is contained in:
Marcus Holl 2019-07-16 16:01:43 +02:00
parent 2f7fa6e4a4
commit 30c632f29a
3 changed files with 17 additions and 17 deletions

View File

@ -57,7 +57,7 @@ steps:
tagPrefix: 'build_'
commitVersion: true
gitPushMode: 'SSH'
debug: false
verbose: false
gitHttpsCredentialsId: 'git'
gitDisableSslVerification: false
dub:

View File

@ -129,7 +129,7 @@ class ArtifactSetVersionTest extends BasePiperTest {
script: stepRule.step,
juStabGitUtils: gitUtils,
buildTool: 'maven',
gitCredentialsId: 'myGitRepoCredentials',
gitHttpsCredentialsId: 'myGitRepoCredentials',
gitHttpsUrl: 'https://example.org/myGitRepo',
gitPushMode: 'HTTPS')
@ -155,10 +155,10 @@ class ArtifactSetVersionTest extends BasePiperTest {
script: stepRule.step,
juStabGitUtils: gitUtils,
buildTool: 'maven',
gitCredentialsId: 'myGitRepoCredentials',
gitHttpsCredentialsId: 'myGitRepoCredentials',
gitHttpsUrl: 'https://example.org/myGitRepo',
gitPushMode: 'HTTPS',
gitDisableSSLVerification: true)
gitDisableSslVerification: true)
// closer version checks already performed in test 'testVersioningPushViaSSH', focusing on
// GIT related assertions here
@ -167,7 +167,7 @@ class ArtifactSetVersionTest extends BasePiperTest {
}
@Test
void testVersioningPushViaHTTPDebugMode() {
void testVersioningPushViaHTTPVerboseMode() {
jenkinsCredentialsRule.withCredentials('myGitRepoCredentials', 'me', 'topSecret')
@ -175,10 +175,10 @@ class ArtifactSetVersionTest extends BasePiperTest {
script: stepRule.step,
juStabGitUtils: gitUtils,
buildTool: 'maven',
gitCredentialsId: 'myGitRepoCredentials',
gitHttpsCredentialsId: 'myGitRepoCredentials',
gitHttpsUrl: 'https://example.org/myGitRepo',
gitPushMode: 'HTTPS',
debug: true)
verbose: true)
// closer version checks already performed in test 'testVersioningPushViaSSH', focusing on
// GIT related assertions here
@ -193,7 +193,7 @@ class ArtifactSetVersionTest extends BasePiperTest {
@Test
void testVersioningPushViaHTTPSInDebugModeEncodingDoesNotRevealSecrets() {
loggingRule.expect('Debug flag set, but encoded username/password differs from unencoded version. Cannot provide debug output in this case.')
loggingRule.expect('Verbose flag set, but encoded username/password differs from unencoded version. Cannot provide verbose output in this case.')
loggingRule.expect('Performing git push in quiet mode')
jenkinsCredentialsRule.withCredentials('myGitRepoCredentials', 'me', 'top@Secret')
@ -202,10 +202,10 @@ class ArtifactSetVersionTest extends BasePiperTest {
script: stepRule.step,
juStabGitUtils: gitUtils,
buildTool: 'maven',
gitCredentialsId: 'myGitRepoCredentials',
gitHttpsCredentialsId: 'myGitRepoCredentials',
gitHttpsUrl: 'https://example.org/myGitRepo',
gitPushMode: 'HTTPS',
debug: true)
verbose: true)
// closer version checks already performed in test 'testVersioningPushViaSSH', focusing on
// GIT related assertions here
@ -235,7 +235,7 @@ class ArtifactSetVersionTest extends BasePiperTest {
script: stepRule.step,
juStabGitUtils: gitUtils,
buildTool: 'maven',
gitCredentialsId: 'myGitRepoCredentials',
gitHttpsCredentialsId: 'myGitRepoCredentials',
gitHttpsUrl: 'https://example.org/myGitRepo',
gitPushMode: 'HTTPS')

View File

@ -38,7 +38,7 @@ enum GitPushMode {NONE, HTTPS, SSH}
* is not recommanded.
* @possibleValues `true`, `false`
*/
'debug',
'verbose',
,
/**
* Specifies the source to be used for the main version which is used for generating the automatic version.
@ -261,17 +261,17 @@ void call(Map parameters = [:], Closure body = null) {
}
if(encodedVersionsDiffers) {
if(config.debug) { // known issue: in case somebody provides the stringish 'false' we get the boolean value 'true' here.
echo 'Debug flag set, but encoded username/password differs from unencoded version. Cannot provide debug output in this case. ' +
'In order to enable debug output switch to a username/password which is not altered by url encoding.'
if(config.verbose) { // known issue: in case somebody provides the stringish 'false' we get the boolean value 'true' here.
echo 'Verbose flag set, but encoded username/password differs from unencoded version. Cannot provide verbose output in this case. ' +
'In order to enable verbose output switch to a username/password which is not altered by url encoding.'
}
hashbangFlags = '-e'
streamhandling ='&>/dev/null'
gitPushFlags.add('--quiet')
echo 'Performing git push in quiet mode.'
} else {
if(config.debug) { // known issue: in case somebody provides the stringish 'false' we get the boolean value 'true' here.
echo 'Debug mode enabled. This is not recommanded for productive usage. This might reveal security sensitive information.'
if(config.verbose) { // known issue: in case somebody provides the stringish 'false' we get the boolean value 'true' here.
echo 'Verbose mode enabled. This is not recommanded for productive usage. This might reveal security sensitive information.'
gitDebug ='git config --list; env |grep proxy; GIT_CURL_VERBOSE=1 GIT_TRACE=1 '
gitPushFlags.add('--verbose')
}