CI/CD setup for website via Jenkins

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1212
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    852
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    815

Setting up CI/CD for website via Jenkins

Jenkins—mature open-source automation. Requires own server, but no limits on minutes, agents, parallel builds. For organizations with strict infrastructure isolation or large build volumes—justified choice.

Installation

# Ubuntu 22.04, Java 17 required
apt install fontconfig openjdk-17-jre
wget -O /usr/share/keyrings/jenkins-keyring.asc \
  https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key
apt update && apt install jenkins

systemctl enable --now jenkins
# Available on :8080

Minimum: 2 CPU, 4 GB RAM.

Declarative Pipeline (Jenkinsfile)

pipeline {
    agent any

    tools {
        nodejs 'NodeJS-20'
    }

    environment {
        DEPLOY_HOST = credentials('deploy-host')
        DEPLOY_KEY  = credentials('deploy-ssh-key')
    }

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

        stage('Install') {
            steps {
                sh 'npm ci'
            }
        }

        stage('Test') {
            steps {
                sh 'npm test'
            }
            post {
                always {
                    junit 'test-results/**/*.xml'
                }
            }
        }

        stage('Build') {
            steps {
                sh 'npm run build'
            }
        }

        stage('Deploy') {
            when {
                branch 'main'
            }
            steps {
                sshagent(['deploy-ssh-key']) {
                    sh '''
                        rsync -avz --delete dist/ deploy@${DEPLOY_HOST}:/var/www/mysite/
                    '''
                }
            }
        }
    }

    post {
        failure {
            telegramSend(message: "Build failed: ${env.JOB_NAME}", chatId: '...')
        }
    }
}

Credentials management

Manage Jenkins → Credentials → Secret text, SSH keys, certificates. Never in code.

withCredentials([
    string(credentialsId: 'telegram-token', variable: 'TG_TOKEN')
]) {
    sh 'echo $TG_TOKEN'
}

Parallel stages

stage('Test & Lint') {
    parallel {
        stage('Unit Tests') {
            steps { sh 'npm test' }
        }
        stage('Lint') {
            steps { sh 'npm run lint' }
        }
    }
}

Docker agents

pipeline {
    agent none

    stages {
        stage('Build') {
            agent {
                docker {
                    image 'node:20-alpine'
                }
            }
            steps {
                sh 'npm ci && npm run build'
            }
        }
    }
}

Setup time: 2-3 days for server + first working pipeline.