<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Wai Yan</title>
    <description>The latest articles on DEV Community by Wai Yan (@wybm2001).</description>
    <link>https://dev.to/wybm2001</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4232482%2F6b6dc654-f13a-47ae-9ee1-bc89e18db7b3.png</url>
      <title>DEV Community: Wai Yan</title>
      <link>https://dev.to/wybm2001</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wybm2001"/>
    <language>en</language>
    <item>
      <title>Migrating a Custom Jenkinsfile to GitHub Actions Using OpenRewrite</title>
      <dc:creator>Wai Yan</dc:creator>
      <pubDate>Sat, 07 Nov 2026 16:54:32 +0000</pubDate>
      <link>https://dev.to/wybm2001/migrating-a-custom-jenkinsfile-to-github-actions-using-openrewrite-1a6b</link>
      <guid>https://dev.to/wybm2001/migrating-a-custom-jenkinsfile-to-github-actions-using-openrewrite-1a6b</guid>
      <description>&lt;p&gt;If you are thinking about migrating from a Jenkinsfile to GitHub Actions YAML at work, of course there is a GitHub Actions Importer tool and there are documents and courses available for the migration process from Jenkinsfile to GitHub Actions YAML.&lt;/p&gt;

&lt;p&gt;But what if the Jenkinsfile written in your company is fully customised? In that case, the importer cannot do this as an automated function. So that’s where OpenRewrite comes in.&lt;/p&gt;

&lt;p&gt;What is OpenRewrite?&lt;br&gt;
OpenRewrite is a Java refactoring framework where you write the changes you want to do in your codebase, or the migration process, programmatically by writing code. In OpenRewrite terms this is called a Recipe. Recipes are written in Java, or now currently there is also a JavaScript capability to write a recipe. You define what you want to do programmatically in code, define it in a rewrite.yml file, then run the recipes to make the changes you want.&lt;/p&gt;

&lt;p&gt;Why ScanningRecipe?&lt;br&gt;
To migrate from a fully customised Jenkinsfile to GitHub Actions YAML, what we need is something that will produce another file format — and that's where ScanningRecipe comes in.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.openrewrite.org/concepts-and-explanations/recipes#scanning-recipes" rel="noopener noreferrer"&gt;https://docs.openrewrite.org/concepts-and-explanations/recipes#scanning-recipes&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Write on Medium&lt;br&gt;
What it does: you write a recipe using OpenRewrite, store extracted values in an accumulator, and the recipe uses that accumulated data to generate the GitHub Actions YAML output.&lt;/p&gt;

&lt;p&gt;The flow looks like this:&lt;/p&gt;

&lt;p&gt;Scanner reads the Jenkinsfile LST and extracts key-value pairs from the Jenkinsfile&lt;br&gt;
Accumulator stores the extracted values grouped by type — env variables, step conditions, and step behaviours&lt;br&gt;
Generate takes the accumulated data and produces .github/workflows/.yml&lt;br&gt;
More Details&lt;br&gt;
For more details on what is happening under the hood, clone the source code and try reading the code:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/openrewrite/rewrite" rel="noopener noreferrer"&gt;https://github.com/openrewrite/rewrite&lt;/a&gt;&lt;/p&gt;

</description>
      <category>automation</category>
      <category>cicd</category>
      <category>devops</category>
      <category>github</category>
    </item>
  </channel>
</rss>
