Sobes.tech
Junior — Middle

Tell how build automation, testing, and deployment are implemented in your previous project.

sobes.tech AI

Answer from AI

On the previous project, build, testing, and deployment automation was implemented using a CI/CD pipeline built on Jenkins.

  1. Build: With each commit to the repository, Jenkins would run a build script that created a Python virtual environment, installed dependencies from requirements.txt, and assembled artifacts (such as packages or Docker images).

  2. Testing: After building, automated tests were run using pytest. If the tests failed, the build was considered unsuccessful, and developers received notifications.

  3. Deployment: Upon successful testing, Jenkins automatically deployed the application to a test server or staging environment. For production, a manual trigger with additional checks was used.

Example Jenkinsfile (simplified):

pipeline {
    agent any
    stages {
        stage('Build') {
            steps {
                sh 'python -m venv venv'
                sh './venv/bin/pip install -r requirements.txt'
            }
        }
        stage('Test') {
            steps {
                sh './venv/bin/pytest tests/'
            }
        }
        stage('Deploy') {
            when {
                branch 'main'
            }
            steps {
                sh './deploy.sh'
            }
        }
    }
}

Thus, the entire process from commit to deployment was highly automated, which improved the quality and speed of releasing new versions.