Skip to content

Plugins don't update #730

@ma3s7ro

Description

@ma3s7ro

Jenkins and plugins versions report

Environment Jenkins version: 2.462.2 ```text jenkins-plugin-manager-2.13.2.jar ```

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

Rocky Linux 9

Reproduction steps

java -jar jenkins-plugin-manager-*.jar --war /usr/share/java/jenkins.war --plugin-download-directory /var/lib/jenkins/plugins --plugin-file /var/lib/jenkins/update_plugins.txt --verbose

java -jar jenkins-plugin-manager-*.jar --war /usr/share/java/jenkins.war --plugin-download-directory /var/lib/jenkins/plugins --plugin-file /var/lib/jenkins/update_plugins.txt --latest false --verbose

Expected Results

Plugins update

Actual Results

java -jar jenkins-plugin-manager-*.jar --war /usr/share/java/jenkins.war --plugin-download-directory /var/lib/jenkins/plugins --plugin-file /var/lib/jenkins/update_plugins.txt --verbose

File containing list of plugins to be downloaded: /var/lib/jenkins/update_plugins.txt
Reading in plugins from /var/lib/jenkins/update_plugins.txt

Plugin download location: /var/lib/jenkins/plugins
No CLI option or environment variable set for update center, using default of https://updates.jenkins.io/update-center.json
No CLI option or environment variable set for experimental update center, using default of https://updates.jenkins.io/experimental/update-center.json
No CLI option or environment variable set for incrementals mirror, using default of https://repo.jenkins-ci.org/incrementals
No CLI option or environment variable set for plugin info, using default of https://updates.jenkins.io/plugin-versions.json
Will use war file: /usr/share/java/jenkins.war
Jenkins version: 2.462.2

Retrieving update center information
Update center URL: https://updates.jenkins.io/update-center.json?version=2.462.2
Returning cached value for: update-center-2.462.2
Returning cached value for: plugin-versions
Setting checksum for: JDK_Parameter_Plugin to HhmNVqBRKwqQ9or9rAaS8GHRXNsBX+QQVOQlF6VMPmY=
Setting checksum for: JDK_Parameter_Plugin to HhmNVqBRKwqQ9or9rAaS8GHRXNsBX+QQVOQlF6VMPmY=

JDK_Parameter_Plugin has no dependencies
Setting checksum for: JDK_Parameter_Plugin to HhmNVqBRKwqQ9or9rAaS8GHRXNsBX+QQVOQlF6VMPmY=
Setting checksum for: Parameterized-Remote-Trigger to m0sG4+MbJjhmE67TMQ9uuhxSOCGipbXU+Nel0gsvqj8=
Setting checksum for: Parameterized-Remote-Trigger to m0sG4+MbJjhmE67TMQ9uuhxSOCGipbXU+Nel0gsvqj8=

Parameterized-Remote-Trigger depends on:
opentelemetry 2.10.0
workflow-step-api 639.v6eca_cd8c04a_a_
credentials 1143.vb_e8b_b_ceee347
script-security 1218.v39ca_7f7ed0a_c
token-macro 321.vd7cc1f2a_52c8
Skipping dependency workflow-step-api:639.v6eca_cd8c04a_a_ and its sub-dependencies, because there is a higher version defined on the top level - workflow-step-api:678.v3ee58b_469476
Skipping dependency credentials:1143.vb_e8b_b_ceee347 and its sub-dependencies, because there is a higher version defined on the top level - credentials:1380.va_435002fa_924
Skipping dependency script-security:1218.v39ca_7f7ed0a_c and its sub-dependencies, because there is a higher version defined on the top level - script-security:1365.v4778ca_84b_de5
Skipping dependency token-macro:321.vd7cc1f2a_52c8 and its sub-dependencies, because there is a higher version defined on the top level - token-macro:400.v35420b_922dcb_
Setting checksum for: Parameterized-Remote-Trigger to m0sG4+MbJjhmE67TMQ9uuhxSOCGipbXU+Nel0gsvqj8=
Setting checksum for: Parameterized-Remote-Trigger to m0sG4+MbJjhmE67TMQ9uuhxSOCGipbXU+Nel0gsvqj8=
Setting checksum for: active-directory to zd4KTO8Pvwr9H7ZfGvEYcfLr+le2kJIEAgENQ63itzc=
Setting checksum for: active-directory to zd4KTO8Pvwr9H7ZfGvEYcfLr+le2kJIEAgENQ63itzc=

active-directory depends on:
caffeine-api 3.1.8-133.v17b_1ff2e0599
configuration-as-code 1836.vccda_4a_122a_a_e
mailer 470.vc91f60c5d8e2
Skipping dependency caffeine-api:3.1.8-133.v17b_1ff2e0599 and its sub-dependencies, because there is a higher version defined on the top level - caffeine-api:3.1.8-133.v17b_1ff2e0599
Skipping dependency mailer:470.vc91f60c5d8e2 and its sub-dependencies, because there is a higher version defined on the top level - mailer:488.v0c9639c1a_eb_3
Setting checksum for: active-directory to zd4KTO8Pvwr9H7ZfGvEYcfLr+le2kJIEAgENQ63itzc=
Setting checksum for: active-directory to zd4KTO8Pvwr9H7ZfGvEYcfLr+le2kJIEAgENQ63itzc=
Setting checksum for: android-emulator to MdGoXlMRCQsHXI0nfIdkvfxK279wqzwwTyIuSp0VIRo=
Setting checksum for: android-emulator to MdGoXlMRCQsHXI0nfIdkvfxK279wqzwwTyIuSp0VIRo=
Done

Anything else?

I writing bash script to updates Jenkins plugins.

# Get the list of installed plugins and save it to plugins.txt
java -jar jenkins-plugin-manager-*.jar --war /usr/share/java/jenkins.war --plugin-download-directory /var/lib/jenkins/plugins --list \
| tail -n +2 | grep -E '^[a-zA-Z0-9._-]+ [0-9a-zA-Z.-]+|^[a-zA-Z0-9._-]+-[0-9a-zA-Z.-]+$'| awk '{print $1 ":" $2}' > "$PLUGIN_FILE"

# Get available updates and save them to available_updates.txt
java -jar jenkins-plugin-manager-*.jar --war /usr/share/java/jenkins.war --plugin-download-directory /var/lib/jenkins/plugins --plugin-file /var/lib/jenkins/plugins.txt --available-updates --output txt > "$UPDATE_FILE"

# Update plugins
echo "Updating Jenkins plugins..."
java -jar jenkins-plugin-manager-*.jar  --war /usr/share/java/jenkins.war --plugin-download-directory /var/lib/jenkins/plugins --plugin-file /var/lib/jenkins/update_plugins.txt --verbose

I put plugins list with new version in file

update_plugins.txt

JDK_Parameter_Plugin:1.2
Parameterized-Remote-Trigger:3.2.0
active-directory:2.37
android-emulator:592.vb_b_6d427f1923
ansicolor:1.0.5
ant:511.v0a_a_1a_334f41b_

Example installed active-directory:2.36 available new active-directory:2.37

Could you assist, what do I wrong?

Are you interested in contributing a fix?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions