Skip to content
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

Pull in changes from the past 3-4 years #4

Merged
merged 106 commits into from
Feb 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
c3ba170
Tidy up the Jenkinsfile for clean execution on ci.jenkins.io
Sep 17, 2016
17eff40
MAVEN DERP
Sep 17, 2016
c716999
Use our custom settings.xml for our Maven invocations
Sep 17, 2016
03a2429
Properly stash the hpi files
Sep 17, 2016
acddafc
Skip rnuning on multiple nodes to avoid the hit of stash/unstash
Sep 18, 2016
461fece
Use JDK8 to run our step generator
Sep 18, 2016
89c5cee
fixup! Use JDK8 to run our step generator
Sep 18, 2016
26f153b
Bind to agents labeled "puppet"
Sep 28, 2016
1c97140
Use HTTPs to reach repo.jenkins-ci.org
Sep 29, 2016
28afb2b
Nuke all that pesky trailing whitespace
Sep 29, 2016
113b984
Upgrade core to 2.23 to get the latest and greatest Jenkins
Sep 29, 2016
a33a6b4
Add some versions for our Maven plugins
Sep 29, 2016
d854604
Bump more dependency versions
Sep 29, 2016
1ce349a
Add the file leak detector to see how this goes
Sep 29, 2016
be71de8
Revert "Add the file leak detector to see how this goes"
Sep 29, 2016
f20730f
Revert "Upgrade core to 2.23 to get the latest and greatest Jenkins"
Sep 29, 2016
451dfde
Revert "Revert "Add the file leak detector to see how this goes""
Sep 29, 2016
7f93fa1
Add some timestamps statements to see where things are slowing down
Nov 14, 2016
e237c09
Merge pull request #1 from jenkins-infra/ci-jenkinsfile
Nov 15, 2016
be49a53
Process the missing List of Steps
kwhetstone Jan 9, 2017
1c6b809
Adding pom file
kwhetstone Jan 9, 2017
8cbe551
typo
kwhetstone Jan 9, 2017
7a3703e
Merge pull request #2 from jenkins-infra/add_step
Jan 10, 2017
0d65024
Build periodically
daniel-beck Feb 11, 2017
ba53ef9
Merge pull request #4 from daniel-beck/periodically
Feb 11, 2017
0be2ecd
[FIX WEBSITE-314] Formatting fixes
daniel-beck Feb 14, 2017
01b0beb
Attempt to fix PATH problem
daniel-beck Feb 14, 2017
f6e39ea
Merge pull request #5 from daniel-beck/formatting-fixes
daniel-beck Feb 14, 2017
8f999de
Quote doctitle attribute
daniel-beck Feb 14, 2017
494fb05
Remove doctitle
daniel-beck Feb 14, 2017
35efd36
Merge pull request #6 from daniel-beck/quoting-fix
Feb 14, 2017
6813979
Switch to 'pipelinesteps' layout
daniel-beck Feb 22, 2017
4bdc908
Merge pull request #7 from daniel-beck/pipelinesteps-layout
Feb 22, 2017
a78be56
Add link to plugin on plugins site
daniel-beck Feb 22, 2017
31cb08b
Use plugin macro
daniel-beck Feb 22, 2017
70cffeb
Merge pull request #8 from daniel-beck/link-to-plugin
Feb 22, 2017
a6da82c
Mock Jenkins.getPlugin(Class)
kwhetstone Jun 6, 2017
b952822
Merge pull request #9 from jenkins-infra/fix_infra_job
kwhetstone Jun 12, 2017
731d144
Switch the Pipeline over to an ephemeral 'linux' node
Aug 25, 2017
276ad0a
Merge pull request #10 from jenkins-infra/1307
Aug 25, 2017
277dea7
[INFRA-1053] Generate Declarative directive docs.
abayer Nov 16, 2017
5b4d1b0
No point in newer Declarative, skip empty lists
abayer Nov 16, 2017
ca3f078
Only include steps and symboled descriptors
abayer Nov 16, 2017
014a521
Some debug logging because I think step filtering isn't working.
abayer Nov 16, 2017
a978ed4
Better filtering yay.
abayer Nov 16, 2017
7b7f169
Merge pull request #12 from abayer/infra-1053
kwhetstone Jan 23, 2018
cb1793e
Suggested instructions for testing changes locally.
jglick Feb 5, 2018
4d70c6d
Print stack traces when we get exceptions, to make interactive develo…
jglick Feb 5, 2018
1c23614
Part of JENKINS-37215: show symbols rather than $class whenever possi…
jglick Feb 5, 2018
af4f2cd
Generate Step description in HTML
alecharp Feb 5, 2018
9862c98
[JENKINS-37215] Handle metasteps.
jglick Feb 5, 2018
0fa1b14
Wrapping help page in div
alecharp Feb 5, 2018
61e6e54
Merge branch 'master' of https://github.com/alecharp/pipeline-steps-d…
jglick Feb 5, 2018
0d99f32
Do not show junk for withContext step.
jglick Feb 5, 2018
5c617aa
Merge pull request #13 from jglick/instructions
kwhetstone Feb 5, 2018
e2d0319
Merge pull request #14 from jglick/symbols-JENKINS-37215
kwhetstone Feb 5, 2018
eeec9ce
Turn off compat mode
bitwiseman Jun 25, 2018
c810a08
Merge pull request #16 from bitwiseman/no-compat
bitwiseman Jul 5, 2018
be7902b
Convert Pipeline to Declarative and Azure Container Instances
rtyler Mar 10, 2019
db71246
I can _almost_ write an entire declarative Pipeline unassisted
rtyler Mar 10, 2019
59a929f
Show basic step description when detailed check fails
zbynek Oct 10, 2019
811233e
Use class findClass consistently to avoid fallback to "core"
zbynek Oct 11, 2019
0f67901
Add comments, simplify code
zbynek Oct 15, 2019
52a4754
Merge pull request #17 from zbynek/website-434
kwhetstone Oct 17, 2019
8c54d8f
Move delegate steps to plugin pages, remove broken link
zbynek Nov 19, 2019
0fe6d56
Consistent naming of "Plugin site"
zbynek Nov 26, 2019
262a146
Merge pull request #18 from zbynek/website-185
kwhetstone Feb 4, 2020
7535b70
Add logging
zbynek Feb 5, 2020
2316a81
Catch exception on attribute level
zbynek Feb 5, 2020
356fd3d
Clean up imports and generics
zbynek Feb 6, 2020
873a638
Merge pull request #19 from zbynek/website-185
kwhetstone Feb 8, 2020
f986728
Try-catch for computing display name and instantiating descriptors
zbynek Dec 26, 2020
ef0a197
Merge pull request #20 from zbynek/safe-displayname
timja Dec 26, 2020
09983bb
Update core to 2.249.3, args4j to 2.33
zbynek Jan 26, 2021
f131623
Fix warnings
zbynek Jan 26, 2021
e2f3055
Avoid mocking the home folder, update structs
zbynek Jan 27, 2021
fc3f008
Bump core to 2.263.3
zbynek Jan 29, 2021
3fb7be4
Merge pull request #21 from zbynek/core-2-249
MarkEWaite Jan 30, 2021
7de90e6
Set maven source encoding to UTF-8
MarkEWaite Jan 30, 2021
c2526ec
Use Apache commons-io 2.8.0 - latest release
MarkEWaite Jan 30, 2021
7d580fc
Use net.java.sezpoz 1.13 - latest release
MarkEWaite Jan 30, 2021
d871892
Use mockito-core 3.7.7 - latest release
MarkEWaite Jan 30, 2021
a9ce027
Use jsoup 1.13.1 - latest release
MarkEWaite Jan 30, 2021
085055a
Use workflow step api plugin 2.23 - latest release
MarkEWaite Jan 30, 2021
0a25482
Use Pipeline: Declarative Extension Points API plugin 1.7.2
MarkEWaite Jan 30, 2021
39382aa
Use Jenkins.get() as non-deprecated API
MarkEWaite Jan 30, 2021
e81063b
Use findbugs annotations instead of javax annotations
MarkEWaite Jan 30, 2021
fb060a0
Use maven jar plugin 3.2.0 - latest release
MarkEWaite Jan 30, 2021
f30ccb1
Use Spring security context instead of acegi
MarkEWaite Jan 30, 2021
a584611
Configure dependabot
MarkEWaite Jan 30, 2021
9d3e6ea
Use latest exec maven plugin release in README
MarkEWaite Jan 30, 2021
273e3d8
Ignore secrets directory from README instructions
MarkEWaite Jan 30, 2021
57a676c
Remove dir directive from assembly definition
MarkEWaite Jan 30, 2021
29a5897
Revert "Remove dir directive from assembly definition"
MarkEWaite Jan 30, 2021
c6ede9e
Merge pull request #22 from MarkEWaite/update-components
MarkEWaite Jan 30, 2021
1483365
Match javax.servlet-api version in Jenkins core/pom.xml
MarkEWaite Jan 30, 2021
096bf7f
Merge pull request #25 from MarkEWaite/update-servlet-api
MarkEWaite Jan 31, 2021
1794056
Ignore updates to servlet-api
MarkEWaite Jan 31, 2021
eae435a
Use plugin bom to manage plugin versions
MarkEWaite Jan 31, 2021
66db466
Merge pull request #26 from MarkEWaite/use-plugin-bom
MarkEWaite Jan 31, 2021
332cae2
Bump bom-2.263.x from 18 to 21
dependabot[bot] Jan 31, 2021
3b8bda3
Merge pull request #27 from jenkins-infra/dependabot/maven/master/io.…
MarkEWaite Jan 31, 2021
07322ee
Bump jenkins-core from 2.277 to 2.278
dependabot[bot] Feb 8, 2021
c5c825f
Bump bom-2.263.x from 21 to 23
dependabot[bot] Feb 8, 2021
9e39094
Merge pull request #29 from jenkins-infra/dependabot/maven/master/io.…
dependabot[bot] Feb 8, 2021
7d8d72c
Merge pull request #28 from jenkins-infra/dependabot/maven/master/org…
dependabot[bot] Feb 8, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: maven
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
target-branch: master
reviewers:
- kwhetstone
- MarkEWaite
labels:
- dependencies
ignore:
# the dependency is actually provided by the Web container, hence it is aligned with Jetty. See https://github.com/jenkinsci/jenkins/pull/5211
- dependency-name: "javax.servlet:javax.servlet-api"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
*.iws
.*
!.gitignore
!.github/
secrets/
target/
work
/nbactions.xml
100 changes: 56 additions & 44 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,49 +1,61 @@
stage "Setup"
#!/usr/bin/env groovy


stage "Create Plugin Folder"
//pull in the plugins, save to ./plugins
node {
def mvntool = tool name: 'Maven 3.3.3', type: 'hudson.tasks.Maven$MavenInstallation' //system dependent
def jdktool = tool name: 'Oracle JDK 8u40', type: 'hudson.model.JDK' //system dependent
List customEnv = ["PATH+MVN=${mvntool}/bin", "PATH+JDK=${jdktool}/bin", "JAVA_HOME=${jdktool}/", "MAVEN_HOME=${mvntool}"]
customEnv.add("MAVEN_OPTS=-Dmaven.repo.local=${pwd()}/.m2_repo")

dir('pluginFolder'){
def curdir = pwd()
echo curdir
git changelog: false, poll: false, url:'https://github.com/jenkinsci/backend-extension-indexer.git', branch: 'master'
withEnv(customEnv) {
sh 'mvn clean install -DskipTests'
pipeline {
agent { label 'maven' }
triggers {
cron('H H * * 0')
}
sh "java -verbose:gc -jar ./target/*-bin/extension-indexer*.jar -plugins ${curdir}/plugins"
stash includes: './plugins/*', name: 'plugins'
deleteDir()
}
}

node {
def mvntool = tool name: 'Maven 3.3.3', type: 'hudson.tasks.Maven$MavenInstallation' //system dependent
def jdktool = tool name: 'Oracle JDK 8u40', type: 'hudson.model.JDK' //systeme dependent
List customEnv = ["PATH+MVN=${mvntool}/bin", "PATH+JDK=${jdktool}/bin", "JAVA_HOME=${jdktool}/", "MAVEN_HOME=${mvntool}"]
customEnv.add("MAVEN_OPTS=-Dmaven.repo.local=${pwd()}/.m2_repo")

stage "Generate Documentation"
dir('docFolder'){
git changelog: false, poll: false, url: 'https://github.com/kwhetstone/pipeline-steps-doc-generator.git', branch: 'master'
withEnv(customEnv) {
sh 'mvn clean install -DskipTests'
options {
timestamps()
}
dir('pluings'){
unstash 'plugins'

stages {
stage('Checkout') {
steps {
deleteDir()
checkout scm
}
}

stage('Prepare Indexer') {
steps {
dir('pluginFolder') {
git changelog: false,
poll: false,
url:'https://github.com/jenkinsci/backend-extension-indexer.git',
branch: 'master'
sh 'mvn -s ../settings.xml clean install -DskipTests'
}
}
}

stage('Run Indexer') {
steps {
dir('pluginFolder') {
sh 'java -verbose:gc -jar ./target/*-bin/extension-indexer*.jar -plugins ./plugins && mv plugins ..'
}
}
}

stage('Generate Documentation') {
steps {
dir('docFolder') {
checkout scm
sh 'mvn -s ../settings.xml clean install -DskipTests'
sh 'mv ../plugins . && java -verbose:gc -javaagent:./contrib/file-leak-detector.jar -jar ./target/*-bin/pipeline-steps-doc-generator*.jar'
}
}
}

stage('Clean up') {
steps {
dir('docFolder') {
zip dir: './allAscii', glob: '', zipFile: 'allAscii.zip'
zip dir: './declarative', glob: '', zipFile: 'declarative.zip'
archiveArtifacts artifacts: 'allAscii.zip,declarative.zip', fingerprint: true
}
}
}
}
sh 'java -verbose:gc -jar ./target/*-bin/pipeline-steps-doc-generator*.jar'
}

stage "Archive and Cleanup"
dir('docFolder'){
zip dir: './allAscii', glob: '', zipFile: 'allAscii.zip'
archive 'allAscii.zip'
deleteDir()
}
}
}
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,49 @@
# pipeline-plugin-doc-generator
Creates the documentation for pipeline jobs

## Development

Rough outline of interactive development process:

### Get repositories

You will need

* this repo (`jenkins-infra/pipeline-steps-doc-generator`)
* `jenkins-infra/jenkins.io`
* `jenkinsci/workflow-aggregator-plugin` (as an easy example)

You will need to temporarily patch `jenkins.io` as follows:

```diff
diff --git a/scripts/fetch-external-resources b/scripts/fetch-external-resources
index d3ee8319..cf8e38d2 100755
--- a/scripts/fetch-external-resources
+++ b/scripts/fetch-external-resources
@@ -25,12 +25,6 @@ RESOURCES = [
nil,
nil
],
- [
- 'https://ci.jenkins.io/job/Infra/job/pipeline-steps-doc-generator/job/master/lastSuccessfulBuild/artifact/allAscii.zip',
- 'content/_tmp/allAscii.zip',
- nil,
- 'content/doc/pipeline/steps'
- ],
[
'https://repo.jenkins-ci.org/api/search/versions?g=org.jenkins-ci.main&a=jenkins-core&repos=releases&v=?.*.1',
'content/_data/_generated/lts_baselines.yml',
```

### Create content

From this repository, with others in relative positions:

```bash
rm -v ../jenkins.io/content/doc/pipeline/steps/*.adoc
make -C ../../jenkinsci/workflow-aggregator-plugin/demo copy-plugins
mvn "-Dexec.args=-classpath %classpath org.jenkinsci.pipeline_steps_doc_generator.PipelineStepExtractor -homeDir $(pwd)/../../jenkinsci/workflow-aggregator-plugin/demo -asciiDest $(pwd)/../jenkins.io/content/doc/pipeline/steps -declarativeDest /tmp/declarative" -Dexec.executable=$(which java) org.codehaus.mojo:exec-maven-plugin:3.0.0:exec
make -C ../jenkins.io run
```

Then browse: http://localhost:4242/doc/pipeline/steps/
Binary file added contrib/file-leak-detector.jar
Binary file not shown.
62 changes: 52 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,21 @@

<maven.compiler.testSource>1.8</maven.compiler.testSource>
<maven.compiler.testTarget>1.8</maven.compiler.testTarget>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<compilerArgs>
<arg>-Xlint:deprecation</arg>
<arg>-Xlint:all,-options,-path</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
Expand All @@ -25,6 +36,7 @@
</manifest>
</archive>
</configuration>
<version>3.2.0</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
Expand All @@ -41,59 +53,89 @@
</configuration>
</execution>
</executions>
<version>2.6</version>
</plugin>
</plugins>
</build>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.263.x</artifactId>
<version>23</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>args4j</groupId>
<artifactId>args4j</artifactId>
<version>2.0.16</version>
<version>2.33</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-step-api</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-core</artifactId>
<version>1.651</version>
<version>2.278</version> <!-- for ACL.impersonate2() and acegi to Spring Security conversion -->
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>structs</artifactId>
<version>1.5</version>
</dependency>
<dependency>
<groupId>org.jenkinsci.plugins</groupId>
<artifactId>pipeline-model-extensions</artifactId>
</dependency>
<dependency>
<groupId>net.java.sezpoz</groupId>
<artifactId>sezpoz</artifactId>
<version>1.13</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>3.7.7</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.13.1</version>
</dependency>
</dependencies>

<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>http://repo.jenkins-ci.org/public/</url>
<url>https://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>repo.jenkins-ci.org</id>
<url>http://repo.jenkins-ci.org/public/</url>
<url>https://repo.jenkins-ci.org/public/</url>
</pluginRepository>
</pluginRepositories>

<scm>
<connection>scm:git:git://github.com/jenkinsci/pipeline-plugin-doc-generator.git</connection>
<connection>scm:git:git://github.com/jenkins-infra/pipeline-plugin-doc-generator.git</connection>
<developerConnection>scm:git:ssh://git@github.com/jenkinsci/backend-extension-indexer.git</developerConnection>
</scm>
</project>
34 changes: 34 additions & 0 deletions settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<settings>
<pluginGroups>
<pluginGroup>org.jenkins-ci.tools</pluginGroup>
</pluginGroups>

<profiles>
<!-- Give access to Jenkins plugins -->
<profile>
<id>jenkins</id>
<activation>
<activeByDefault>true</activeByDefault> <!-- change this to false, if you don't like to have it on per default -->
</activation>
<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<mirrors>
<mirror>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
<mirrorOf>m.g.o-public</mirrorOf>
</mirror>
</mirrors>
</settings>
Loading