Skip to content

refactor: migrate to declarative pipeline syntax #112

@somethingwithproof

Description

@somethingwithproof

Description

Migrate Jenkins shared library from scripted to declarative pipeline syntax.

Motivation

  • Declarative pipelines are more readable and maintainable
  • Better IDE support and linting
  • Easier onboarding for new team members
  • Improved error handling with post sections

Proposed Solution

  1. Create declarative equivalents for all scripted pipelines
  2. Maintain backward compatibility during transition
  3. Add pipeline syntax validation
  4. Update documentation with examples

Acceptance Criteria

  • All core pipelines converted to declarative
  • Backward compatibility layer for legacy pipelines
  • Blue Ocean compatibility verified
  • Documentation updated
  • Migration guide for existing users

Example Transformation

// Before (Scripted)
node('linux') {
    stage('Build') {
        sh 'make build'
    }
}

// After (Declarative)
pipeline {
    agent { label 'linux' }
    stages {
        stage('Build') {
            steps {
                sh 'make build'
            }
        }
    }
}

Commits should follow

refactor(pipeline): migrate buildJava to declarative
refactor(pipeline): migrate deployK8s to declarative
docs: add declarative pipeline migration guide

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions