DevOps Pokročilý
Jenkins Pipeline¶
JenkinsPipelineCI/CD 3 min čtení
Jenkins Declarative Pipeline. Stages, agents, post actions.
Jenkinsfile¶
pipeline {
agent any
stages {
stage('Test') { steps { sh 'npm ci && npm test' } }
stage('Build') { steps { sh 'docker build -t myapp:${BUILD_NUMBER} .' } }
stage('Deploy') {
when { branch 'main' }
steps { sh 'kubectl set image deploy/app app=myapp:${BUILD_NUMBER}' }
}
}
post { failure { slackSend channel: '#ci', message: 'Build failed!' } }
}
Shrnuti¶
Jenkins je flexibilni ale vyzaduje udrzbu. Pro nove projekty zvazte GitHub Actions nebo GitLab CI.
Potřebujete pomoct s implementací?¶
Náš tým má zkušenosti s návrhem a implementací moderních architektur. Rádi vám pomůžeme.