Open v1v opened 3 years ago
I don't think that's a bug, optional dependencies still have version constraints as far as I know.
i.e. if you're going to install a plugin you have an optional extension for it needs to be at least the minimum version?
But I may be wrong @oleg-nenashev?
Sorry if I wasn't clear but:
cloudbees-disk-usage-simple
is 0.10
. https://github.com/jenkinsci/cloudbees-disk-usage-simple-plugin/releasescloudbees-disk-usage-simple
is an optional dependency for the opentelemetry
https://github.com/jenkinsci/opentelemetry-plugin/blob/e6a79762e95859c50ba45c5b17da03ed7df0c5da/pom.xml#L173-L178But there is an error with
Plugin opentelemetry:0.14 depends on cloudbees-disk-usage-simple:0.10;resolution, but there is an older version defined on the top level - cloudbees-disk-usage-simple:0.10
It seems to work fine when using --latest-specified
tee -a plugins.txt <<EOF
cloudbees-disk-usage-simple:0.10
google-compute-engine
opentelemetry::https://repo.jenkins-ci.org/incrementals/io/jenkins/plugins/opentelemetry/0.17-rc383.d28294a0c63f/opentelemetry-0.17-rc383.d28294a0c63f.hpi
EOF
tee -a Dockerfile <<EOF
FROM jenkins/jenkins:lts-jdk11
COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
RUN jenkins-plugin-cli --latest false -f /usr/share/jenkins/ref/plugins.txt
EOF
docker build .
output:
> [stage-3 3/3] RUN jenkins-plugin-cli --latest false -f /usr/share/jenkins/ref/plugins.txt:
#7 13.90 Multiple plugin prerequisites not met:
#7 13.90 Plugin opentelemetry:0.17-rc383.d28294a0c63f depends on cloudbees-disk-usage-simple:0.10;resolution, but there is an older version defined on the top level - cloudbees-disk-usage-simple:0.10,
#7 13.90 Plugin opentelemetry:0.17-rc383.d28294a0c63f depends on cloudbees-disk-usage-simple:0.10;resolution, but there is an older version defined on the top level - cloudbees-disk-usage-simple:0.10,
#7 13.90 Plugin opentelemetry:0.17-rc383.d28294a0c63f depends on cloudbees-disk-usage-simple:0.10;resolution, but there is an older version defined on the top level - cloudbees-disk-usage-simple:0.10,
#7 13.90 Plugin opentelemetry:0.17-rc383.d28294a0c63f depends on cloudbees-disk-usage-simple:0.10;resolution, but there is an older version defined on the top level - cloudbees-disk-usage-simple:0.10,
#7 13.90 Plugin opentelemetry:0.17-rc383.d28294a0c63f depends on google-compute-engine:4.3.8;resolution, but there is an older version defined on the top level - google-compute-engine:4.3.8
------
executor failed running [/bin/sh -c jenkins-plugin-cli --latest false -f /usr/share/jenkins/ref/plugins.txt]: exit code: 1
using the --latest-specified
flag
tee -a plugins.txt <<EOF
cloudbees-disk-usage-simple:0.10
google-compute-engine
opentelemetry::https://repo.jenkins-ci.org/incrementals/io/jenkins/plugins/opentelemetry/0.17-rc383.d28294a0c63f/opentelemetry-0.17-rc383.d28294a0c63f.hpi
EOF
tee -a Dockerfile <<EOF
FROM jenkins/jenkins:lts-jdk11
COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
RUN jenkins-plugin-cli --latest false --latest-specified -f /usr/share/jenkins/ref/plugins.txt
EOF
docker build .
with output:
RUN jenkins-plugin-cli --latest false --latest-specified -f /usr/share/jenkins/ref/plugins.txt
[+] Building 21.3s (8/8) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 892B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/jenkins/jenkins:lts-jdk11 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 1.09kB 0.0s
=> CACHED [stage-4 1/3] FROM docker.io/jenkins/jenkins:lts-jdk11 0.0s
=> [stage-4 2/3] COPY plugins.txt /usr/share/jenkins/ref/plugins.txt 0.0s
=> [stage-4 3/3] RUN jenkins-plugin-cli --latest false --latest-specified -f /usr/share/jenkins/ref/plugins.txt 20.9s
=> exporting to image 0.3s
=> => exporting layers 0.3s
=> => writing image sha256:99f3e9d74c51630615cc430577b3a7b09e02c8a6cae14a287342e860d44ee83a 0.0s
Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
Version report
Jenkins and plugins versions report: 2.289.1-lts-jdk11
Reproduction steps
Results
Expected result:
Can install the optional plugin
Actual result:
While If I don't add the explicit dependency for the optional plugin
cloudbees-disk-usage-simple
then it worksSomehow the
resolution
looks suspicious