├── .mvn
├── maven.config
└── extensions.xml
├── Jenkinsfile
├── README.md
├── .github
└── workflows
│ └── cd.yaml
├── .gitignore
├── src
└── main
│ ├── resources
│ ├── org
│ │ └── jenkins_ci
│ │ │ └── plugins
│ │ │ └── any_buildstep
│ │ │ ├── Messages.properties
│ │ │ ├── builder
│ │ │ └── BuilderLister
│ │ │ │ └── config.jelly
│ │ │ └── publisher
│ │ │ └── PublisherLister
│ │ │ └── config.jelly
│ └── index.jelly
│ ├── java
│ └── org
│ │ └── jenkins_ci
│ │ └── plugins
│ │ └── any_buildstep
│ │ ├── AnyBuildStepDescriptorLister.java
│ │ ├── builder
│ │ └── BuilderLister.java
│ │ └── publisher
│ │ └── PublisherLister.java
│ └── webapp
│ └── LICENCE.html
└── pom.xml
/.mvn/maven.config:
--------------------------------------------------------------------------------
1 | -Pconsume-incrementals
2 | -Pmight-produce-incrementals
3 | -Dchangelist.format=%d.v%s
4 |
--------------------------------------------------------------------------------
/Jenkinsfile:
--------------------------------------------------------------------------------
1 | buildPlugin(useContainerAgent: true, configurations: [
2 | [platform: 'linux', jdk: '11'],
3 | [platform: 'linux', jdk: '17']
4 | ])
5 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Features
2 | - Use publishers as a Build Step (via the Conditional BuildStep Plugin)
3 | - Use builders during the Post-build Actions (via the Flexible Publish Plugin)
4 | - Adds a global configuration option for the Flexible Publish and Conditional BuildStep Plugins to enable all build steps to be made available to them.
--------------------------------------------------------------------------------
/.mvn/extensions.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | io.jenkins.tools.incrementals
4 | git-changelist-maven-extension
5 | 1.4
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.github/workflows/cd.yaml:
--------------------------------------------------------------------------------
1 | # Note: additional setup is required, see https://www.jenkins.io/redirect/continuous-delivery-of-plugins
2 |
3 | name: cd
4 | on:
5 | workflow_dispatch:
6 | check_run:
7 | types:
8 | - completed
9 |
10 | jobs:
11 | maven-cd:
12 | uses: jenkins-infra/github-reusable-workflows/.github/workflows/maven-cd.yml@v1
13 | secrets:
14 | MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
15 | MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
16 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #
2 | # The MIT License
3 | #
4 | # Copyright (C) 2010-2011 by Anthony Robinson
5 | #
6 | # Permission is hereby granted, free of charge, to any person obtaining a copy
7 | # of this software and associated documentation files (the "Software"), to deal
8 | # in the Software without restriction, including without limitation the rights
9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | # copies of the Software, and to permit persons to whom the Software is
11 | # furnished to do so, subject to the following conditions:
12 | #
13 | # The above copyright notice and this permission notice shall be included in
14 | # all copies or substantial portions of the Software.
15 | #
16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | # THE SOFTWARE.
23 | #
24 |
25 | .idea/
26 | target/
27 | *.iml
28 | out/
29 | *~
30 | work/
31 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins_ci/plugins/any_buildstep/Messages.properties:
--------------------------------------------------------------------------------
1 | #
2 | # The MIT License
3 | #
4 | # Copyright (C) 2011 by Anthony Robinson
5 | #
6 | # Permission is hereby granted, free of charge, to any person obtaining a copy
7 | # of this software and associated documentation files (the "Software"), to deal
8 | # in the Software without restriction, including without limitation the rights
9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | # copies of the Software, and to permit persons to whom the Software is
11 | # furnished to do so, subject to the following conditions:
12 | #
13 | # The above copyright notice and this permission notice shall be included in
14 | # all copies or substantial portions of the Software.
15 | #
16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | # THE SOFTWARE.
23 | #
24 |
25 | displayName=Any build step
26 |
--------------------------------------------------------------------------------
/src/main/resources/index.jelly:
--------------------------------------------------------------------------------
1 |
2 |
3 |
26 |
27 |
Use publishers as builders and builders as publishers
28 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins_ci/plugins/any_buildstep/builder/BuilderLister/config.jelly:
--------------------------------------------------------------------------------
1 |
2 |
3 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkins_ci/plugins/any_buildstep/publisher/PublisherLister/config.jelly:
--------------------------------------------------------------------------------
1 |
2 |
3 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/src/main/java/org/jenkins_ci/plugins/any_buildstep/AnyBuildStepDescriptorLister.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License
3 | *
4 | * Copyright (C) 2011 by Anthony Robinson
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in
14 | * all copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | * THE SOFTWARE.
23 | */
24 |
25 | package org.jenkins_ci.plugins.any_buildstep;
26 |
27 | import hudson.model.AbstractProject;
28 | import hudson.model.Descriptor;
29 | import hudson.tasks.BuildStep;
30 | import org.jenkins_ci.plugins.flexible_publish.DefaultPublisherDescriptorLister;
31 | import org.jenkinsci.plugins.conditionalbuildstep.lister.DefaultBuilderDescriptorLister;
32 |
33 | import java.util.List;
34 |
35 | public class AnyBuildStepDescriptorLister {
36 |
37 | public static List extends Descriptor extends BuildStep>> getBuildSteps(final AbstractProject, ?> project) {
38 | final DefaultBuilderDescriptorLister builderLister = new DefaultBuilderDescriptorLister();
39 | final DefaultPublisherDescriptorLister publisherLister = new DefaultPublisherDescriptorLister();
40 | final List steps = builderLister.getAllowedBuilders(project);
41 | steps.addAll(publisherLister.getAllowedPublishers(project));
42 | return steps;
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/src/main/java/org/jenkins_ci/plugins/any_buildstep/builder/BuilderLister.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License
3 | *
4 | * Copyright (C) 2011 by Anthony Robinson
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in
14 | * all copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | * THE SOFTWARE.
23 | */
24 |
25 | package org.jenkins_ci.plugins.any_buildstep.builder;
26 |
27 | import hudson.Extension;
28 | import hudson.model.AbstractProject;
29 | import hudson.model.Descriptor;
30 | import hudson.model.Hudson;
31 | import hudson.tasks.BuildStep;
32 | import jenkins.model.Jenkins;
33 | import org.jenkins_ci.plugins.any_buildstep.AnyBuildStepDescriptorLister;
34 | import org.jenkins_ci.plugins.any_buildstep.Messages;
35 | import org.jenkinsci.plugins.conditionalbuildstep.lister.BuilderDescriptorLister;
36 | import org.kohsuke.stapler.DataBoundConstructor;
37 |
38 | import java.util.List;
39 |
40 | public class BuilderLister implements BuilderDescriptorLister {
41 |
42 | @DataBoundConstructor
43 | public BuilderLister() {
44 | }
45 |
46 | public List extends Descriptor extends BuildStep>> getAllowedBuilders(final AbstractProject, ?> project) {
47 | return AnyBuildStepDescriptorLister.getBuildSteps(project);
48 | }
49 |
50 | public BuilderDescriptor getDescriptor() {
51 | return Jenkins.get().getDescriptorByType(BuilderDescriptor.class);
52 | }
53 |
54 | @Extension
55 | public static class BuilderDescriptor extends Descriptor {
56 | @Override
57 | public String getDisplayName() {
58 | return Messages.displayName();
59 | }
60 | }
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/src/main/java/org/jenkins_ci/plugins/any_buildstep/publisher/PublisherLister.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License
3 | *
4 | * Copyright (C) 2011 by Anthony Robinson
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in
14 | * all copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | * THE SOFTWARE.
23 | */
24 |
25 | package org.jenkins_ci.plugins.any_buildstep.publisher;
26 |
27 | import hudson.Extension;
28 | import hudson.model.AbstractProject;
29 | import hudson.model.Descriptor;
30 | import hudson.model.Hudson;
31 | import hudson.tasks.BuildStep;
32 | import jenkins.model.Jenkins;
33 | import org.jenkins_ci.plugins.any_buildstep.AnyBuildStepDescriptorLister;
34 | import org.jenkins_ci.plugins.any_buildstep.Messages;
35 | import org.jenkins_ci.plugins.flexible_publish.PublisherDescriptorLister;
36 | import org.kohsuke.stapler.DataBoundConstructor;
37 |
38 | import java.util.List;
39 |
40 | public class PublisherLister implements PublisherDescriptorLister {
41 |
42 | @DataBoundConstructor
43 | public PublisherLister() {
44 | }
45 |
46 | public List extends Descriptor extends BuildStep>> getAllowedPublishers(final AbstractProject, ?> project) {
47 | return AnyBuildStepDescriptorLister.getBuildSteps(project);
48 | }
49 |
50 | public PublisherDescriptor getDescriptor() {
51 | return Jenkins.get().getDescriptorByType(PublisherDescriptor.class);
52 | }
53 |
54 | @Extension
55 | public static class PublisherDescriptor extends Descriptor {
56 | @Override
57 | public String getDisplayName() {
58 | return Messages.displayName();
59 | }
60 | }
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/src/main/webapp/LICENCE.html:
--------------------------------------------------------------------------------
1 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | Any Build Step Plugin - Licence Information
31 |
32 |
33 | Any Build Step Plugin - Licence Information
34 | This plugin is released under the MIT License
35 | Any Build Step Plugin - MIT License
36 |
37 | The MIT License
38 |
39 | Copyright (C) 2011 by Anthony Robinson
40 |
41 | Permission is hereby granted, free of charge, to any person obtaining a copy
42 | of this software and associated documentation files (the "Software"), to deal
43 | in the Software without restriction, including without limitation the rights
44 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
45 | copies of the Software, and to permit persons to whom the Software is
46 | furnished to do so, subject to the following conditions:
47 |
48 | The above copyright notice and this permission notice shall be included in
49 | all copies or substantial portions of the Software.
50 |
51 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
52 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
53 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
54 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
55 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
56 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
57 | THE SOFTWARE.
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
25 |
26 |
27 | 4.0.0
28 |
29 |
30 | org.jenkins-ci.plugins
31 | plugin
32 | 4.53
33 |
34 |
35 |
36 | any-buildstep
37 | hpi
38 | Any Build Step Plugin
39 | ${changelist}
40 | Use publishers as builders and builders as publishers
41 | https://github.com/jenkinsci/any-buildstep-plugin
42 |
43 |
44 | 999999-SNAPSHOT
45 | 2.361.4
46 | jenkinsci/any-buildstep-plugin
47 |
48 |
49 |
50 |
51 | The MIT license
52 | All source code is under the MIT license.
53 |
54 |
55 |
56 |
57 |
58 | bap
59 | Bap
60 | bap-jenkins@BapIT.co.uk
61 |
62 |
63 |
64 |
65 |
66 |
67 | io.jenkins.tools.bom
68 | bom-2.361.x
69 | 1757.vf3c66da_b_7492
70 | pom
71 | import
72 |
73 |
74 |
75 |
76 |
77 |
78 | org.jenkins-ci.plugins
79 | flexible-publish
80 | 0.16.1
81 |
82 |
83 | org.jenkins-ci.plugins
84 | conditional-buildstep
85 | 1.4.2
86 |
87 |
88 | org.jenkins-ci.plugins
89 | run-condition
90 | 1.5
91 |
92 |
93 |
94 |
95 | scm:git:https://github.com/${gitHubRepo}.git
96 | scm:git:git@github.com:${gitHubRepo}.git
97 | https://github.com/${gitHubRepo}
98 | ${scmTag}
99 |
100 |
101 |
102 |
103 | repo.jenkins-ci.org
104 | https://repo.jenkins-ci.org/public/
105 |
106 |
107 |
108 |
109 |
110 | repo.jenkins-ci.org
111 | https://repo.jenkins-ci.org/public/
112 |
113 |
114 |
115 |
116 |
117 |
118 |
--------------------------------------------------------------------------------