From 30c632f29aeca75dbb635611d000f5260674b4eb Mon Sep 17 00:00:00 2001 From: Marcus Holl Date: Tue, 16 Jul 2019 16:01:43 +0200 Subject: [PATCH] rename debug to verbose et al. --- resources/default_pipeline_environment.yml | 2 +- test/groovy/ArtifactSetVersionTest.groovy | 20 ++++++++++---------- vars/artifactSetVersion.groovy | 12 ++++++------ 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/resources/default_pipeline_environment.yml b/resources/default_pipeline_environment.yml index ab01cf38c..0977cb3db 100644 --- a/resources/default_pipeline_environment.yml +++ b/resources/default_pipeline_environment.yml @@ -57,7 +57,7 @@ steps: tagPrefix: 'build_' commitVersion: true gitPushMode: 'SSH' - debug: false + verbose: false gitHttpsCredentialsId: 'git' gitDisableSslVerification: false dub: diff --git a/test/groovy/ArtifactSetVersionTest.groovy b/test/groovy/ArtifactSetVersionTest.groovy index fcb3c9b0d..8c7e6a372 100644 --- a/test/groovy/ArtifactSetVersionTest.groovy +++ b/test/groovy/ArtifactSetVersionTest.groovy @@ -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') diff --git a/vars/artifactSetVersion.groovy b/vars/artifactSetVersion.groovy index 902199ae8..c684fafdc 100644 --- a/vars/artifactSetVersion.groovy +++ b/vars/artifactSetVersion.groovy @@ -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') }