Code Monkey home page Code Monkey logo

database-plugin's People

Contributors

basil avatar davidvanlaatum avatar dependabot[bot] avatar jamesnswithers avatar jetersen avatar jglick avatar jonesbusy avatar kohsuke avatar renovate[bot] avatar timja avatar vtitov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

database-plugin's Issues

Please improve the documentation how to use a non global database

Describe your use-case which is not covered by existing documentation.

This plugin is also very helpful for end users if they want to execute SQL command in a pipeline

As example I created this pipeline script (could perhaps be added as example to the documentation):

node {
  stage('Verify') {
    getDatabaseConnection(type: "GLOBAL") {
      def resultCount = sql(sql: "SELECT count(*) FROM identifier i1, identifier i2 WHERE i1.value = i2.value AND i1.product_id < i2.product_id");
      def duplicates = resultCount.get(0).get('count');
      if (duplicates > 0) {
          if (duplicates < 201) {
            echo "Found ${duplicates} duplicates:";
            def duplicateIds = sql(sql: "SELECT i1.product_id id FROM identifier i1, identifier i2 WHERE i1.value = i2.value AND i1.product_id < i2.product_id");
            for(duplicateId in duplicateIds) {
                def id = duplicateId.get('id');
                echo "${id}";
            }
          }
          error "Found ${duplicates} duplicates ...";
      }
    }
  }
}

But this only works if I configure a database in Jenkins / Configure system

I was not able to find an example how to configure the database in the pipeline or in a stage of the script.

EDIT: Yes, I have seen the "This plugin is not meant to be used by end users by itself" but why not make a plugin helpful for many users?

how to import and use package org.jenkinsci.plugins.database in pipeline

Describe your use-case which is not covered by existing documentation.

I created a shared library

#!/usr/bin/env groovy
import org.jenkinsci.plugins.database.GlobalDatabaseConfiguration

def call(data_objs) {
    def database = GlobalDatabaseConfiguration().getDatabase()
    println(database)
    println(database.getClass())
    def sql = groovy.sql.Sql.newInstance(database)
    sql.withBatch(3, """INSERT INTO tmp (name) VALUES (?)""") { ps ->
        data_objs.each { data_obj ->
            ps.addBatch([data_obj])
        }
        ps.executeBatch()
    }
    echo "Hello, ${data_objs}."
}

and get the following error:

Also:   org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 1f1055a1-a93a-4b9f-a02d-6952bc6b298a
java.lang.NoSuchMethodError: No such DSL method 'GlobalDatabaseConfiguration' found among steps [ansiColor, archive, bat, build, catchError, checkout, compareVersions, currentUserGlobalRoles, currentUserItemRoles, deleteDir, dir, echo, emailext, emailextrecipients, envVarsForTool, error, fileExists, findBuildScans, findFiles, getContext, getDatabaseConnection, git, httpRequest, input, isUnix, junit, library, libraryResource, load, mail, milestone, node, nodesByLabel, parallel, powershell, prependToFile, properties, publishChecks, publishHTML, pwd, pwsh, readCSV, readFile, readJSON, readManifest, readMavenPom, readProperties, readTrusted, readYaml, resolveScm, retry, script, sh, sha1, sha256, sleep, sql, stage, stash, step, tar, tee, timeout, timestamps, tm, tool, touch, unarchive, unstable, unstash, untar, unzip, validateDeclarativePipeline, verifySha1, verifySha256, waitForBuild, waitUntil, warnError, withChecks, withContext, withCredentials, withEnv, withGradle, wrap, writeCSV, writeFile, writeJSON, writeMavenPom, writeYaml, ws, zip] or symbols [GitUsernamePassword, agent, all, allBranchesSame, allOf, always, ant, antFromApache, antOutcome, antTarget, any, anyOf, apiToken, apiTokenProperty, architecture, archiveArtifacts, artifactManager, assembla, authorInChangelog, authorizationMatrix, batchFile, bitbucket, bitbucketBranchDiscovery, bitbucketBuildStatusNotifications, bitbucketForkDiscovery, bitbucketPublicRepoPullRequestFilter, bitbucketPullRequestDiscovery, bitbucketServer, bitbucketSshCheckout, bitbucketTagDiscovery, bitbucketTrustEveryone, bitbucketTrustNobody, bitbucketTrustProject, bitbucketTrustTeam, bitbucketWebhookConfiguration, bitbucketWebhookRegistration, booleanParam, branch, brokenBuildSuspects, brokenTestsSuspects, browser, buildButton, buildDiscarder, buildDiscarders, buildRetention, buildSingleRevisionOnly, buildUser, buildingTag, builtInNode, caseInsensitive, caseSensitive, certificate, cgit, changeRequest, changelog, changelogBase, changelogToBranch, changeset, checkoutOption, checkoutToSubdirectory, choice, choiceParam, cleanAfterCheckout, cleanBeforeCheckout, cleanWs, clock, cloneOption, command, contributor, credentials, cron, crumb, culprits, defaultFolderConfiguration, defaultView, demand, developers, disableConcurrentBuilds, disableRestartFromStage, disableResume, discoverOtherRefs, discoverOtherRefsTrait, downstream, dumb, durabilityHint, email-ext, envVars, envVarsFilter, environment, equals, experimentalFlags, expression, extendedEmailPublisher, file, fileParam, filePath, fingerprint, fingerprints, fisheye, frameOptions, freeStyle, freeStyleJob, fromScm, fromSource, git, gitBranchDiscovery, gitHooks, gitHubBranchDiscovery, gitHubBranchHeadAuthority, gitHubExcludeArchivedRepositories, gitHubExcludeForkedRepositories, gitHubExcludePrivateRepositories, gitHubExcludePublicRepositories, gitHubForkDiscovery, gitHubIgnoreDraftPullRequestFilter, gitHubPullRequestDiscovery, gitHubSshCheckout, gitHubTagDiscovery, gitHubTopicsFilter, gitHubTrustContributors, gitHubTrustEveryone, gitHubTrustNobody, gitHubTrustPermissions, gitLab, gitList, gitSCM, gitTagDiscovery, gitTool, gitUsernamePassword, gitWeb, gitblit, github, githubProjectProperty, githubPush, gitiles, gogs, gradle, headRegexFilter, headWildcardFilter, hyperlink, hyperlinkToModels, ignoreOnPush, inbound, inheriting, inheritingGlobal, installSource, isRestartedRun, jdk, jdkInstaller, jgit, jgitapache, jnlp, jobBuildDiscarder, jobName, junitTestResultStorage, kiln, label, lastDuration, lastFailure, lastGrantedAuthorities, lastStable, lastSuccess, legacy, legacySCM, lfs, list, local, localBranch, localBranchTrait, location, logRotator, loggedInUsersCanDoAnything, mailer, masterBuild, maven, maven3Mojos, mavenErrors, mavenGlobalConfig, mavenMojos, mavenWarnings, modernSCM, multiBranchProjectDisplayNaming, multibranch, myView, namedBranchesDifferent, node, nodeProperties, nonInheriting, none, nonresumable, not, organizationFolder, overrideIndexTriggers, paneStatus, parallelsAlwaysFailFast, parameters, password, pattern, perBuildTag, permanent, phabricator, pipeline, pipelineTriggers, plainText, plugin, pollSCM, preserveStashes, previous, projectNamingStrategy, proxy, pruneStaleBranch, pruneStaleTag, pruneTags, queueItemAuthenticator, quietPeriod, rateLimit, rateLimitBuilds, recipients, redmine, refSpecs, remoteName, requestor, resourceRoot, retainOnlyVariables, rhodeCode, run, runParam, sSHLauncher, schedule, scmGit, scmRetryCount, scriptApproval, scriptApprovalLink, search, security, shell, simpleBuildDiscarder, skipDefaultCheckout, skipStagesAfterUnstable, slave, sourceRegexFilter, sourceWildcardFilter, sparseCheckoutPaths, ssh, sshPublicKey, sshUserPrivateKey, standard, status, string, stringParam, submodule, submoduleOption, suppressAutomaticTriggering, suppressFolderAutomaticTriggering, swapSpace, tag, teamFoundation, teamSlugFilter, text, textParam, timestamper, timestamperConfig, timezone, tmpSpace, toolLocation, triggeredBy, unsecured, untrusted, upstream, upstreamDevelopers, userIdentity, userSeed, usernameColonPassword, usernamePassword, viewgit, viewsTabBar, weather, withAnt, zip] or globals [currentBuild, env, params, pipeline, sayHi, scm, syncData]

Im very confused about the doc

Reference any relevant documentation, other materials or issues/pull requests that can be used for inspiration.

No response

Are you interested in contributing to the documentation?

No response

I don't understand how to use the plugin

Describe your use-case which is not covered by existing documentation.

I went to Dashboard->Manage Jenkins->Configure System. Next, in the Global Database section, I entered the parameters for connecting to the Postgres database. I pressed Test Connection to make sure everything was in order. And what's next? How do I use this connection in my task? I voiced this problem earlier, but in a different repository.
image
image
image
image

Reference any relevant documentation, other materials or issues/pull requests that can be used for inspiration.

No response

Error and unable to save configuration changes for Global Database->MySQL

Jenkins and plugins versions report

Environment
Jenkins: 2.361.3.4
OS: Linux - 3.10.0-1160.76.1.el7.x86_64
Java: 11.0.17 - Oracle Corporation (Java HotSpot(TM) 64-Bit Server VM)
---
Conjur:0.5
Parameterized-Remote-Trigger:3.1.5.1
accelerated-build-now-plugin:1.0.1
ace-editor:1.1
active-directory:2.26
all-changes:1.5
analysis-core:1.96
android-emulator:3.1.3
android-lint:2.6
ant:481.v7b_09e538fcca
antisamy-markup-formatter:2.7
any-buildstep:0.1
apache-httpcomponents-client-4-api:4.5.13-138.v4e7d9a_7b_a_e61
artifactory:3.17.4
async-http-client:1.7.24.3
audit-trail:3.11
authentication-tokens:1.4
aws-credentials:191.vcb_f183ce58b_9
aws-device-farm:1.30
aws-java-sdk:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-cloudformation:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-codebuild:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-ec2:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-ecr:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-ecs:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-efs:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-elasticbeanstalk:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-iam:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-logs:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-minimal:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-sns:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-sqs:1.12.287-357.vf82d85a_6eefd
aws-java-sdk-ssm:1.12.287-357.vf82d85a_6eefd
blueocean:1.25.8
blueocean-autofavorite:1.2.5
blueocean-bitbucket-pipeline:1.25.8
blueocean-commons:1.25.8
blueocean-config:1.25.8
blueocean-core-js:1.25.8
blueocean-dashboard:1.25.8
blueocean-display-url:2.4.1
blueocean-events:1.25.8
blueocean-git-pipeline:1.25.8
blueocean-github-pipeline:1.25.8
blueocean-i18n:1.25.8
blueocean-jira:1.25.8
blueocean-jwt:1.25.8
blueocean-personalization:1.25.8
blueocean-pipeline-api-impl:1.25.8
blueocean-pipeline-editor:1.25.8
blueocean-pipeline-scm-api:1.25.8
blueocean-rest:1.25.8
blueocean-rest-impl:1.25.8
blueocean-web:1.25.8
bootstrap4-api:4.6.0-5
bootstrap5-api:5.2.1-3
bouncycastle-api:2.26
branch-api:2.1046.v0ca_37783ecc5
build-cause-run-condition:0.1
build-environment:1.7
build-monitor-plugin:1.13+build.202205140447
build-name-setter:2.2.0
build-node-column:0.1
build-pipeline-plugin:1.5.8
build-timeout:1.24
build-token-root:151.va_e52fe3215fc
build-view-column:0.3
build-with-parameters:76.v9382db_f78962
built-on-column:1.3
caffeine-api:2.9.3-65.v6a_47d0f4d1fe
checks-api:1.7.5
cloudbees-aborted-builds:1.19
cloudbees-administrative-monitors:1.0.6
cloudbees-analytics:1.43
cloudbees-assurance:2.276.0.23
cloudbees-aws-cli:1.5.20
cloudbees-aws-deployer:1.21
cloudbees-bitbucket-branch-source:791.vb_eea_a_476405b
cloudbees-blueocean-default-theme:0.8
cloudbees-consolidated-build-view:1.6.1
cloudbees-credentials:3.3
cloudbees-cyberark-credentials:1.0.17
cloudbees-even-scheduler:3.14
cloudbees-folder:6.758.vfd75d09eea_a_1
cloudbees-folders-plus:3.29
cloudbees-groovy-view:1.14
cloudbees-jsync-archiver:5.25
cloudbees-label-throttling-plugin:3.9
cloudbees-license:9.69
cloudbees-long-running-build:1.19
cloudbees-monitoring:2.16
cloudbees-nodes-plus:1.25
cloudbees-platform-common:1.19
cloudbees-platform-data:1.30
cloudbees-plugin-usage:2.17
cloudbees-quiet-start:1.8
cloudbees-request-filter:1.7
cloudbees-ssh-slaves:2.19
cloudbees-support:3.31
cloudbees-template:4.58
cloudbees-uc-data-api:4.50
cloudbees-unified-ui:1.23
cloudbees-view-creation-filter:1.9
cloudbees-wasted-minutes-tracker:3.8
cloudbees-workflow-template:3.19
cloudbees-workflow-ui:2.9
command-launcher:90.v669d7ccb_7c31
commons-lang3-api:3.12.0-36.vd97de6465d5b_
commons-text-api:1.10.0-27.vb_fa_3896786a_7
conditional-buildstep:1.4.2
config-file-provider:3.11.1
copy-data-to-workspace-plugin:1.0
copyartifact:1.47
credentials:1189.vf61b_a_5e2f62e
credentials-binding:523.vd859a_4b_122e6
cucumber-reports:5.7.4
custom-job-icon:0.2
cvs:2.19.1
dashboard-view:2.447.vda_124dd35f11
data-tables-api:1.12.1-4
database:148.v4a_ff2ca_608b_7
database-mysql:1.4
database-sqlserver:1.0
deployed-on-column:1.9
deployer-framework:88.ve78a_92f39e8e
description-column-plugin:1.3
disk-usage:0.28
display-url-api:2.3.6
docker-build-publish:1.4.0
docker-commons:1.21
docker-java-api:3.0.14
docker-traceability:1.2
docker-workflow:521.v1a_a_dd2073b_2e
dockerhub-notification:2.6.2.1
dtkit-api:3.0.2
durable-task:501.ve5d4fc08b0be
ec2-deployment-dashboard:1.0.10
echarts-api:5.4.0-1
email-ext:2.92
email-ext-recipients-column:27.vb_9404db_b_018d
emailext-template:1.5
envinject:2.881.v37c62073ff97
envinject-api:1.199.v3ce31253ed13
extended-choice-parameter:356.va_90a_94ca_62ec
extensible-choice-parameter:1.8.0
external-monitor-job:203.v683c09d993b_9
extra-columns:1.25
extreme-notification:1.6
ez-templates:1.3.5
favorite:2.4.1
flexible-publish:0.16.1
font-awesome-api:6.2.0-3
ghprb:1.42.2
git:4.12.1
git-client:3.12.1
git-server:99.va_0826a_b_cdfa_d
git-validated-merge:3.34
github:1.35.0
github-api:1.303-400.v35c2d8258028
github-branch-pr-change-filter:1.2.4
github-branch-source:1695.v88de84e9f6b_9
github-organization-folder:1.6
github-pull-request-build:1.15
github-pullrequest:0.4.0
gradle:1.40
groovy:453.vcdb_a_c5c99890
handlebars:3.0.8
handy-uri-templates-2-api:2.1.8-22.v77d5b_75e6953
hockeyapp:1.2.2
htmlpublisher:1.31
http-post:1.2
icon-shim:3.0.0
infradna-backup:3.38.56
instance-identity:116.vf8f487400980
instant-messaging:1.52
ionicons-api:28.va_f3a_84439e5f
ivy:2.4
jackson2-api:2.13.4.20221013-295.v8e29ea_354141
jacoco:3.3.2
jakarta-activation-api:2.0.1-2
jakarta-mail-api:2.0.1-2
javadoc:226.v71211feb_e7e9
javax-activation-api:1.2.0-5
javax-mail-api:1.6.2-7
jaxb:2.3.6-2
jdk-tool:55.v1b_32b_6ca_f9ca
jenkins-design-language:1.25.8
jenkins-multijob-plugin:623.v03401733c9a_9
jersey2-api:2.37-1
jira:3.8
jjwt-api:0.11.5-77.v646c772fddb_0
job-dsl:1.76
job-import-plugin:3.6
job-restrictions:0.8
jobConfigHistory:1176.v1b_4290db_41a_5
jobcopy-builder:1.4.2
jquery:1.12.4-1
jquery-detached:1.2.1
jquery3-api:3.6.1-2
jsch:0.1.55.61.va_e9ee26616e7
jsunit:1.6
junit:1143.1145.v81b_b_9579a_019
junit-sql-storage:104.vce793afab7b3
label-linked-jobs:6.0.1
ldap:2.12
lockable-resources:1069.v726298f53f8c
log-parser:2.3.0
mail-watcher-plugin:1.17
mailcommander:1.0.0
mailer:438.v02c7f0a_12fa_4
mapdb-api:1.0.9-28.vf251ce40855d
mask-passwords:3.3
matrix-auth:3.1.5
matrix-project:785.v06b_7f47b_c631
maven-plugin:3.19
mercurial:1260.vdfb_723cdcc81
metrics:4.2.10-389.v93143621b_050
mina-sshd-api-common:2.9.1-44.v476733c11f82
mina-sshd-api-core:2.9.1-44.v476733c11f82
mina-sshd-api-scp:2.9.1-44.v476733c11f82
mina-sshd-api-sftp:2.9.1-44.v476733c11f82
momentjs:1.1.1
monitoring:1.91.0
msbuild:1.30
multiple-scms:0.8
nectar-license:8.41
nectar-rbac:5.77
nectar-vmware:4.3.9
node-iterator-api:49.v58a_8b_35f8363
nodejs:1.5.1
nodelabelparameter:1.11.0
nowsecure-auto-security-test:1.25
okhttp-api:4.9.3-108.v0feda04578cf
openid:2.4
openid4java:0.9.8.0
operations-center-agent:2.361.0.1
operations-center-analytics-config:2.89.0.2
operations-center-analytics-reporter:2.89.0.2
operations-center-client:2.361.0.1
operations-center-cloud:2.361.0.2
operations-center-context:2.361.0.3
operations-center-openid-cse:1.8.110
ownership:0.13.0
pam-auth:1.10
parameterized-scheduler:1.1
parameterized-trigger:2.45
performance:3.20
perfpublisher:8.09
periodicbackup:1.9
pipeline-build-step:2.18
pipeline-dependency-walker:1.0.0
pipeline-github-lib:38.v445716ea_edda_
pipeline-githubnotify-step:49.vf37bf92d2bc8
pipeline-graph-analysis:195.v5812d95a_a_2f9
pipeline-groovy-lib:613.v9c41a_160233f
pipeline-input-step:456.vd8a_957db_5b_e9
pipeline-milestone-step:101.vd572fef9d926
pipeline-model-api:2.2118.v31fd5b_9944b_5
pipeline-model-declarative-agent:1.1.1
pipeline-model-definition:2.2118.v31fd5b_9944b_5
pipeline-model-extensions:2.2118.v31fd5b_9944b_5
pipeline-rest-api:2.24.2
pipeline-stage-step:296.v5f6908f017a_5
pipeline-stage-tags-metadata:2.2118.v31fd5b_9944b_5
pipeline-stage-view:2.24.2
pipeline-utility-steps:2.14.0
plain-credentials:139.ved2b_9cf7587b
plugin-util-api:2.17.0
popper-api:1.16.1-3
popper2-api:2.11.6-2
port-allocator:1.8
postbuildscript:2.9.0
preSCMbuildstep:36.vca_61785795a_2
prereq-buildstep:1.1
promoted-builds:892.vd6219fc0a_efb
publish-over:0.22
publish-over-ftp:1.17
pubsub-light:1.17
rebuild:1.34
repository-connector:2.2.0
resource-disposer:0.20
role-strategy:569.v7476f8e4fe29
run-condition:1.5
saferestart:0.7
saml:4.372.v89f13e4c9e97
schedule-build:345.vc2d8f6ef9182
scm-api:621.vda_a_b_055e58f7
scm-filter-branch-pr:0.5.1
scoring-load-balancer:1.0.1
script-security:1190.v65867a_a_47126
scriptler:3.5
simple-parameterized-builds-report:1.5
skip-plugin:4.12
slack:631.v40deea_40323b
slave-setup:1.10
slave-status:1.6
snakeyaml-api:1.32-86.ve3f030a_75631
sse-gateway:1.26
ssh-agent:295.v9ca_a_1c7cc3a_a_
ssh-credentials:305.v8f4381501156
ssh-slaves:2.846.v1b_70190624f5
sshd:3.249.v2dc2ea_416e33
strict-crumb-issuer:2.1.0
structs:324.va_f5d6774f3a_d
subversion:2.16.0
support-core:1206.1208.v9b_7a_1d48db_0f
template-project:1.5.2
timestamper:1.20
tmpcleaner:1.3
token-macro:308.v4f2b_ed62b_b_16
translation:1.15
trilead-api:2.72.v2a_3236754f73
unique-id:2.2.1
uno-choice:2.6.4
user-activity-monitoring:1.9
variant:59.vf075fe829ccb
versioncolumn:87.v8fe7c090a_d3b
view-job-filters:2.3
wikitext:3.15
windows-slaves:1.8.1
workflow-aggregator:590.v6a_d052e5a_a_b_5
workflow-api:1198.v4596ea_5329b_6
workflow-basic-steps:994.vd57e3ca_46d24
workflow-cps:2803.v1a_f77ffcc773
workflow-cps-checkpoint:2.13
workflow-cps-global-lib:588.v576c103a_ff86
workflow-durable-task-step:1199.v02b_9244f8064
workflow-job:1239.v71b_b_a_124a_725
workflow-multibranch:716.vc692a_e52371b_
workflow-scm-step:400.v6b_89a_1317c9a_
workflow-step-api:639.v6eca_cd8c04a_a_
workflow-support:839.v35e2736cfd5c
ws-cleanup:0.43
xcode-plugin:2.0.17-565.v1c48051d46ef
xshell:122.v18d68d5fc26e
xunit:3.1.2
zephyr-for-jira-test-management:1.5

What Operating System are you using (both controller, and any agents involved in the problem)?

Jenkins controller:
Virtualization: vmware
Operating System: Red Hat Enterprise Linux Server 7.9 (Maipo)
CPE OS Name: cpe:/o:redhat:enterprise_linux:7.9:GA:server
Kernel: Linux 3.10.0-1160.76.1.el7.x86_64
Architecture: x86-64

MySQL server:
Virtualization: vmware
Operating System: Red Hat Enterprise Linux Server 7.9 (Maipo)
CPE OS Name: cpe:/o:redhat:enterprise_linux:7.9:GA:server
Kernel: Linux 3.10.0-1160.80.1.el7.x86_64
Architecture: x86-64

Reproduction steps

1.Screen Shot 2023-03-02 GlobalDatabase-MySQL-NotUseSSL-OK
2. Press Save, then we encounter Jenkins Error.

Expected Results

We expect to successfully save the configuration changes

Actual Results

But we encounter Jenkins error
Screen Shot 2023-03-02 Error-when-save-GlobalDatabase-MySQ-NotUseSSL-OK

Anything else?

We do the above Global database setting so we can use the MySQL database to store JUnit result there. We also did the setting for JUnit
Screen Shot 2023-03-03 JUnit-Test-Storage

We have contacted CloudBees to help us debugging this problem. But they said since both the "Database" plugin and the "MySQL database" driver plugin are 3rd party community plugins, they couldn't help further and suggest me to contact the maintainers.

Prepare database for core Guava upgrade

See JENKINS-65988. Jenkins core is using Guava 11.0.1, which was released on January 9, 2012. Jenkins core would like to upgrade to Guava 30.1.1, which was released on March 19, 2021. Plugins must be prepared to be compatible with both Guava 11.0.1 and Guava 30.1.1 in advance of this core transition.

In particular, this plugin has been identified as using the com.google.common.collect.MapMaker API, which has changed between Guava 11.0.1 and latest. In particular, the following methods have been removed:

  • MapMaker#expiration(long duration, TimeUnit unit)
  • MapMaker#makeComputingMap(Function<? super K,? extends V> computingFunction)
  • MapMaker#softKeys()
  • MapMaker#softValues()

To facilitate the Jenkins core transition, this plugin must be prepared and released such that it works with both Guava 11.0.1 and latest. Even if you aren't using one of these removed methods, consider migrating away from MapMaker anyway to simplify maintenance. Consider using Collections#synchronizedMap with WeakHashMap, or ClassValue. Our general recommendation for plugins with sophisticated caching needs is to adopt Caffeine via the Jenkins Caffeine API plugin.

does it support batch insert?

What feature do you want to see added?

insert multi rows in one time

Upstream changes

No response

Are you interested in contributing this feature?

No response

database plugin usage

Dependencies

Feature Request

HI, could you please upload a sample or example to use this plugin.
I am trying to connect a postgressql and execute a query from a freestyle jenkins jobs....thanks in advance

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • Update dependency io.jenkins.tools.bom:bom-2.426.x to v3105

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/cd.yaml
  • jenkins-infra/github-reusable-workflows v1
maven
.mvn/extensions.xml
  • io.jenkins.tools.incrementals:git-changelist-maven-extension 1.8
pom.xml
  • org.jenkins-ci.plugins:plugin 4.82
  • io.jenkins.tools.bom:bom-2.426.x 3080.vfa_b_e4a_a_39b_44
  • org.apache.commons:commons-dbcp2 2.11.0
  • org.hibernate:hibernate-entitymanager 5.6.15.Final
  • javax.validation:validation-api 2.0.1.Final
  • org.hibernate.validator:hibernate-validator 8.0.1.Final

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.