-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add pipeline-model-definition plugin #179
Add pipeline-model-definition plugin #179
Conversation
bom-latest/pom.xml
Outdated
</dependency> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>docker-workflow</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to do JENKINS-58732 BTW.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jenkinsci/pipeline-model-definition-plugin#373 specifically
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's ok - and indeed would let us knock a few transitive dependencies off what is quite a big change here. We can revisit this when that PR is merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also the split would reduce the number of tests run in pipeline-model-definition
, which is currently gigantic, even slower than workflow-cps
, thus becoming the bottleneck for the bom
parallel run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that jenkinsci/pipeline-model-definition-plugin#373 was merged earlier today - let me know when the next version is released, and I'll re-work this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it is going to take longer than that, for purposes of this PR. See rollout plan in jenkinsci/docker-workflow-plugin#202. I do not think you need to block this PR on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was hoping to avoid wrangling the icon-shim-plugin's inconsistent tags, which I believe docker-workflow was pulling in, by waiting. Is that unblocked at this point, or is is it still present?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Afraid I know nothing about this icon-shim
issue.
sample-plugin/src/test/java/io/jenkins/tools/bom/sample/DeclarativePipelineTest.java
Outdated
Show resolved
Hide resolved
While we're at it, any idea why the PCT step fails to check out the icon-shim plugin from source? I looked in its Git repo and there certainly seems to be a version 1.0.3.
|
Not offhand. Something nonstandard with the metadata or Git layout perhaps. |
Looks like the icon-shim plugin is only being pulled in by docker-commons, so if you do the other PR first then this problem will also go away. (Well until we decide to put icon-shim in the POM for other reasons.)
|
But if we were interested in fixing it, the answer is as you said, non-standard Git layout. Most plugins either have a tag naming convention of
|
This is how we fixed in configuration-as-code parent pom: https://github.com/jenkinsci/configuration-as-code-plugin/blob/b68e82e7eb859519975f29bc5e3b5ca77a4ef2ce/pom.xml#L27 |
Supposed to have been taken care of by jenkinsci/plugin-compat-tester#181 without any tricks. |
After some more dependency twiddling it appears docker-commons imports some more troublesome dependencies - notably authentication-tokens which fails PCT on its InjectedTest:
That plugin hasn't been updated since last year and still uses parent 3.42 / Jenkins 2.60.3, so bringing it up to date may not be trivial. Is it worth it? Would it be easier to wait for the Docker dependencies to be removed from pipeline-model-definition. |
If there is an error in |
Or jenkinsci/pipeline-model-definition-plugin#383 might suffice. |
Have opened jenkinsci/authentication-tokens-plugin#7 for this |
It appears that even when the docker workflow dep is marked optional, it's still dragged in to the analysis with its own dependencies. I've filed jenkinsci/pipeline-model-definition-plugin#391 to do the honours |
jenkinsci/authentication-tokens-plugin#7 is released as 1.4. |
Currently has some conflicts |
also seems to have lost the CI trigger. I tried unmarking as draft to see if that would make a difference. |
it won't trigger CI with conflicts |
Looks like a lot more tests are able to pass now. The next blocker is |
Weird it seems to be included: Local IDE checkout doesn't really represent what's actually run, best to run the PCT locally with the local-test script or my grabbing the command out that's used in the Jenkins job. Basically PCT does some trickery... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting close!
" stages {", | ||
" stage('Example') {", | ||
" steps {", | ||
" echo 'Hello world'", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May as well
" echo 'Hello world'", | |
" example(x: 'some value')", |
and for that matter just move this to ExampleStepTest
.
More things working now. The |
FWIW the pipeline that the test constructs is unusual in that the stages don't wrap their contents, and the build steps (chiefly
I believe I saw a warning recently that this kind of |
#179 (comment) Unfortunately TEST_FAILURES only asserts that surefire:test did not succeed, but does not verify that it even ran to begin with: https://github.com/jenkinsci/plugin-compat-tester/blob/c502ba1cc6ebf39b9525e914fc537c38918ed535/plugins-compat-tester/src/main/java/org/jenkins/tools/test/PluginCompatTester.java#L322-L323
…odel-definition-plugin
I would again propose #179 (comment) |
I've incrementally removed dependencies as we've gone along, so we're looking at something near the minimal set already:
Plus three that the sample project requires to be present in order to build - if omitted we get the "Plugin dependency on [plugin] is not from dependencyManagement" error:
|
|
Time permitting, we should also be looking to add some other plugins mentioned in jenkinsci/workflow-aggregator-plugin#36. |
I am afraid there seem to be a number of plugins already in the BOM which did not pass PCT, something that needs to be fixed before adding new plugins. Will file a new PR to track this. |
jenkinsci#179 (comment) Unfortunately TEST_FAILURES only asserts that surefire:test did not succeed, but does not verify that it even ran to begin with: https://github.com/jenkinsci/plugin-compat-tester/blob/c502ba1cc6ebf39b9525e914fc537c38918ed535/plugins-compat-tester/src/main/java/org/jenkins/tools/test/PluginCompatTester.java#L322-L323 (cherry picked from commit b489a73)
…ill leave no test files behind; really better for PCT to set -Dmaven.test.failure.ignore (cherry picked from commit 7c271c3)
workflow-multibranch-plugin proposed in #280 |
pipeline-stage-step proposed in #281 |
jackson2-api proposed in #282 |
Are we ready to move forward with this one? |
gotta rebase and tidy up, but yep |
# Conflicts: # bom-latest/pom.xml
We are squash merging so no need for rebase 😁 |
Hmm, got the same failure on |
Ok definitely a couple of flaky tests in there, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me however the flaky tests are worrisome 😓
Both of those sound familiar from other PRs. Will have to dig into them at some point. Likely unrelated to this PR. |
Add pipeline-model-definition plugin to the BOM. Add a declarative pipeline test to sample-plugin.