Where do the responsibilities of build tools end and those of CI tools start? [duplicate]

In the delivery of software, and within the sense of the deployment pipeline, where do the responsibilities of build tools, like Maven, end, and the responsibilities of CI start?

As a rough example of a problem that arises; should build tools have any responsibility to the configuration and execution of acceptance tests when they are further down the pipeline than actually building the artifact?

I’d like an answer that addresses in the sense of deployment lifecycle phases rather than in specifics, like my example. Although examples would help bolster the answer.

2

This comment sounds right.

In my opinion, as much of the build code as possible should be in the product’s internal build scripts, such as ant’s build.xml, maven’s pom.xml, etc. This serves 3 purposes:

  1. Versions the build process along with the product. If you fork a branch of your product in source control and make a change that requires build changes (like say you are adding a minify step to javascript files that was not there before), nothing outside of your source control needs to change.
  2. Ease of development and on-boarding. As a developer, it is great for productivity when I can simply checkout the code from source control and run a build command, be it ant clean build or mvn package or whatever.
  3. Removes the dependence on CI for builds. You should use CI for builds, but if Jenkins is down for any reason, you don’t want to be unable to build. CI should be about automating an existing streamlined build process.

Ideally, a CI server should be configured to simply do this:

  1. Checkout
  2. Run a build command, preferably the same command developers run or perhaps a super-set of those commands.
  3. Archive the build to some official build archive location.

Where this gets less clear is with processes that occur at build time but are not strictly needed to build, such as unit and integration tests.

My preference would be to include unit tests in the core build. That is, you cannot get a build, even in dev, without the unit tests running and passing. Of course, that requires a huge amount of discipline and rarely is done. If you are lucky enough to have an environment that runs automated unit tests, including them in the core build seems like a good idea.

Integration tests, however, can take much longer, so running them any time you just want to compile code can be a huge productivity drain. Imagine if every compile -> test cycle requires an hour-long integration test suite. You would compensate by compiling less often which means less testing and naturally no good will come from that.

What I would do is define such functionality in build scripts within source control but not wire them into the core build. I don’t know Maven very well, but for ant, I would define a separate target, like ant integrationTests that you need to explicitly run. That could be configured in the CI system and that way, developers can choose if/when to run it themselves on their systems.

To put into a pipeline view, perhaps something like this:

Checkout -> Build -> Integration Tests -> System Tests -> Performance Tests -> Load Tests -> Archive Build -> Deploy

The implementation of each of those steps should live inside the product’s build scripts in source control (except for checkout, otherwise you have a chicken or egg problem) and the build process owns the decision of which step to call in what order. Certain steps may not be needed on every build. Load tests, for instance, maybe only run once release.

That is my 2 cents. I am by no means an authority on the subject, but I have seen builds done well and builds done poorly.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật