Live data from Hacker News

What is CI and why use it?

blog.rainforestqa.com

31–40 of 47 posts

Re: What is CI and why use it?

#31

In my opinion, this book[1] is the authority on continuous integration and continuous deployment. Continuous Integration is fundamentally about creating a tight feedback loop between your developers and your code. When you program in your IDE, the instant you write uncompilable code, you get red squigglies, so you're getting an instant feedback loop on something you just wrote. CI is the same thing, but at a higher l…

> [1] http://www.amazon.com/dp/0321601912?tag=contindelive-20

Did you just put your Amazon associates referral code in a link on HN? lol

Re: What is CI and why use it?

#32

Thanks for the article. I apologize in advance if this is a hijack, but I've really been trying to understand the craze of CI and feel this is a good place to hopefully get answers. CI is something I have a constant struggle with. I primarily work in small teams and I tend to work with other developers that are diligent about running tests and know that "if the tests aren't green when I merge master into my topic bra…

Just looked up what kinds of things we do on our CI & CD:

- Run unit and casperjs/selenium UI tests

- Minimize and optimize JS and CSS files if necessary

- Add revision numbers to prevent caching on highly cached files

- Processing less files

- Closure compiler

- Grunt

- CDN cache clears or uploads

- Translation locale strings updates

- Deploying on servers

Tens of tasks/tests done in parallel and finished in 45 seconds.

The most important thing is by automating things, you are dramatically reducing possibility of making mistakes or forgetting something.

Re: What is CI and why use it?

#33

Thanks for the article. I apologize in advance if this is a hijack, but I've really been trying to understand the craze of CI and feel this is a good place to hopefully get answers. CI is something I have a constant struggle with. I primarily work in small teams and I tend to work with other developers that are diligent about running tests and know that "if the tests aren't green when I merge master into my topic bra…

You also are running your tests in a different environment (diff machine) which could catch some bugs IMHO. In addition to that, having the CI server deploying for you also means you can have a very limited part of your team that have actual production rights. I never had any good experience with Jenkins, Hudson before that or CruiseControl.net (yes, I automated .Net deployment with that, years ago!). This is why I p…

Yeah, I don't run the entire suite either until the merge just before master. While I'm working on a branch I'm only running specific tests.

Having it build and run on a different machine could be valuable for certain applications.

Re: What is CI and why use it?

#34
post #32

Thanks for the article. I apologize in advance if this is a hijack, but I've really been trying to understand the craze of CI and feel this is a good place to hopefully get answers. CI is something I have a constant struggle with. I primarily work in small teams and I tend to work with other developers that are diligent about running tests and know that "if the tests aren't green when I merge master into my topic bra…

Just looked up what kinds of things we do on our CI & CD: - Run unit and casperjs/selenium UI tests - Minimize and optimize JS and CSS files if necessary - Add revision numbers to prevent caching on highly cached files - Processing less files - Closure compiler - Grunt - CDN cache clears or uploads - Translation locale strings updates - Deploying on servers Tens of tasks/tests done in parallel and finished in 45 seco…

> - Run unit and casperjs/selenium UI tests

Of all of the steps you listed, this is the only step that actually pertains to CI. The rest are all part of deployment so they would fall under CD.

Re: What is CI and why use it?

#35
post #23

Earlier quoted context omitted.

If this is all happening at a set time every day, couldn't it just be a cron job? You do have the script created already, CI is just running it for you.

Sure it could be a cron job, but using Jenkins adds some conveniences: a nice UI to browse projects, plus it archives the output of every historical build, locally-archived build artifacts, lots of extensibility with plugins, and so on.

It's worth adding that it does those things based on the output of previous jobs. Also, if you have many of these setups in parallel, it can create good dashboards and give you one nice (and free) GUI to take in the state of your build empire.

Re: What is CI and why use it?

#36

JP, author of the post here - let me know if you have any additions / questions! :)

I would like to have seen a section for when continuous integration is NOT needed, and would be overkill. For example, I have a solo project where my workflow is: make changes to code, run the test suite, fix any failures that come up, and then push to heroku. I tried CircleCI but I found that the only benefit it offered me was offloading the testing and deployment to another environment. In some ways it actually com…

You're right; CI is pretty much a waste for a single person dev shop. But it's a godsend when working on larger projects: it centralizes processes that should ideally happen automatically, and increases developer confidence in the quality of the codebase by removing the deployment variables from the situation. Any team working on a reasonably large project should be using CI in some form.

For example, if you have a staging environment, and a developer pushes a change to that environment and wants you to make changes and test against his changes, you have to coordinate the deployment to make sure you don't overwrite his changes and vice versa. With CI, all check-ins would get automatically deployed to the staging environment using static scripts, so every deployment is exactly the same. It saves a lot of developer time, and removes the "which developer is a better sysadmin" variable from the equation.

Re: What is CI and why use it?

#37
post #32

Earlier quoted context omitted.

Just looked up what kinds of things we do on our CI & CD: - Run unit and casperjs/selenium UI tests - Minimize and optimize JS and CSS files if necessary - Add revision numbers to prevent caching on highly cached files - Processing less files - Closure compiler - Grunt - CDN cache clears or uploads - Translation locale strings updates - Deploying on servers Tens of tasks/tests done in parallel and finished in 45 seco…

> - Run unit and casperjs/selenium UI tests Of all of the steps you listed, this is the only step that actually pertains to CI. The rest are all part of deployment so they would fall under CD.

Don't agree. Except unit tests, the automated testing should be done on the very final version of the app/site/software, so that you can also catch integration/optimization related problems.

Re: What is CI and why use it?

#38

Earlier quoted context omitted.

CI != CI Servers. CI is about continually integrating your changes with the rest of the team, and ideally it's also continuous deployment (integrating with production environment continually). The reasons for integrating regularly is to tighten the feedback loop and minimise the integration pain by doing it in frequent, small steps. It's perfectly possible to do continuous integration without a CI server, particularl…

Good to know. So I'm actually practicing CI the way that I work, I'm just not paying some company monthly fees for a CI server. So the difference between CI the practice and "CI wink wink" is $$$.

Monthly fees? I don't know where you get that from. The state of the art CI tool, Jenkins, is actually free software.

What there is to a complete CI process depends on what your release process is, apart from the build process. There may be code signings, integration with external services etc. These are steps that are not part of the individual developers build process.

The letter I in CI stands for integration. Two checkins might very well look good on their own, but cause havoc with other systems.

Re: What is CI and why use it?

#39
post #38

Earlier quoted context omitted.

Good to know. So I'm actually practicing CI the way that I work, I'm just not paying some company monthly fees for a CI server. So the difference between CI the practice and "CI wink wink" is $$$.

Monthly fees? I don't know where you get that from. The state of the art CI tool, Jenkins, is actually free software. What there is to a complete CI process depends on what your release process is, apart from the build process. There may be code signings, integration with external services etc. These are steps that are not part of the individual developers build process. The letter I in CI stands for integration. Two…

My 2 cents here, but I think hosting fees will be higher with Jenkins than small CI plans...there are free offerings and even the paid one starts with pretty cheap prices that makes it hard for me to justify even an hour of work configuring a server for that. That said, I know this is not how everyone is thinking.

Re: What is CI and why use it?

#40
post #8

The hosted CI solutions like CircleCI looks good, but letting them control my code and do the deployment, really requires quite a bit of trust. It is another chain who can have a security breach, which could let intruders have access to my code.

There's also Buildbox, which is a hosted CI engine and web interface. It uses agents that you run and control yourself:

https://buildbox.io/

Post reply on HN