<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>blog.johanv.org (Berichten over yarn)</title><link>https://blog.johanv.org/</link><description></description><atom:link href="https://blog.johanv.org/categories/yarn.xml" rel="self" type="application/rss+xml"></atom:link><language>nl</language><copyright>Contents © 2025 &lt;a href="https://blog.johanv.org/pages/contact/"&gt;Johan Vervloet&lt;/a&gt; 
&lt;a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/"&gt;
&lt;img alt="Creative Commons License BY-NC-SA"
style="border-width:0; margin-bottom:12px;"
src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png"&gt;&lt;/a&gt;</copyright><lastBuildDate>Wed, 29 Oct 2025 18:31:20 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>gitlab-ci and yarn</title><link>https://blog.johanv.org/posts/gitlab-ci-and-yarn/</link><dc:creator>Johan Vervloet</dc:creator><description>&lt;div&gt;&lt;p&gt;For my previous post, on &lt;a href="https://blog.johanv.org/posts/gitlab-ci-codeception-and-selenium-web-tests"&gt;gitlab-ci and codeception&lt;/a&gt;, I created a small project on gitlab that &lt;a href="https://gitlab.com/johanv/codeception-ci-demo"&gt;runs selenium webtests during gitlab-ci&lt;/a&gt;.  The project being tested is just a small vue.js-application.&lt;/p&gt;
&lt;p&gt;Recently I rewrote that small application; now it uses &lt;a href="https://vuejs.org/v2/guide/single-file-components.html"&gt;a single file vue component&lt;/a&gt;. I'm not completely sure what I've done, but it seems to work, and it involves &lt;a href="https://github.com/symfony/webpack-encore"&gt;webpack encore&lt;/a&gt; and &lt;a href="https://yarnpkg.com/en/"&gt;yarn&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Running yarn from gitlab-ci" src="https://blog.johanv.org/galleries/misc/gitlab-codeception-yarn.png"&gt;&lt;/p&gt;
&lt;p&gt;Now the challenge was to run yarn from gitlab-ci. I was looking for a docker container with yarn (even tried to build one myself), but it took me some time before I discovered that yarn is included in the &lt;a href="https://hub.docker.com/_/node"&gt;node&lt;/a&gt;-container.&lt;/p&gt;
&lt;p&gt;So I now use this node container in an extra task of the build stage in my &lt;a href="https://gitlab.com/johanv/codeception-ci-demo/blob/master/.gitlab-ci.yml#L25"&gt;.gitlab-ci.yaml&lt;/a&gt;. I create an artifact with the generated javascript, which is used in the test stage. &lt;a href="https://gitlab.com/johanv/codeception-ci-demo/pipelines/68644877"&gt;That seems to work&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;As I said before, I am new to vue, and it's the first time I use yarn and webpack. So maybe I am making some obvious mistakes. Please let me know if there are things that can be done in a better way.&lt;/p&gt;&lt;/div&gt;</description><category>ci</category><category>docker</category><category>frontend</category><category>tests</category><category>yarn</category><guid>https://blog.johanv.org/posts/gitlab-ci-and-yarn/</guid><pubDate>Sat, 29 Jun 2019 19:02:12 GMT</pubDate></item></channel></rss>