Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c52c662
-
maeveho25 Jul 28, 2025
bf0fe49
init
maeveho25 Aug 7, 2025
1ea861b
initialize CRD to POJO generator
maeveho25 Aug 7, 2025
72a6092
test
maeveho25 Aug 11, 2025
a68e870
test
maeveho25 Aug 11, 2025
df75560
Merge branch 'main' into feature/crd-generator-integration
maeveho25 Aug 26, 2025
7f1a5fd
fix: replace cobertura with jacoco for Java 17 compatibility
maeveho25 Aug 26, 2025
50084a3
fix: update JUnit Jupiter Engine to 5.12.2 for compatibility
maeveho25 Aug 26, 2025
5650c3e
feat: improve CRD Generator to run with mvn generate-sources
maeveho25 Aug 26, 2025
b90ae5d
fix: add generate-pojos profile for mvn generate-sources alias
maeveho25 Aug 26, 2025
fdd1d77
fix: disable equals/hashCode generation to avoid SpotBugs issues
maeveho25 Aug 26, 2025
fb13b9a
Update src/main/java/org/waveywaves/jenkins/plugins/tekton/generator/…
maeveho25 Aug 26, 2025
257522f
Update src/main/java/org/waveywaves/jenkins/plugins/tekton/generator/…
maeveho25 Aug 26, 2025
d156250
fix: add missing BASE_STEP_CLASS constant for CrdJavaGenerator
maeveho25 Aug 26, 2025
020299a
Update src/test/java/org/waveywaves/jenkins/plugins/tekton/client/bui…
maeveho25 Aug 26, 2025
10dca32
Update src/main/java/org/waveywaves/jenkins/plugins/tekton/generator/…
maeveho25 Aug 26, 2025
d9d387e
Update src/main/java/org/waveywaves/jenkins/plugins/tekton/generator/…
maeveho25 Aug 26, 2025
3f7c238
fix: correct syntax error in EnhancedCrdProcessor
maeveho25 Aug 26, 2025
4a13f13
fix: add missing constants BASE_STEP_CLASS and BASE_STEP_CRD_TYPES
maeveho25 Aug 26, 2025
3443578
fix: align BASE_STEP_CLASS with EnhancedCrdProcessor for consistency
maeveho25 Aug 26, 2025
a7e5d42
fix: revert to Tekton custom BaseStep - workflow.steps.BaseStep doesn…
maeveho25 Aug 26, 2025
756fee1
refactor: rename CRD generator classes for better clarity
maeveho25 Aug 27, 2025
ee6a362
security: replace System.exit() calls with proper exception handling
maeveho25 Aug 28, 2025
fee1ab1
fix: temporarily removed Jelly generating files
maeveho25 Aug 30, 2025
1683ab6
security: replace System.exit() with exceptions to fix Jenkins Securi…
maeveho25 Aug 30, 2025
ca723e0
security: remove System.exit() for jenkins security rule:
maeveho25 Aug 30, 2025
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
1 change: 1 addition & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
- name: Run unit tests
run: mvn -B -ntp test -Dtest="!*E2ETest*" -Djava.awt.headless=true jacoco:report


- name: Upload unit test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@ jobs:
run: mvn verify -DskipUnitTests

- name: Generate test coverage report
run: mvn cobertura:cobertura
continue-on-error: true

- name: Generate JaCoCo coverage report
run: mvn jacoco:report
continue-on-error: true

Expand All @@ -99,7 +95,6 @@ jobs:
path: |
target/surefire-reports/
target/failsafe-reports/
target/site/cobertura/
target/site/jacoco/
retention-days: 7

Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ jenkins.war

pom.xml.releaseBackup
release.properties

# Generated Tekton POJOs
target/generated-sources/tekton/
src/main/java/org/waveywaves/jenkins/plugins/tekton/generated/
1 change: 0 additions & 1 deletion .mvn/maven.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-Pconsume-incrementals
-Pmight-produce-incrementals
-Dchangelist.format=-rc%d
-Pdownload-binaries
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ install-tekton:
kubectl apply --filename https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml

coverage:
mvn cobertura:cobertura -q
mvn jacoco:report -q

build:
mvn clean install -DskipTests -q
Expand Down
214 changes: 206 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<tekton-client.version>5.4.1</tekton-client.version>
<maven-surefire-plugin.version> 3.2.5</maven-surefire-plugin.version>
<mockwebserver.version>0.1.8</mockwebserver.version>
<junit-jupiter-engine.version>5.6.2</junit-jupiter-engine.version>
<junit-jupiter-engine.version>5.12.2</junit-jupiter-engine.version>
<jx-pipeline.version>0.1.5</jx-pipeline.version>
</properties>

Expand Down Expand Up @@ -127,6 +127,53 @@
<artifactId>pipeline-utility-steps</artifactId>
<scope>test</scope>
</dependency>

<!-- E2E Testing Dependencies -->
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-test-harness</artifactId>
<version>${jenkins-test-harness.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<version>1.21.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit-jupiter-engine.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>${junit-jupiter-engine.version}</version>
<scope>test</scope>
</dependency>

<!-- JSON Schema to POJO generation -->
<dependency>
<groupId>org.jsonschema2pojo</groupId>
<artifactId>jsonschema2pojo-core</artifactId>
<version>1.2.2</version>
</dependency>

<!-- Code generation with Sun CodeModel -->
<dependency>
<groupId>com.sun.codemodel</groupId>
<artifactId>codemodel</artifactId>
<version>2.6</version>
</dependency>

<!-- Commons IO for file operations -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.17.0</version>
</dependency>
</dependencies>

<dependencyManagement>
Expand All @@ -143,6 +190,11 @@
<artifactId>commons-lang3</artifactId>
<version>3.18.0</version>
</dependency>
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>commons-text-api</artifactId>
<version>1.13.1-176.v74d88f22034b_</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>jackson2-api</artifactId>
Expand Down Expand Up @@ -178,6 +230,36 @@
<artifactId>ivy</artifactId>
<version>2.5.3</version>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
<version>2.19.0</version>
</dependency>
<dependency>
Copy link
Preview

Copilot AI Aug 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dependencies are duplicated in both the dependencies and dependencyManagement sections (jsonschema2pojo-core appears in both). This can lead to version conflicts and maintenance issues. Dependencies should be declared in dependencyManagement and referenced without versions in the dependencies section.

Copilot uses AI. Check for mistakes.

<groupId>org.jsonschema2pojo</groupId>
<artifactId>jsonschema2pojo-core</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<version>2.27.0</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.14.0</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down Expand Up @@ -225,18 +307,100 @@
<artifactId>maven-hpi-plugin</artifactId>
<extensions>true</extensions>
</plugin>

<!-- Maven Surefire Plugin for running tests -->
<!-- JaCoCo for code coverage -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.13</version>

<executions>
<execution>
<id>prepare-agent</id>
<goals><goal>prepare-agent</goal></goals>
</execution>

<execution>
<id>report</id>
<phase>verify</phase>
<goals><goal>report</goal></goals>
</execution>
</executions>
</plugin>

<!-- Add generated sources to compilation -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.7</version>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.4.0</version>
<executions>
<execution>
<id>add-generated-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/tekton</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>

<!-- Generate Tekton POJOs from CRDs after compilation -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>generate-tekton-pojos</id>
<phase>process-classes</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>org.waveywaves.jenkins.plugins.tekton.generator.TektonPojoGenerator</mainClass>
<arguments>
<argument>${project.basedir}/src/main/resources/crds</argument>
<argument>${project.build.directory}/generated-sources/tekton</argument>
<argument>org.waveywaves.jenkins.plugins.tekton.generated</argument>
</arguments>
<includeProjectDependencies>true</includeProjectDependencies>
<includePluginDependencies>true</includePluginDependencies>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<formats>
<format>html</format>
<format>xml</format>
</formats>
<check />
<excludes>
<!-- Exclude E2E tests from regular test runs by default -->
<exclude>**/*E2ETest.java</exclude>
</excludes>
</configuration>
<executions>
<!-- Regular unit tests -->
<execution>
<id>unit-tests</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<excludes>
<exclude>**/*E2ETest.java</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down Expand Up @@ -286,6 +450,40 @@
</execution>
</executions>
</plugin>

</plugins>
</build>
</profile>

<!-- Simple profile to generate POJOs with 'mvn generate-sources -P generate-pojos' -->
<profile>
<id>generate-pojos</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>generate-tekton-pojos-alias</id>
<phase>generate-sources</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>org.waveywaves.jenkins.plugins.tekton.generator.TektonPojoGenerator</mainClass>
<arguments>
<argument>${project.basedir}/src/main/resources/crds</argument>
<argument>${project.build.directory}/generated-sources/tekton</argument>
<argument>org.waveywaves.jenkins.plugins.tekton.generated</argument>
</arguments>
<includeProjectDependencies>true</includeProjectDependencies>
<includePluginDependencies>true</includePluginDependencies>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
Expand Down
Loading