From 08cb22b5d636e0d1439db58ca3b32f2067706667 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Tue, 23 Apr 2024 13:27:28 +0200 Subject: [PATCH 1/5] fix gitlab-plugin CI missing dependencies --- spec/acceptance/xtypes/jenkins_credentials_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/acceptance/xtypes/jenkins_credentials_spec.rb b/spec/acceptance/xtypes/jenkins_credentials_spec.rb index 451f842e9..093de4874 100644 --- a/spec/acceptance/xtypes/jenkins_credentials_spec.rb +++ b/spec/acceptance/xtypes/jenkins_credentials_spec.rb @@ -235,6 +235,7 @@ include jenkins::cli::config package { 'git': } jenkins::plugin { [ + 'asm-api', 'apache-httpcomponents-client-4-api', 'bootstrap5-api', 'caffeine-api', @@ -248,14 +249,17 @@ 'git', 'git-client', 'gitlab-plugin', + 'gson-api', 'ionicons-api', 'jackson2-api', 'jakarta-activation-api', 'jakarta-mail-api', 'jaxb', 'jersey2-api', + 'joda-time-api', 'jquery3-api', 'jsch', + 'json-api', 'junit', 'mailer', 'matrix-project', @@ -270,6 +274,7 @@ 'ssh-credentials', 'sshd', 'trilead-api', + 'variant', 'workflow-api', 'workflow-job', 'workflow-scm-step', From cb0ade5ace4d0f0be0d17cb895c535ca3aa93722 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Tue, 23 Apr 2024 13:27:59 +0200 Subject: [PATCH 2/5] fix browserstack-integration CI missing dependencies --- spec/acceptance/xtypes/jenkins_credentials_spec.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spec/acceptance/xtypes/jenkins_credentials_spec.rb b/spec/acceptance/xtypes/jenkins_credentials_spec.rb index 093de4874..6f8199302 100644 --- a/spec/acceptance/xtypes/jenkins_credentials_spec.rb +++ b/spec/acceptance/xtypes/jenkins_credentials_spec.rb @@ -308,6 +308,7 @@ include jenkins::cli::config jenkins::plugin { [ 'ace-editor', + 'asm-api', 'apache-httpcomponents-client-4-api', 'bootstrap5-api', 'browserstack-integration', @@ -322,8 +323,12 @@ 'font-awesome-api', 'ionicons-api', 'jackson2-api', + 'jakarta-activation-api', + 'jakarta-mail-api', 'jaxb', + 'joda-time-api', 'jquery3-api', + 'json-api', 'junit', 'mailer', 'plain-credentials', @@ -334,6 +339,7 @@ 'snakeyaml-api', 'ssh-credentials', 'trilead-api', + 'variant', 'workflow-api', 'workflow-basic-steps', 'workflow-cps', From a82e268f9f6203e89513420bc34273e52f3c8d99 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Tue, 23 Apr 2024 15:13:57 +0200 Subject: [PATCH 3/5] also install optional dependencies while these are not required for tests to run, their absence still spams the logs with "Plugin is missing" errors, making it really hard to find actual issues --- spec/acceptance/xtypes/jenkins_credentials_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/acceptance/xtypes/jenkins_credentials_spec.rb b/spec/acceptance/xtypes/jenkins_credentials_spec.rb index 6f8199302..a193e83ed 100644 --- a/spec/acceptance/xtypes/jenkins_credentials_spec.rb +++ b/spec/acceptance/xtypes/jenkins_credentials_spec.rb @@ -40,11 +40,16 @@ include jenkins::cli::config jenkins::plugin { [ + 'apache-httpcomponents-client-4-api', + 'caffeine-api', 'command-launcher', + 'gson-api', 'jaxb', 'jdk-tool', + 'mina-sshd-api-common', 'mina-sshd-api-core', 'phabricator-plugin', + 'script-security', 'sshd', 'trilead-api', ]: } @@ -78,6 +83,7 @@ include jenkins::cli::config jenkins::plugin { [ + 'gson-api', 'ssh-credentials', 'variant', 'trilead-api', @@ -194,6 +200,7 @@ 'aws-java-sdk-ssm', 'caffeine-api', 'credentials-binding', + 'gson-api', 'jackson2-api', 'jaxb', 'joda-time-api', @@ -321,6 +328,7 @@ 'durable-task', 'echarts-api', 'font-awesome-api', + 'gson-api', 'ionicons-api', 'jackson2-api', 'jakarta-activation-api', From 0f96dc339a6a8bed0006a8f4842961db4b923d8b Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Tue, 23 Apr 2024 18:48:30 +0200 Subject: [PATCH 4/5] set purge_plugins => true when testing different credential plugins otherwise previous runs leave plugins installed which can influence test execution --- .../xtypes/jenkins_credentials_spec.rb | 40 ++++++++++++++----- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/spec/acceptance/xtypes/jenkins_credentials_spec.rb b/spec/acceptance/xtypes/jenkins_credentials_spec.rb index a193e83ed..72b7cd69c 100644 --- a/spec/acceptance/xtypes/jenkins_credentials_spec.rb +++ b/spec/acceptance/xtypes/jenkins_credentials_spec.rb @@ -8,7 +8,9 @@ context 'UsernamePasswordCredentialsImpl' do it 'works with no errors and idempotently' do pp = <<-EOS - include jenkins + class {'jenkins': + purge_plugins => true, + } include jenkins::cli::config jenkins_credentials { '9b07d668-a87e-4877-9407-ae05056e32ac': ensure => 'present', @@ -36,7 +38,9 @@ context 'ConduitCredentialsImpl' do it 'works with no errors and idempotently' do pp = <<-EOS - include jenkins + class {'jenkins': + purge_plugins => true, + } include jenkins::cli::config jenkins::plugin { [ @@ -79,7 +83,9 @@ context 'BasicSSHUserPrivateKey' do it 'works with no errors and idempotently' do pp = <<-EOS - include jenkins + class {'jenkins': + purge_plugins => true, + } include jenkins::cli::config jenkins::plugin { [ @@ -116,7 +122,9 @@ context 'StringCredentialsImpl' do it 'works with no errors and idempotently' do pp = <<-EOS - include jenkins + class {'jenkins': + purge_plugins => true, + } include jenkins::cli::config jenkins::plugin { 'plain-credentials': pin => true, @@ -147,7 +155,9 @@ context 'FileCredentialsImpl' do it 'works with no errors and idempotently' do pp = <<-EOS - include jenkins + class {'jenkins': + purge_plugins => true, + } include jenkins::cli::config jenkins::plugin { 'plain-credentials': pin => true, @@ -179,7 +189,9 @@ context 'AWSCredentialsImpl' do it 'works with no errors and idempotently' do pp = <<-EOS - include jenkins + class {'jenkins': + purge_plugins => true, + } include jenkins::cli::config jenkins::plugin { [ 'apache-httpcomponents-client-4-api', @@ -238,7 +250,9 @@ context 'GitLabApiTokenImpl' do it 'works with no errors and idempotently' do pp = <<-EOS - include jenkins + class {'jenkins': + purge_plugins => true, + } include jenkins::cli::config package { 'git': } jenkins::plugin { [ @@ -311,7 +325,9 @@ context 'BrowserStackCredentials' do pp = <<-EOS - include jenkins + class {'jenkins': + purge_plugins => true, + } include jenkins::cli::config jenkins::plugin { [ 'ace-editor', @@ -389,7 +405,9 @@ context 'StringCredentialsImpl' do it 'works with no errors and idempotently' do pp = <<-EOS - include jenkins + class {'jenkins': + purge_plugins => true, + } include jenkins::cli::config jenkins::plugin { 'plain-credentials': } @@ -418,7 +436,9 @@ context 'FileCredentialsImpl' do it 'works with no errors and idempotently' do pp = <<-EOS - include jenkins + class {'jenkins': + purge_plugins => true, + } include jenkins::cli::config jenkins::plugin { 'plain-credentials': pin => true, From 423d3d2215a5334dfba916ebbc8cafdbc5bed802 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Tue, 23 Apr 2024 19:15:26 +0200 Subject: [PATCH 5/5] don't pin plain-credentials plugin no idea why it was pinned in the past, but pinning seems to miss-behave when we use purge_plugins=>true in tests and breaks idempotency tests --- spec/acceptance/xtypes/jenkins_credentials_spec.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/spec/acceptance/xtypes/jenkins_credentials_spec.rb b/spec/acceptance/xtypes/jenkins_credentials_spec.rb index 72b7cd69c..a26861e44 100644 --- a/spec/acceptance/xtypes/jenkins_credentials_spec.rb +++ b/spec/acceptance/xtypes/jenkins_credentials_spec.rb @@ -127,7 +127,6 @@ class {'jenkins': } include jenkins::cli::config jenkins::plugin { 'plain-credentials': - pin => true, } jenkins_credentials { '150b2895-b0eb-4813-b8a5-3779690c063c': @@ -160,7 +159,6 @@ class {'jenkins': } include jenkins::cli::config jenkins::plugin { 'plain-credentials': - pin => true, } jenkins_credentials { '95bfe159-8bf0-4605-be20-47e201220e7c': @@ -441,7 +439,6 @@ class {'jenkins': } include jenkins::cli::config jenkins::plugin { 'plain-credentials': - pin => true, } jenkins_credentials { '95bfe159-8bf0-4605-be20-47e201220e7c':