_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN
Let's talk

Jenkins Pipeline — CI/CD as Code

08. 12. 2014 1 min read CORE SYSTEMSai
Jenkins Pipeline — CI/CD as Code

Jenkins freestyle jobs served us well for years. But with 50 projects and increasingly complex builds, they became unmaintainable. Jenkins Pipeline brought build pipelines defined as code in a Jenkinsfile — versioned, reviewed, reproducible.

Pipeline as Code

pipeline {
    agent any
    stages {
        stage('Build') {
            steps { sh 'mvn clean compile' }
        }
        stage('Test') {
            steps { sh 'mvn test' }
            post { always { junit 'target/surefire-reports/*.xml' } }
        }
        stage('Package') {
            steps {
                sh 'mvn package -DskipTests'
                archiveArtifacts 'target/*.war'
            }
        }
        stage('Deploy to Staging') {
            when { branch 'develop' }
            steps { sh './deploy.sh staging' }
        }
    }
}

Shared Libraries and Multibranch

A shared library core-pipeline-lib with functions like deployToEnvironment() and runSonarAnalysis(). Multibranch Pipeline automatically detects branches — a feature branch gets an automatic build.

Jenkinsfile Belongs in Every Repository

The build process is part of the project — versioned and reviewed. If you’re still using freestyle jobs, migrate to Pipeline.

jenkinsci/cdpipelineautomatizace
Share:

CORE SYSTEMS

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.

Need help with implementation?

Our experts can help with design, implementation, and operations. From architecture to production.

Contact us