![]() ![]() Script: cat file1.txt file2.txt > compiled.txt Let's define a separate step for it: stages: Script: cat file1.txt file2.txt | gzip > packaged.gzĪlso, we forgot to mention, that compilation (which is represented by concatenation in our case) takes a while, so we don't want to run it twice. Let's define the order by specifying stages: stages: We only want to run the 'package' job if the tests are successful. Perfect! However, we have a problem to fix: the jobs are running in parallel, but we do not want to package our application if our tests fail. Script: cat file1.txt file2.txt | grep -q 'Hello world'Ĭommitting it, and hooray! Our build is successful: Moreover, you heard at a conference that people use CI to run tests… Run our first test inside CIĪfter a couple minutes to find and read the docs, it seems like all we need is these two lines of code in a file called .gitlab-ci.yml: test: Luckily, your code is already on GitLab, and you remember that there is a built-in CI system. So you decided to solve the problem once and for all. The problem is that there are ten developers in the team, and, you know, human factors can hit hard.Ī week ago, a new guy forgot to run the script and three clients got broken builds. The code is pretty sophisticated: cat file1.txt file2.txt | grep -q "Hello world" The most responsible developer wrote a small script to run every time we are about to send our code to customers. If there's no such phrase, the whole development team stays without a salary for a month. Moreover, it is super-critical that the concatenation of these two files contains the phrase "Hello world." Imagine that you work on a project, where all the code consists of two text files. Anyway, we're starting from scratch here. Let's assume that you don't know anything about what Continuous Integration is and why it's needed. ![]() We are engaged in outsourcing web development, and in my spare time I help professional developers become even more professional. ![]() Hi, I'm Andrey Okhotnikov - CEO at React-Outsourcing. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |