Build Scripts - To be shortsighted or foresighted?

I just discussed a topic about build scripts with my friend, he said they will have build scripts, but not in plan yet, it makes me think more on the build scripts. Typically, in a software project, build scripts are in charge of the following tasks automatically when we execute them:

  1. Check out the latest code from code repository.
  2. Build all source code and make sure there is no compile error.
  3. Generate a new build number and tag the repository with the new build number.
  4. Configure properties according to different environment.
  5. Create deployment packages for a specific environment.
  6. Deploy the packages to the target platform remotely.
  7. Report if it executes successfully or not.

The steps above are just a typical situation in J2EE projects, the build scripts may be changed and adjusted according to different types of project, as long as you can imagine, it can do it for you automatically, such as creating branch, finding bugs and so forth. CPU is really the guy serving you for free at any time.

I notice there many many software teams agree that the build scripts are very important, but they have no time to implement them because of the tight timeline, and then they forget it gradually. When someone mentions why they don’t provide build scripts, they will always explain that no time, no time, no enough time. Let me analyze and calculate the time, and help you save more time.

Suppose:

TIME_A = 3 * 60 = 180 (minutes) : The time of doing build and deploy manually, normal, maybe two or three hours each time, because you may encounter different environments and different problems.

TIME_B = 3 * 8 * 60 = 1440 (minutes) : The time of developing good build scripts, it may take two or three days.

Wow, now I understand the developers who don’t like to write build scripts, it really will take much time to do it, especially within a tight timeline. But please realize that the timeline of software development team should be always tight, because we are facing competitions every day, also the shareholders are waiting for revenue every day. We should be foresighted and then we can make right decision and save time and money for company. Let’s continue to calculate…

Continue to suppose:

TIME_C = 5 (minutes) : The time that the developer will take to execute build scripts, just execute a command basically, let’s assume the time would be 5 minutes. (The developer must be loafing on the job :D )

If the project is succeeded, it will go into the maintaining lifecycle, then many new patches, new releases will come out methodically, during the whole process, we may do the building and deploying task hundreds of times, or even thousands of times in some large-scale products, just assume the time would be 500 times. Let’s compare the total time between two situations – to write build scripts or not to write.

  • Write build scripts: TIME_B + TIME_C * 500 = 3940 (minutes)
  • Don’t write build scripts: TIME_A * 500 = 90000 (minutes)

This is only calculated by ideal time of manual building and deploying, I think there should be many problems each time when you build and deploy manually. Now it’s your time to decide to write build scripts or not to write, at the same time, you are choosing to be shortsighted or foresighted. What I want to say is that developing build scripts is a must, not option in any situations . As long as you care about the project, you must be interested in doing it right now.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值