Improving Tekton Client Plugin for Jenkins

Goal: Enhance the Jenkins Tekton Client Plugin to improve cloud-native CI/CD interoperability and user experience

Status: Selected

Team

Details

Abstract

The Tekton Client Plugin enables Jenkins to interact with Tekton, a powerful and flexible cloud-native CI/CD framework. This project aims to modernize the plugin, enhance the plugin’s capabilities, improve its integration with the Jenkins ecosystem, and provide a better user experience for cloud-native CI/CD workflows.

Rationale

The Tekton Client Plugin is crucial for Jenkins users who want to leverage Tekton’s capabilities in their CI/CD pipelines. By improving this plugin, we can enhance the interoperability between Jenkins and cloud-native technologies, making it easier for users to adopt modern CI/CD practices. The project will focus on adding support for various Tekton resources, improving the plugin’s stability, and enhancing the user experience through better documentation and examples.

Implementation

The project will involve the following key steps:

  • Phase 1: Testing, Documentation and Stability (2-3 weeks)

    • Cleanup build and setup testing framework

      • Implement mock environments to simulate Kubernetes interactions (GHA)

      • Use CI pipelines to run tests automatically after each commit.

      • Implement code coverage analysis to ensure all critical paths are tested.

    • Integration Tests with Kubernetes:

      • Setup minikube/kind for testing in CI.

      • Design integration tests.

      • Fix existing functionality through new integration tests.

    • Comprehensive Documentation:

      • Document existing features.

      • Release a new patch version of the plugin + blog post

  • Phase 2: Understand codebase, refactor and setup for success (2-3 weeks)

    • Plan refactor and implement for the codebase.

      • Understand codebase, take notes, and discuss with the team.

      • Analyze and document pros and cons of the current implementation.

      • Release a new minor version of the plugin.

    • Design for CRD consumption and dynamic type generation.

      • Brainstorm and design a better type generation system for each Tekton CRD.

      • Discuss with the larger community in Jenkins and Tekton to get a better idea.

        • Present on Tekton Working Group call if possible.

        • Apply changes from all the reviews.

        • Write a blog post for Jenkins.

  • Phase 3: Implement Tekton type generation through on-cluster CRDs (2 weeks)

    • Start implementation for CRD based type/class generation in Java.

      • Start implementing the feature as an epic after it’s divided into multiple issues in GitHub with one master issue to track all the subtasks and issues.

    • Thoroughly test the feature with unit and integration tests.

      • Write new integration tests which test the feature with Tekton pipeline CRDs taken from the tektoncd/pipeline examples repo. This folder can be synced with the repository.

    • Release

      • Release a new minor version of a plugin after implementation + Blog Post.

  • Phase 4: Design generating Tekton Pipelines from Jenkins Pipelines (2 weeks)

    • Review existing implementations.

      • Do a small “literature review” of any tries from the community towards this effort.

      • Make a list of good implementations which can be used as an inspiration.

      • Develop ideas for how we can solve this problem with AST trees or something else.

    • Focus on a few PoCs in pure Java without any plugin development involved.

      • Based on the existing literature reviews, write PoC implementations which show what are the different ways we can parse CRDs into Java Objects or classes and consume them directly given that the CRDs are different and also check for compatibility from given CR to target CRD.

    • Finalize a PoC and draft plan for implementation in the Tekton Client Plugin.

      • Based on the PoC created, finalize a PoC and draft and implementation plan and get it reviewed.

      • Implement review comments.

      • Finalize implementation plan + blog post.

  • Phase 5: Implement Jenkins Pipeline to Tekton Pipeline conversion (3 weeks)

    • Implement Jenkins Pipeline to Tekton Pipeline Conversion

      • Implement the plan as an epic with a master issue and multiple sub issues.

      • Discuss with the Team **Thoroughly test with unit and integration tests

      • Ideally write these first, mock functions and setup dev env and then start implementing.

    • Release minor version + blog post

      • Phase 6: Implement Tekton Triggers and EventListener (2 weeks)

    • Assess plugin for possible attack vectors.

    • Write a security assessment review.

    • Create an issue based on the review.

    • Fix some low-hanging fruits.

    • Release major version + Blog Post.

Office hours

  • Weekly project office hours: Mondays 15:30 UTC on Google Meet (Video call link)

Links