2019 DevOps essential interview questions - Continuous Integration articles

Original Address: https://medium.com/edureka/devops-interview-questions-e91a4e6ecbf3
original author: Saurabh Kulshrestha
translated Jun: CODING戴维奥普斯

Q1: What is Continuous Integration?

I would advise you to define the minimum continuous integration as a start to answer this question. This is a research and development practice, many times developers need to integrate the code into a shared code base every day. Then verify the code by automatically modifying each building, so that the team found the problem as soon as possible.

I suggest you explain in a previous work is how to implement continuous integration, you can refer to the following example:

image

In the figure above:
1, developers will clone the code to the private workspace.
2, after the completion of coding, they commit the changes to the shared code library (version control repository).
3, CI server monitoring code repository and when changes are detected changes.
4, followed by CI server to extract these changes build, run unit and integration tests.
5, CI server will tell the success of team building immediately.
6. If the build fails, CI server will send an alert to the team.
7, R & D team will solve the problem as soon as possible.
8, this process will be repeated.

Q2: Why the need to develop R & D team and continuous integration testing?

For the answer, you should be concerned about continuous integration needs. I suggest that you mention the following explanation in the answer:
the development and testing of continuous integration by replacing the traditional testing practices after the completion of all development to improve software quality and reduce delivery time-consuming. It allows development teams early detection and localization issues, because developers need several times a day (or more frequently) the code into the code repository, and then automatically verify each integration.

Q3: continuous integration success factors?

Here, you have to mention continuous integration requirements, you can include the following in reply:

  • Maintenance code repository
  • Build Automation
  • 让构建自我检测
  • 每个人每天都确保已将修改提交至基线
  • 保持快速构建
  • 在生产环境的克隆环境中进行测试
  • 研发团队可以轻松获得最新的可交付成果
  • 每个人都可以看到最新构建的结果
  • 自动部署

Q4:如何将 Jenkins 从一台服务器迁移或者复制到另一台服务器?

我会通过将 jobs 目录从旧服务器复制到新服务器的方式来完成这个事情。有很多种方法可以做到这一点:

  • 只需复制相应的 job 目录,即可将 job 从一个 Jenkins 服务器移动到另一个。
  • 通过使用其它名称克隆 job 目录来制作现有 job 的副本。
  • 通过重命名目录来重命名现有 job。请注意,如果你更改了 job 名称,则需要更改尝试调用该重命名 job 的所有 job 。

Q5:如何在 Jenkins 中创建备份和复制文件?

可以很直接地回答这个问题:要创建备份。你需要做的就是定期备份 JENKINS_HOME 目录。这包含所有构建 job 配置,从属节点配置和构建历史记录。要创建 Jenkins 的备份,只需复制此目录即可,你还可以复制 job 目录或重命名目录。

Q6:如何配置 Jenkins 的 job?

关于这个答案的解决方法是首先提一下如何创建 job:转到 Jenkins 首页,选择“New Job”,然后选择“Build a free-style software project”。然后你可以设置这个自由式 job 的元素:

  • 可选的 SCM,例如源代码所在的 CVS 或 Subversion。
  • 用于控制 Jenkins 何时执行构建的触发器。
  • 某种构建脚本,用于执行实际工作的构建(ant,maven,shell 脚本,批处理文件等)。
  • 从构建中收集信息的可选步骤,例如归档制品、记录 javadoc 和测试结果。
  • 配置构建结果通知其他人/系统的步骤,例如发送电子邮件、即时消息、更新问题跟踪器等。

Q7:列举 Jenkins 中一些有用的插件

下面我将提到一些重要插件:

  • Maven 2 project
  • Amazon EC2
  • HTML publisher
  • Copy artifact
  • Join
  • Green Balls

I think these are the most useful plug-ins, you think you can add useful plug-ins. But be sure to first plug mentioned above, and then add your own plug-ins.

Q8: How to ensure the safety of Jenkins?

  • Ensure global security configuration item has been opened.
  • Ensure proper use of plug-Jenkins and employee enterprise directory integration.
  • Be sure to enable the project to set access permissions matrix.
  • By the process of self-defined version control script to automate Jenkins set permissions / privileges.
  • Jenkins restrict physical access to the data / folder.
  • Its regular security audits.

Click Use CODING
experience the full DevOps Agile development tool chain

Guess you like

Origin www.cnblogs.com/codingdevops/p/11460092.html