<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Robin Shen on Medium]]></title>
        <description><![CDATA[Stories by Robin Shen on Medium]]></description>
        <link>https://medium.com/@robinshen?source=rss-d635cd326e40------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*fRdGt6z9bv2uRqcELoCGFQ.jpeg</url>
            <title>Stories by Robin Shen on Medium</title>
            <link>https://medium.com/@robinshen?source=rss-d635cd326e40------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 07:54:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@robinshen/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[When an Ordinary Workflow Needs a Hack, Ask AI to Step Back]]></title>
            <link>https://robinshen.medium.com/when-an-ordinary-workflow-needs-a-hack-ask-ai-to-step-back-bc98cfa2eeb7?source=rss-d635cd326e40------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc98cfa2eeb7</guid>
            <category><![CDATA[vibe-coding]]></category>
            <dc:creator><![CDATA[Robin Shen]]></dc:creator>
            <pubDate>Tue, 14 Jul 2026 02:06:07 GMT</pubDate>
            <atom:updated>2026-07-14T02:06:07.402Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jfngyei-kElL1vaZ.jpg" /></figure><p>Coding agents are remarkably good at finding the next plausible fix. If a cookie is not removed, they adjust the cookie handling. If two browsers behave differently, they investigate browser behavior. If a result depends on timing, they add a delay.</p><p>Every step can be reasonable. The danger is that a long chain of reasonable patches can lead to a solution that works without ever addressing the real problem.</p><p>We ran into exactly this while migrating <a href="https://onedev.io/">onedev.io</a> from an older web framework to Next.js. Signing out — one of the most ordinary actions on any website — worked only occasionally. After several rounds of debugging, a short delay made it reliable.</p><p>The delay solved the symptom. It also revealed that we were asking the wrong question.</p><h3>A Routine Feature Became Mysteriously Unreliable</h3><p>I should first explain my role in this story: I am completely unfamiliar with React and Next.js. I relied entirely on a coding agent to migrate the website and investigate the problem.</p><p>I could describe what I saw, test changes, and decide whether a result felt acceptable. I could not tell the agent which framework feature to use or which part of the architecture to inspect. That is, after all, why I delegated the work.</p><p>The visible problem was simple. Clicking <strong>Sign Out</strong> returned me to the home page, but I could sometimes still open pages reserved for signed-in users — even after a hard refresh.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qHFKJJhYwXllfKCk.png" /></figure><p>The behavior was inconsistent:</p><ul><li>It sometimes worked in Safari but not Chrome.</li><li>Clearing all cookies helped only temporarily.</li><li>Opening browser developer tools made it more likely to work.</li><li>Some fixes improved the success rate without making it reliable.</li></ul><p>These clues made the browser look suspicious. But the browser was only where the problem became visible.</p><h3>Reasonable Debugging Slowly Turned Into Patchwork</h3><p>The website sits behind several layers: the browser connects through Cloudflare, Cloudflare connects to nginx, and nginx forwards the request to the application. It was natural to suspect that one of those layers was confusing secure and non-secure cookies.</p><p>We checked the public URL, forwarded connection information, cookie names, Cloudflare features, and old browser data. We also tried making the sign-out code more explicit:</p><ul><li>Delete every possible form of the session cookie.</li><li>Create a dedicated sign-out endpoint.</li><li>Exclude that endpoint from global authentication handling.</li><li>Change click handling in case navigation started too early.</li><li>Wait for the server response before returning to the home page.</li></ul><p>Each attempt was based on a real observation. None was foolish. But the growing list was itself an important observation: a routine operation was accumulating special handling.</p><p>Eventually, this worked reliably:</p><pre>&lt;p&gt;Signing out…&lt;/p&gt;<br>&lt;script&gt;<br>  setTimeout(() =&gt; location.replace(&quot;/&quot;), 250);<br>&lt;/script&gt;</pre><p>The application showed a brief “Signing out…” page, waited 250 milliseconds, and then went home.</p><p>Problem solved?</p><p>Technically, yes. The website behaved correctly. But a normal sign-out should not depend on an arbitrary pause. Why 250 milliseconds? Would 100 be enough? Would it still work on a slower connection? Why should opening developer tools change anything?</p><p>The delay was not a satisfying answer. It was evidence that two things were happening in the wrong order.</p><h3>The Most Useful Prompt Was Not Technical</h3><p>At this point, I did not give the agent a detailed React or Next.js diagnosis. I could not have done so. I simply challenged the result:</p><blockquote><em>This is a very common workflow. It should not require a timing hack. Please revisit the relevant code, check whether the implementation follows common conventions and best practices, find the root cause, and remove the workaround.</em></blockquote><p>That prompt changed the direction of the investigation.</p><p>Until then, the work had focused on making the failing sign-out action more robust. Now the agent stepped back and reviewed the whole authentication workflow: where a session was created, where it was checked, where it could be refreshed, and where it was removed.</p><p>This is an important distinction in vibe coding. You do not need to know the names of all the framework components. You need to recognize when the shape of a solution feels wrong and ask the agent to widen its view.</p><h3>The Real Problem Was Outside the Sign-Out Code</h3><p>The website had been migrated from an older stack. My main instruction during that migration was to preserve existing behavior while changing the framework. That was a sensible requirement, but it encouraged the new implementation to carry forward some old, request-wide behavior.</p><p>In the migrated site, nearly every page request passed through a global authentication wrapper. In simplified form, it looked like this:</p><pre>export default auth((request) =&gt; {<br>  // Prepare information used by the migrated website.<br>  // Authentication also runs for nearly every request.<br>  return NextResponse.next();<br>});</pre><p>The wrapper was convenient because it made authentication information available everywhere. But the application already checked access again around the pages that actually required a signed-in user.</p><p>In plain language, two parts of the application had taken responsibility for the same thing.</p><p>That duplication caused a race:</p><ol><li>The sign-out request told the browser to remove the session.</li><li>A nearby page request passed through the global wrapper and refreshed that same session.</li><li>Whichever response the browser processed last decided whether the user appeared signed in or signed out.</li></ol><p>This explained all the strange behavior. Different browsers, developer tools, and the 250-millisecond delay changed the timing. They changed which response won, but they did not create the underlying problem.</p><h3>The Structural Fix Made the Workaround Disappear</h3><p>The fix was to give each part of the application one clear job.</p><p>The global request handler kept only the small piece of migrated page information it genuinely needed to provide:</p><pre>export default function proxy(request: NextRequest) {<br>  const headers = new Headers(request.headers);<br>  headers.set(&quot;x-pathname&quot;, request.nextUrl.pathname);</pre><pre>  return NextResponse.next({<br>    request: { headers },<br>  });<br>}</pre><p>Pages that require a signed-in user continued to protect themselves. The authentication library returned to handling sign-out through its normal built-in function:</p><pre>export async function logout() {<br>  await signOut({ redirectTo: &quot;/&quot; });<br>}</pre><p>Then we removed the custom endpoint, manual cookie deletion, special click handling, and 250-millisecond delay.</p><p>Sign-out worked reliably in both Chrome and Safari.</p><p>The final code was not only more correct; it was much simpler than the patched version. That is often a strong sign that the investigation has reached the real cause.</p><h3>What This Teaches Us About Vibe Coding</h3><p>Vibe coding does not mean accepting whatever code happens to work. Nor does it require the user to become an expert in every framework the agent touches.</p><p>The user brings something different but equally important: judgment about the expected shape of the result.</p><p>You may not know how session cookies work, but you know that signing out is routine. You may not know the framework’s routing system, but you know that opening developer tools should not fix production behavior. You may not know which module owns a task, but you can see when a simple feature has collected delays, retries, duplicated logic, and browser-specific branches.</p><p>Those are moments to stop asking for another local fix.</p><p>A useful, technology-neutral prompt is:</p><pre>This is a common workflow, but the solution feels like a hack.<br>Please step back and review the whole workflow. Check the relevant code<br>against the framework&#39;s common conventions and best practices, find the<br>root cause, simplify the design, and remove the workaround.</pre><p>Notice what this prompt does not contain. It does not list framework APIs. It does not guess at the root cause. It does not tell the agent how to implement the fix. The user identifies the mismatch between an ordinary requirement and an extraordinary solution; the agent supplies the technical investigation.</p><h3>Use Patches as Evidence, Not Architecture</h3><p>The 250-millisecond delay was not wasted work. It proved that timing mattered and helped narrow the investigation. Temporary patches are often useful experiments.</p><p>The mistake would have been leaving that experiment in place and calling the task finished.</p><p>When a workaround makes a bug disappear, ask what the workaround changed. A delay changes ordering. A retry may hide unreliable state. Manual cleanup may compensate for two components owning the same responsibility. A browser-specific branch may hide a problem that belongs on the server.</p><p>The workaround often contains a clue about the root cause. Treat it as evidence, then remove it after the design is corrected.</p><h3>Make the Simple Path Simple Again</h3><p>The most valuable contribution I made to this debugging session was not technical. I did not recognize the global authentication wrapper as the problem, and I did not propose the final architecture. I simply refused to believe that a routine workflow should need an arbitrary delay.</p><p>That was enough to redirect the coding agent from patching the symptom to reviewing the system.</p><p>So when vibe coding produces a solution that works but feels unnatural, do not assume that your lack of framework knowledge means you must accept it. Ask the agent to step back. Ask whether the implementation follows the framework’s normal path. Ask it to find duplicated responsibility, remove accidental complexity, and make the common case simple again.</p><p>This lesson came from <a href="https://onedev.io/">onedev.io</a>, where coding agents are becoming part of our issue, pull request, workspace, and CI/CD workflows. The principle applies far beyond authentication: working code is an important milestone, but when an ordinary feature needs an extraordinary workaround, it should not be the finish line.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc98cfa2eeb7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing AI Teammates in OneDev]]></title>
            <link>https://robinshen.medium.com/onedev-the-ai-autonomous-development-platform-f15d0cad8d66?source=rss-d635cd326e40------2</link>
            <guid isPermaLink="false">https://medium.com/p/f15d0cad8d66</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Robin Shen]]></dc:creator>
            <pubDate>Mon, 06 Jul 2026 06:52:03 GMT</pubDate>
            <atom:updated>2026-07-09T03:14:19.258Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WBudzLav_uQ6vmhVwr7Mkw.jpeg" /></figure><p>AI coding becomes much more useful when it is not a side chat. OneDev puts AI users inside the same development system your team already uses for requirements, implementation, review, and delivery.</p><p>In OneDev, an AI user is a virtual teammate working from issues, pull requests, builds, code, and workspaces. It can implement assigned issues, open pull requests, respond to review feedback, review other changes, and follow up when CI/CD fails.</p><p>The platform difference is where the work starts and where it remains visible. Requirements stay in issues. Execution happens in controlled workspaces. Review happens in pull requests. Validation stays in CI/CD. The AI user participates in that loop instead of replacing it with an external prompt-and-response conversation.</p><h3>Issues as the Source of Truth</h3><p>Autonomous development needs a durable work specification. In OneDev, that specification is the issue, or ticket.</p><p>An issue captures the feature request, bug report, acceptance criteria, screenshots, design files, documents, and follow-up discussion. The conversation that clarifies the requirement happens where the team can see it, not in a private prompt window. When the requirement changes, the issue changes. When someone needs to understand why the work was done, the issue is the record.</p><p>This makes the issue the natural handoff point for an AI user. Instead of writing a fresh instruction from memory, assign the issue or mention the AI user in the issue discussion:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8f-DKBKkJAgW5XNR" /></figure><p>The AI user reads the issue as its primary work specification. Attached screenshots and documents become part of the context. Comments explain edge cases, trade-offs, and decisions. The same issue later guides review, so implementation and acceptance are judged against one shared source of truth.</p><h3>From Requirement to Running Environment</h3><p>After the issue is assigned, the AI user can create a workspace, inspect the repository, create an issue branch, make changes, and open a pull request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3d3xvALOx8R2viIY" /></figure><p>This is where OneDev infrastructure matters. The workspace can be created from a spec prepared by the project or organization, with the right container, tools, repository checkout, authentication data, and automation settings. The AI user starts from a known working environment instead of asking every requester to describe setup steps. It is also safer because work runs in an isolated workspace with controlled permissions and entitlement rules.</p><p>The pull request keeps the work in the normal development trail: branch, commits, linked issue, review comments, CI/CD checks, and merge decision. A human reviewer does not need to reconstruct what the AI was asked to do. The issue is still there, attached to the change, carrying the original request and the discussion that refined it.</p><h3>Autonomous Does Not Mean Ad Hoc</h3><p>OneDev can route AI work by rule, so autonomy does not have to start with a manual mention. Issue field settings can assign matching issues to an AI user, allowing certain product areas, issue types, or priorities to go directly to the agent best suited for them.</p><p>The same idea applies to pull requests. Branch protection rules can require selected AI users to review certain changes. Project pull request settings can assign pull requests to AI users, letting them run a final review and merge automatically when all required reviews and CI/CD checks are satisfied.</p><p>This turns AI participation into project policy. Teams define where each AI user is allowed and expected to help, and OneDev applies those rules consistently.</p><h3>Pull Requests Become the Engineering Loop</h3><p>Review should judge the implementation against the requirement, and OneDev keeps that guidance close. When an AI user submits a pull request from an issue, the linked issue remains the reference for human reviewers and AI reviewers.</p><p>Add an AI user as a reviewer to get another review pass. It can inspect the change, compare it with the issue context, leave line-anchored comments, post a review summary, approve, or request changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2XeCIcieZFLd5qRg" /></figure><p>If changes are requested, or if CI/CD fails, the pull request becomes the engineering loop. The AI user continues from review comments and build results, improves the pull request with follow-up commits, resolves addressed comments, and lets the checks run again. The loop stops only when the implementation satisfies the issue, reviewers are satisfied, and required CI/CD checks pass.</p><p>This is important for accountability. The AI user is not only using the issue to start work; the team also uses the issue to decide whether the result is correct.</p><h3>The Platform Shape</h3><p>The practical shape of autonomous development in OneDev is:</p><p><strong>Define the requirement: </strong>Capture it in an issue with text, attachments, and discussion<br><strong>Route the work: </strong>Assign issues and pull request responsibilities manually or by rule<br><strong>Execute the work: </strong>Run the AI user in a preconfigured, isolated workspace<br><strong>Review the result: </strong>Review the pull request against the linked issue<br><strong>Iterate safely:</strong> Improve the pull request until review and CI/CD conditions are satisfied</p><p>OneDev already combines Git hosting, issues, pull requests, CI/CD, packages, code search, and workspaces. AI users build on that foundation. They are not a separate assistant bolted onto the side; they are users participating in the same project objects your team already trusts.</p><p>That is what makes OneDev an AI autonomous development platform: the requirement, execution environment, code change, review process, and delivery checks are all connected.</p><p>To start using them, read <a href="https://docs.onedev.io/tutorials/ai/working-with-ai-user">Working with AI User</a>. For the issue and pull request workflow specifically, continue with <a href="https://docs.onedev.io/tutorials/ai/working-with-ai-user/collab-with-ai-user">Collaborate with AI User in Issue/PR Context</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f15d0cad8d66" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing OneDev AI]]></title>
            <link>https://faun.pub/introducing-onedev-ai-5da89743c88e?source=rss-d635cd326e40------2</link>
            <guid isPermaLink="false">https://medium.com/p/5da89743c88e</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Robin Shen]]></dc:creator>
            <pubDate>Thu, 08 Jan 2026 06:09:32 GMT</pubDate>
            <atom:updated>2026-01-25T21:11:10.371Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*rkIZTCdNRztWWR0BlToHsQ.png" /></figure><p><a href="https://onedev.io/">OneDev</a> 14 ships with AI capabilities to make your DevOps experience smoother and smarter. This tutorial explains how to set up OneDev AI and where you can benefit from the AI integration.</p><h3>Lite Model Set Up</h3><p>Some capabilities require you to set up a lite AI model for performance reason:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Zm6qniRV3W7OY69P.png" /></figure><p>With this setup, OneDev will be able to:</p><h4>Query with Natural Language</h4><p>Describe what you want with natural language and press Tab, OneDev will call AI to convert it to a structured query:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*koWphEtKsBI5FqZX.gif" /></figure><h4>Perform Accurate Symbol Navigation</h4><p>A symbol name may have multiple definitions. With the help of AI, the most likely one will be marked for easier navigation, both in source view and diff view:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VSWwJ9Ca2B_Z2J_K.gif" /></figure><h4>Suggest Pull Request Title and Description</h4><p>If multiple commits are involved when opening a pull request, OneDev will use AI to generate appropriate pull request title and description from commit messages:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sfBS2Qb0bFQZADHR.gif" /></figure><h3>Set Up AI Users</h3><p>You may also add AI users to the system, and these virtual users will help you throughout the DevOps process. To add an AI user, select type <em>AI</em> when creating a new user:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kaIy_Xz_ob96MXjJ.png" /></figure><p>For most cases, Claude Haiku model is suggested as it is cost effective, fast, but still powerful on tool use and code understanding. Go with Claude Sonnet or even Opus if you have a good budget.</p><p>Then decide who can access these virtual AI users via entitlement setting, and optionally specify a system prompt when interacting with it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XpAe0_IFzH0meWcO.png" /></figure><p>The AI user helps via two approaches:</p><h4>As a Context Aware Assistant</h4><p>You may bring out entitled AI users anytime to chat with them:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*urLUls0Ki4Om8e3O.png" /></figure><p>These virtual users are equipped with tools provided by OneDev based on current context to help you do various tasks. <strong>NOTE:</strong> AI user calls tools in this case with the identity of the current user, ignoring permissions assigned to itself</p><p><strong>Codebase Understanding</strong></p><p>While browsing files, you may ask AI any questions about the codebase.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lc0yO30FvTuakz4f.png" /></figure><blockquote><strong>tip</strong></blockquote><blockquote>Occasionally you might find OneDev indexing the codebase. In this case, wait for indexing to complete before asking codebase questions, as AI relies on the index to search codebase. This also applies to commit and pull request interactions below.</blockquote><p><strong>Commit Review</strong></p><p>You may also switch to any commit, and ask AI to review the commit:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KDL0YtM6SXgppnv7.png" /></figure><blockquote><strong>tip</strong></blockquote><blockquote>The review often has false positives, but can also find real bugs. Actually, it managed to find a critical security vulnerability in OneDev.</blockquote><p><strong>Code Snippet Understanding</strong></p><p>You may select a code snippet either in source view or diff view and have the AI explaining it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ugk5FcByN-IYgzFH.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EqItBItAbGhb_Vwh.png" /></figure><p><strong>Help Editing CI/CD Spec</strong></p><p>You can ask the AI user to edit the CI/CD spec while you work on it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3GABpBInOE1EqD23.png" /></figure><p><strong>Investigate Build Failure</strong></p><p>For a failed build, you may ask the AI user to investigate why it failed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7s3lXBLKB7V1Yujr.png" /></figure><p>In this example, it finds the issue that the order of the generate checksum step and set up cache is incorrect. We can go back to edit the CI/CD spec, and tell AI to fix it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*woJh-2fMl3hdKOOY.png" /></figure><blockquote><strong>tip</strong></blockquote><blockquote>When the chat dialog is closed and opened again, it will start with a new chat. Select from chat history if you want to continue with the previous chat.</blockquote><p><strong>Issue and Pull Request Comments Summary</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XzeTpw5FFbuif3bk.png" /></figure><p><strong>Ask Questions for Pull Request Changes</strong></p><p>On the pull request page, AI user can help you understand the whole changes of the pull request, or a subset of changes, for instance changes since your last review:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*J3Cif-vFyUO9kVOn.png" /></figure><h4>As a Collaborating User</h4><p>AI user can also work as a normal user to take part in issue and pull request discussions, or be assigned to review pull requests. In this case, it calls tools with its own identity and will be restricted by its own permissions.</p><p><strong>Take Part in Issue and Pull Request Discussions</strong></p><p>While discussing in issues or pull requests, you may mention an entitled AI user to let it perform tasks, and post task results as comments:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AmYv-y1OxBDAjAcx.png" /></figure><p>To ask follow-up questions, just add new comments mentioning it again</p><p><strong>Add AI User as Pull Request Reviewer</strong></p><p>You may also add AI user as reviewer of the pull request, or even include it in branch protection rules. In this case, the AI user will approve the pull request or request for changes based on its review result. Again you can mention it in comments to ask questions about the review, or even persuade it to change its mind (approve vs request for changes).</p><blockquote><strong>important</strong></blockquote><blockquote>To add AI user as reviewer, please make sure that:<br>1. The project is entitled to use the AI user<br>2. The AI user has code read permission against the project</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*fAgnozed-YG_aRAJ.png" /></figure><h4>👋 If you find this helpful, please click the clap 👏 button below a few times to show your support for the author 👇</h4><h4>🚀<a href="http://from.faun.to/r/8zxxd">Join FAUN.dev() &amp; get similar stories in your inbox each week for free!</a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5da89743c88e" width="1" height="1" alt=""><hr><p><a href="https://faun.pub/introducing-onedev-ai-5da89743c88e">Introducing OneDev AI</a> was originally published in <a href="https://faun.pub/">FAUN.dev() 🐾</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Update Dependencies via Renovate in OneDev]]></title>
            <link>https://robinshen.medium.com/update-dependencies-via-renovate-in-onedev-50aab11b6a91?source=rss-d635cd326e40------2</link>
            <guid isPermaLink="false">https://medium.com/p/50aab11b6a91</guid>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Robin Shen]]></dc:creator>
            <pubDate>Sun, 01 Dec 2024 12:24:36 GMT</pubDate>
            <atom:updated>2024-12-07T01:29:54.913Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*ZaK_9V4lMtOL-oew5VFjwQ.png" /></figure><p>Since 11.6.0, <a href="https://onedev.io/">OneDev</a> added the ability to update project dependencies via <a href="https://github.com/renovatebot/renovate">Renovate</a>. Let’s go through procedures to set it up.</p><h3>Request a Trial Subscription</h3><p>Renovate integration requires a subscription to use. Switch to menu item Administration / Subscription Management, request a trial subscription key and install it into OneDev if you do not have a subscription yet:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7-UX8zCP-L8ZO4WZ.png" /></figure><h3>Set Up Renovate Bot Account<a href="https://docs.onedev.io/tutorials/cicd/dependency-update#set-up-renovate-bot-account">​</a></h3><ol><li>We need to set up an account to be used by Renovate to create commits, issues and pull requests:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hFuMIR1LU4DIetJh.png" /></figure><p>2. This account needs to be authorized with code write permission for all projects you want to update dependencies</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*u2FYikY3wvCkPWsZ.png" /></figure><p>3. Generate an access token to be used later in build spec</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*J9rjcLG15_mfmYpt.png" /></figure><h3>Configure Server URL<a href="https://docs.onedev.io/tutorials/cicd/dependency-update#configure-server-url">​</a></h3><p>Make sure server url is configured correctly and can be reached from within docker container, as renovate cli needs to access this url from container.</p><h3>Run Renovate via CI/CD Step<a href="https://docs.onedev.io/tutorials/cicd/dependency-update#run-renovate-via-cicd-step">​</a></h3><p>Set up build spec to update dependencies of specified projects via Renovate step. We created a <a href="https://code.onedev.io/tutorials/update-dependencies/~files/main/.onedev-buildspec.yml?position=buildspec-jobs">demo project</a> explaining this:</p><ol><li>The <a href="https://code.onedev.io/tutorials/update-dependencies/~files/main/.onedev-buildspec.yml?position=buildspec-jobs/ci">ci</a> job is set up to test the project. It has a trigger defined in section <em>params &amp; triggers</em> to run the job automatically when pull request is opened or updated</li><li>The <a href="https://code.onedev.io/tutorials/update-dependencies/~files/main/.onedev-buildspec.yml?position=buildspec-jobs/update+dependencies">update dependencies</a> job is set up to run Renovate to update dependencies. In this job, step <em>set up cache</em> configures cache of the renovate step to speed up Renovate execution. Step <em>run renovate</em> is configured to update dependencies of current project. In this step, property <em>access token secret</em> is specified as a <a href="https://docs.onedev.io/tutorials/cicd/job-secrets">job secret</a> with value set to Renovate access token created previously; specify default field values various issues created by Renovate; in <em>more settings</em> section, property <em>github access token secret</em> is specified as a <a href="https://docs.onedev.io/tutorials/cicd/job-secrets">job secret</a> with value set to any GitHub access token, so that release notes of new dependency versions (if source hosted on GitHub) can be retrieved into pull request body for review. This job also has a cron trigger defined to run at 1:00AM every night</li></ol><p>Now run <em>update dependencies</em> job. Renovate will create on-board pull request in each specified project. Merge the on-board pull request and subsequent triggering of the <em>update dependencies</em> job will create pull requests to update dependencies.</p><h3>Enable Renovate Auto Merge<a href="https://docs.onedev.io/tutorials/cicd/dependency-update#enable-renovate-auto-merge">​</a></h3><p>It is recommended to enable auto merge for minor dependendies to reduce overheads of merging pull requests manually. To do it, update <em>renovate.json</em> (created via on-board pull request) of desired projects as below:</p><pre>{<br>  &quot;$schema&quot;: &quot;https://docs.renovatebot.com/renovate-schema.json&quot;,<br>  &quot;extends&quot;: [<br>    &quot;config:recommended&quot;<br>  ],<br>  &quot;packageRules&quot;: [<br>    {<br>      &quot;matchUpdateTypes&quot;: [&quot;minor&quot;, &quot;patch&quot;, &quot;pin&quot;, &quot;digest&quot;],<br>      &quot;automerge&quot;: true<br>    }<br>  ]  <br>}</pre><p>If you need to add this settings to multiple projects, it is suggested to use <a href="https://docs.renovatebot.com/config-presets/">shareable presets</a> to avoid duplication.</p><p>We should also add a branch protection rule so that pull requests can only be merged when desired tests pass:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*O1zEZBl50ViI4RF7.png" /></figure><p>Explore the <a href="https://docs.renovatebot.com/configuration-options/">Renovate configuration</a> to discover all the possibilities it offers. Thank you for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50aab11b6a91" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Golang Support in OneDev]]></title>
            <link>https://faun.pub/golang-support-in-onedev-4270f968ca8b?source=rss-d635cd326e40------2</link>
            <guid isPermaLink="false">https://medium.com/p/4270f968ca8b</guid>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[golang]]></category>
            <dc:creator><![CDATA[Robin Shen]]></dc:creator>
            <pubDate>Mon, 14 Oct 2024 03:27:48 GMT</pubDate>
            <atom:updated>2024-10-14T07:05:40.813Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*86n7r2IynClsXXP117upzw.png" /></figure><p><a href="https://github.com/theonedev/onedev">OneDev</a> is an open source git server with built-in CI/CD, package registry, and Kanban board. It is able to analyze Golang code and CI/CD reports to make important information readily available to aid code navigation, comprehensation and review.</p><p>For Golang projects, it is able to:</p><ol><li>Analyze code for symbol navigation and search</li><li>Display/search outline while view source code</li><li>Suggest CI/CD job templates</li><li>Show unit test, coverage and lint report, as well as statistics over time</li><li>Annotate source code with coverage and lint information</li></ol><p>Let’s see how to get all of these with a real-world Golang project <a href="https://github.com/grpc/grpc-go">grpc-go</a>.</p><h3>Prepare the Environment</h3><p>Firstable, run OneDev with below command:</p><pre>docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v ./onedev:/opt/onedev -p 6610:6610 -p 6611:6611 1dev/server</pre><p>Follow on screen instructions to set up the server, then select import from url like below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YeKt40ksxPouAnNrt5Lmlg.png" /></figure><p>Specify import url as <a href="https://github.com/grpc/grpc-go"><em>https://github.com/grpc/grpc-go</em></a> on next screen, and click import. Two projects will be created after a while like below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0AIEvAMb_GUiMpoq5v5w8w.png" /></figure><p>Here project <em>grpc</em> corresponds to organization <em>grpc</em>, and its child project <em>grpc/grpc-go</em> contains imported repository. The hierarchical structure makes project management and setting inheritance a lot easier.</p><h3>Code Analysis and Indexing</h3><p>Now open project <em>grpc/grpc-go</em> to get into the repository page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w9SR_uhm9uB9xO13gKHP9w.png" /></figure><p>For just imported repository, a <em>indexing in progress</em> message will be shown to indicate that the source code is currently being analyzed and indexed. After that we can press ‘<strong>T</strong>’ to search symbols. For instance, type <em>security</em> to list all related definitions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cy_Eah7T1YAUxxb2KWAofA.png" /></figure><p>If we select the first entry, the file defining <em>Security</em> struct will be shown:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ddvVBb2GywpcCclsGySQEw.png" /></figure><p>Symbols can be highlighted and navigated in source view page. It also shows the code outline, which can be searched by pressing ‘<strong>O’</strong>.</p><h3>CI/CD Support and Report Analysis</h3><p>Now let’s add CI/CD jobs for this project. To do it, go back to repository root and click the link <em>adding .onedev-buildspec.yml </em>like below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aYZZ4letUsouqIK4LP2Ybg.png" /></figure><p>OneDev shows a GUI for CI/CD job setup, and the result will be saved into file <em>.onedev-buildspec.yml</em> in root of the repository. You may add job manually at this point, but OneDev will analyze your repository files and provide appropriate templates for you to start with:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Uk49EUm5wWS7wD7gt68Bhg.png" /></figure><p>For golang projects, the template is created by inspecting file <em>go.mod.</em> Let’s use provided template and head on to job detail page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SCII_LC2W8hgiKy5TYo1Ig.png" /></figure><p>You may edit steps and other settings as necessary here. For this project, we just save and commit without any change. The job will run automatically as it defines a trigger to fire upon commit:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z7fSHnDnI4vP4ErFFlUAsw.png" /></figure><p>Switch to running build of the job, wait a while, and it should be successful, with unit test and coverage report being published:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vWuLSPSLk66_yZWI3D6csg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7It2H6AP8W9ggtbrMNwD8w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*62NqsKlJR57YZQiupX0WZg.png" /></figure><p>Now let’s edit the build spec to enable lint check step which is disabled by default:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FE6gx057Ve-DLVu4JktDbA.gif" /></figure><p>Wait a while for the build to finish. This time no go modules will be downloaded as they were cached after successful run of previous build. Build will also be failed due to lint rule violations of high severity:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HXRT5zKfMIxBgG-WnMpqvw.png" /></figure><p>We can click the line numbers to drill down violations in source view:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TTf32M1gEt71ZQWc3spJLQ.png" /></figure><p>Besides violations, source view is also marked with code coverage info. When review code via pull request, these information will also be available in diff view if applicable.</p><h3>Final Note</h3><p>Besides Golang, OneDev also supports Python, Java, JavaScript, C/C++, C# and Rust. Support for more languages will be added in future versions. For details, please check <a href="https://github.com/theonedev/onedev">https://github.com/theonedev/onedev</a></p><p>Thanks for reading.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*Yjwh7IqqmzBcG1CF.png" /></figure><h4>👋 If you find this helpful, please click the clap 👏 button below a few times to show your support for the author 👇</h4><h4>🚀<a href="http://from.faun.to/r/8zxxd">Join FAUN Developer Community &amp; Get Similar Stories in your Inbox Each Week</a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4270f968ca8b" width="1" height="1" alt=""><hr><p><a href="https://faun.pub/golang-support-in-onedev-4270f968ca8b">Golang Support in OneDev</a> was originally published in <a href="https://faun.pub/">FAUN.dev() 🐾</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OneDev — a Python Aware Git Server]]></title>
            <link>https://python.plainenglish.io/onedev-a-python-aware-git-server-520dc8eb1088?source=rss-d635cd326e40------2</link>
            <guid isPermaLink="false">https://medium.com/p/520dc8eb1088</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Robin Shen]]></dc:creator>
            <pubDate>Thu, 12 Sep 2024 12:03:14 GMT</pubDate>
            <atom:updated>2024-10-13T14:08:08.092Z</atom:updated>
            <content:encoded><![CDATA[<h3>OneDev — a Python-Aware Git Server</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/985/1*7pI8E7mh1izSC7XMwsNsqw.png" /></figure><p><a href="https://github.com/theonedev/onedev">OneDev</a> is a python aware self-hosted git server, with out of box CI/CD capability. It analyzes python code and CI/CD reports to make important information readily available to aid code navigation, comprehensation and review.</p><p>For python projects, it is able to:</p><ol><li>Analyze code for symbol navigation and search</li><li>Display/search outline while view source code</li><li>Suggest CI/CD job templates</li><li>Show unit test, coverage and lint report, as well as statistics over time</li><li>Annotate source code with coverage and lint information</li></ol><p>Let’s see how to get all of these with a real-world python project <a href="https://github.com/python-poetry/poetry">poetry</a>.</p><h3>Prepare the Environment</h3><p>Firstable, run OneDev with below command:</p><pre>docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v ./onedev:/opt/onedev -p 6610:6610 -p 6611:6611 1dev/server</pre><p>Follow on screen instructions to set up the server, then select import from url like below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yTfYwVkKy1rGEmlaL0WuzQ.png" /></figure><p>Specify import url as <a href="https://github.com/python-poetry/poetry"><em>https://github.com/python-poetry/poetry</em></a> on next screen, and click import. Two projects will be created after a while like below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4jI8XtCO8BKMWx92rCDClg.png" /></figure><p>Here project <em>python-poetry</em> corresponds to organization <em>_python-poetry_</em>, and its child project <em>python-poetry/poetry</em> contains imported repository. The hierarchical structure makes project management and setting inheritance a lot easier.</p><h3>Code Analysis and Indexing</h3><p>Now open project <em>python-poetry/poetry</em> to get into the repository page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HbCluZGAGfM8wJZX43yvcQ.png" /></figure><p>For just imported repository, a <em>indexing in progress</em> message will be shown to indicate that the source code is currently being analyzed and indexed. After that we can press ‘<strong>T</strong>’ to search symbols. For instance, type <em>application</em> to list all related definitions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TIHe-LfSM2GY9aEzGSbSYg.png" /></figure><p>If we select the first entry, python file defining <em>Application</em> class will be shown:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iGIGIwY10Ntpo2nOr-C6gA.png" /></figure><p>Symbols can be highlighted and navigated in source view page. It also shows the code outline, which can be searched by pressing ‘<strong>O’</strong>.</p><h3>CI/CD Support and Report Analysis</h3><p>Now let’s add CI/CD jobs for this project. To do it, go back to repository root and click the link <em>adding .onedev-buildspec.yml </em>like below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*77ToyOKy5wLjSUCXinLYBA.png" /></figure><p>OneDev shows a GUI for CI/CD job setup, and the result will be saved into file <em>.onedev-buildspec.yml</em> in root of the repository. You may add job manually at this point, but OneDev will analyze your repository files and provide appropriate templates for you to start with:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PiE_Hbdim7J_iM2iaQhgVw.png" /></figure><p>For python, the template is created by inspecting files such as <em>pyproject.toml</em>, <em>tox.ini</em>, <em>poetry.lock</em>, <em>setup.py</em>, <em>setup.cfg, or environment.yaml.</em> Let’s use provided template and head on to job detail page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gs209RTqROpl9icXC-sjdA.png" /></figure><p>You may edit steps and other settings as necessary here. For this project, we just save and commit without any change. The job will run automatically as it defines a trigger to fire upon commit:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*szxMA8ljFCwOCr4Hfs5tnw.png" /></figure><p>Switch to running build of the job, wait a while, and it should be successful like below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_AQa4V9ZlUMWuzfpdE17dA.png" /></figure><p>We can see from this page that the build version is detected from <em>pyproject.toml</em>, and also unit test and coverage report is published:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wtnAy71IqWsMbhluT81SVg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XJwuNN4hW8n1lnIKi2jy1w.png" /></figure><p>A ruff lint report can also be published by uncommenting the ruff check line in <em>test and lint</em> step of the job:</p><pre>…<br>#poetry run ruff check - exit-zero - output-format=json - output-file=ruff-result.json - exclude=.git</pre><p>Also edit file <em>pyproject.toml</em> to remove the line ignoring rule <em>N818</em> in section <em>tool.ruff.lint </em>to introduce some rule violations. Save and commit the file, and the new build will fail. A ruff report tab is now available showing all violations:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BgmeP2u2Kgfe_mU4KV-B7A.png" /></figure><p>We can click the line numbers to drill down violations in source view:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rpw_4rO48LJiHiF9_KHVCw.png" /></figure><p>Besides violations, the source is also marked with code coverage info. When review code via pull request, these information will also be available in diff view if applicable.</p><h3>Final Note</h3><p>Besides Python, OneDev also supports Java, JavaScript, C/C++, C# and Golang. Support for more languages will be added in future versions. For details, please check <a href="https://github.com/theonedev/onedev">https://github.com/theonedev/onedev</a></p><p>Thanks for reading.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*8PHCbNIj6XjtwpvM.png" /></figure><h4>👋 If you find this helpful, please click the clap 👏 button below a few times to show your support for the author 👇</h4><h4>🚀<a href="http://from.faun.to/r/8zxxd">Join FAUN Developer Community &amp; Get Similar Stories in your Inbox Each Week</a></h4><h3>In Plain English 🚀</h3><p><em>Thank you for being a part of the </em><a href="https://plainenglish.io/"><strong><em>In Plain English</em></strong></a><em> community! Before you go:</em></p><ul><li>Be sure to <strong>clap</strong> and <strong>follow</strong> the writer ️👏<strong>️️</strong></li><li>Follow us: <a href="https://twitter.com/inPlainEngHQ"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/inplainenglish/"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong>YouTube</strong></a> | <a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Discord</strong></a> | <a href="https://newsletter.plainenglish.io/"><strong>Newsletter</strong></a></li><li>Visit our other platforms: <a href="https://cofeed.app/"><strong>CoFeed</strong></a> | <a href="https://differ.blog/"><strong>Differ</strong></a></li><li>More content at <a href="https://plainenglish.io/"><strong>PlainEnglish.io</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=520dc8eb1088" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/onedev-a-python-aware-git-server-520dc8eb1088">OneDev — a Python Aware Git Server</a> was originally published in <a href="https://python.plainenglish.io/">Python in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Working with OneDev Boards and Iterations]]></title>
            <link>https://faun.pub/working-with-onedev-boards-and-iterations-57d8d36a96f2?source=rss-d635cd326e40------2</link>
            <guid isPermaLink="false">https://medium.com/p/57d8d36a96f2</guid>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Robin Shen]]></dc:creator>
            <pubDate>Fri, 05 Jul 2024 14:05:15 GMT</pubDate>
            <atom:updated>2024-07-11T05:45:48.314Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cxBKHIBQyjDKrguz" /><figcaption>Photo by <a href="https://unsplash.com/@edenconstantin0?utm_source=medium&amp;utm_medium=referral">Eden Constantino</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><a href="https://onedev.io/">OneDev</a> is a self-hosted open source devops platform. Iteration is a core concept in OneDev to support progressive and iterative working on issues. Together with issue board, it can easily achieve typical development methodologies such as Scrum and Kanban.</p><h3><strong>Create Issues</strong></h3><p>Issues can be created from board directly like below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2SZbkLK3lVYJj9RSBIaC9A.png" /></figure><p>When an iteration is selected, one can create issues directly in selected iteration, or click backlog button to show backlog column and create issues there to be planned later:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7RDnNUL0q_nf32KlAvJYnA.png" /></figure><h3><strong>Plan Iterations</strong></h3><p>One can select an existing iteration or create new iteration and drag backlog issues into it to plan the work:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E8Mq0PvHQTO6VqY6nhV5Kg.png" /></figure><p>Iterations can be closed to indicate finish of unit of work. For issues not finished yet, you may move them to next open iteration like below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WKZIET_tQ1J48LwoH571MA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fPy5WHETxKp5gVmCz9vF5w.png" /></figure><p>An issue can be associated with multiple iterations, so it is totally valid to keep unfinished issues in old iterations while set a new iteration for them. Actually this approach is recommended as iteration history is retained and burndown chart of old iterations will be accurate.</p><h3><strong>Work on Issues</strong></h3><p>Issues will be moved between different columns automatically when certain events happened, or can be dragged manually to applicable columns, depending on issue transition rules. When start to drag an issue, applicable columns will be highlighted:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q-uFAYxw6FBYJtiZFzTlYQ.png" /></figure><h3><strong>Multi-Level Iterations</strong></h3><p>By default, iteration menu displays all available iterations. The iteration prefix property in board setting allows to only show iterations whose name starts with a certain string. We can use this feature to achieve multi-level iterations: first plan issues into high level iterations, for instance, releases. Then for issues in upcoming release, plan them into sprints.</p><p>Let’s demonstrate this with an example. Assume we are working on 11.0 release, and we need to create a board planning sprints of this release. To do it:</p><p>1. Set the board base query as `”Iteration” is “11.0”`, and board backlog base query as <em>”Iteration” is “11.0” and “State” is “Todo”</em>. This tells the board to only show issues belonging to 11.0 release</p><p>2. Set the iteration prefix as <em>11.0/</em>. This tells the board to only show iterations with name starting with <em>11.0/</em>. This also requires that name of new iterations created via this board should start with <em>11.0/</em></p><p>With this setting, we can plan 11.0 issues into sprints in the board, for instance, <em>11.0/sprint1</em>, <em>11.0/sprint2</em>, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hoNhZ7zpUu-6HI0L6cJF-A.png" /></figure><h3><strong>Board Column Customization</strong></h3><p>We can customize board columns in board settings to show different aspects of issues, such as type, priority, assignee etc, and move issues between these columns to change the value. Further, you may customize issue states and fields and adjust board queries and columns to make important information explicit and organized</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AWwFQf7bcNR56WlrVZkzPQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*q0T6HSNBkR9tIqYAfuaNSA.png" /></figure><h4>👋 If you find this helpful, please click the clap 👏 button below a few times to show your support for the author 👇</h4><h4>🚀<a href="http://from.faun.to/r/8zxxd">Join FAUN Developer Community &amp; Get Similar Stories in your Inbox Each Week</a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=57d8d36a96f2" width="1" height="1" alt=""><hr><p><a href="https://faun.pub/working-with-onedev-boards-and-iterations-57d8d36a96f2">Working with OneDev Boards and Iterations</a> was originally published in <a href="https://faun.pub/">FAUN.dev() 🐾</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TOD — command line tool to run CI/CD jobs against local changes]]></title>
            <link>https://faun.pub/tod-command-line-tool-to-run-ci-cd-jobs-against-local-changes-162f342d80f7?source=rss-d635cd326e40------2</link>
            <guid isPermaLink="false">https://medium.com/p/162f342d80f7</guid>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <dc:creator><![CDATA[Robin Shen]]></dc:creator>
            <pubDate>Tue, 27 Feb 2024 07:16:10 GMT</pubDate>
            <atom:updated>2024-03-02T19:36:34.418Z</atom:updated>
            <content:encoded><![CDATA[<h3>TOD — command line tool to run CI/CD jobs against local changes</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VHVQoVw4Tx7f_22e" /><figcaption>Photo by <a href="https://unsplash.com/@6heinz3r?utm_source=medium&amp;utm_medium=referral">Gabriel Heinzer</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>TOD is a command line tool to test/debug <a href="https://github.com/theonedev/onedev">OneDev</a> CI/CD jobs against local changes to avoid the modify/commit/push/run/check cycles.</p><p>Under the hood, tod stashes local changes to a commit and pushes to server under a temporal ref to run specified job. Log of running job is streamed back to tod so that you can check job progress and status without leaving terminal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tbtQ2A26X2v44hk4kgplEg.gif" /></figure><p>Since job runs on server, it does not have many quirks and limitations of other tools (gitlab-runner exec or nektos/act for instance), such as requiring you to set up job environments, unable to handle job dependencies, etc. And you can still get fast feedback via shallow clone and cache.</p><p>For details, please check <a href="https://github.com/theonedev/tod">tod project</a></p><p>Thanks for reading</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*1Guv-KGbuNZ8J6WA.png" /></figure><h4>👋 If you find this helpful, please click the clap 👏 button below a few times to show your support for the author 👇</h4><h4>🚀<a href="http://from.faun.to/r/8zxxd">Join FAUN Developer Community &amp; Get Similar Stories in your Inbox Each Week</a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=162f342d80f7" width="1" height="1" alt=""><hr><p><a href="https://faun.pub/tod-command-line-tool-to-run-ci-cd-jobs-against-local-changes-162f342d80f7">TOD — command line tool to run CI/CD jobs against local changes</a> was originally published in <a href="https://faun.pub/">FAUN.dev() 🐾</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build Multi-Arch Docker Image with OneDev]]></title>
            <link>https://faun.pub/build-multi-arch-docker-image-with-onedev-3c7d0c9421d4?source=rss-d635cd326e40------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c7d0c9421d4</guid>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Robin Shen]]></dc:creator>
            <pubDate>Thu, 14 Dec 2023 11:48:56 GMT</pubDate>
            <atom:updated>2023-12-22T20:37:22.339Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gtNtlqjDcCzAjXiZ" /><figcaption>Photo by <a href="https://unsplash.com/@carrier_lost?utm_source=medium&amp;utm_medium=referral">Ian Taylor</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>This tutorial explains how to build and publish multi-arch docker image with <a href="https://onedev.io/">OneDev</a>.</p><p><strong>NOTE</strong>: This tutorial pushes image to built-in docker registry, which requires an <a href="https://onedev.io/pricing">active subscription</a>. You may push to any third party registries instead without subscription</p><h3>Build with QEMU</h3><p>The simplest approach is to build with QEMU on a single node. Firstable you will need to set up the machine running OneDev server or agent where you plan to build the image (or host machine if OneDev runs inside container):</p><ol><li>Install QEMU with below command:</li></ol><pre>docker run --privileged --rm tonistiigi/binfmt --install all</pre><p>2. Switch to OS user running OneDev, and run below command to create a docker container builder:</p><pre>docker buildx create --name onedev</pre><p><strong>NOTE</strong>: Follow <a href="https://docs.onedev.io/tutorials/cicd/insecure-docker-registry#configure-insecure-registry-for-buildx-builder">this instruction</a> to create builder if you need to access registry via http protocol or self-signed certificate</p><p>3. If OneDev runs inside container, the buildx config needs to be mounted into container like below so that the builder can be accessed inside container:</p><pre>-v /path/to/user-home/.docker/buildx:/root/.docker/buildx</pre><p>4. Now set up the project in OneDev to build image with above builder, and specify platforms option. This is demonstrated with the <a href="https://code.onedev.io/tutorials/multi-arch-docker-image/qemu">example project</a>:</p><p>4.1 Enable package management feature in general setting of the example project so that it can be used as image repository. This is not necessary if you push images to third party registry</p><p>4.2 The <a href="https://code.onedev.io/tutorials/multi-arch-docker-image/qemu/~files/main/Dockerfile">docker file</a> simply prints current platform into a file</p><p>4.3 Check step <em>build and push image</em> of the <a href="https://code.onedev.io/tutorials/multi-arch-docker-image/qemu/~files/main/.onedev-buildspec.yml?position=buildspec-jobs/ci">ci job</a>:</p><p>4.3.1 Property <em>Tags</em> uses variables to push to current server and project, tagged with current build number</p><p>4.3.2 Property <em>Built-in Registry Access Token Secret</em> specifies a secret with permission to publish packages to current project</p><p>4.3.3 Property <em>More Options</em> specified the builder to use and platforms to build</p><p>5. Run the job, and we can see that a <a href="https://code.onedev.io/tutorials/multi-arch-docker-image/qemu/~builds/2/packages/Container%20Image">multi-arch image</a> is published</p><h3>Build on Native Platform</h3><p>The QEMU approach is simple, but can be slow. Also it may not be able to handle complex builds relying heavily on platform specific features. In this case, you will need to resort to the native platform approach, which build separate image on each platform, and combine them into a single multi-arch image index with docker imagetools. We also created an <a href="https://code.onedev.io/tutorials/multi-arch-docker-image/native">example project</a> demonstrating this:</p><ol><li>Enable package management feature in general setting of the example project so that it can be used as image repository. This is not necessary if you push images to third party registry</li></ol><p>2. The <a href="https://code.onedev.io/tutorials/multi-arch-docker-image/native/~files/main/Dockerfile">docker file</a> simply prints current platform into a file</p><p>3. Job <a href="https://code.onedev.io/tutorials/multi-arch-docker-image/native/~files/main/.onedev-buildspec.yml?position=buildspec-jobs/build+arch+images">build arch images</a> builds platform specific image:</p><p>3. 1 It define a param <em>arch</em> including enum value <em>amd64</em> and <em>arm64</em></p><p>3. 2 Job executor is specified as @param:arch@ meaning to run with job executor named by the arch parameter. On this demo site, we simply define two server docker executors with name amd64 and arm64. For real world projects, you will need to run OneDev agents on amd64 and arm64 machines, and define amd64/arm64 executor as remote docker executor selecting amd64/arm64 agents respectively</p><p>3.3 Step <em>build arch image</em> builds image with option <em>— builder onedev — platform linux/@param:arch@ — metadata-file meta.json</em>:</p><p>3.4 Step <em>build arch image</em> builds image with option <em>— builder onedev — platform linux/@param:arch@ — metadata-file meta.json</em>:</p><p>3.4.1 Option <em>— metadata-file</em> writes image medata into a file which we will extract manifest digest from later</p><p>3.4.2 Option <em>— platform linux/@param:arch@</em> is not necessary for real world project, as running on specific platform will generate image for that platform automatically. We use it here as all platform builds of the demo project are actually running with server docker executor</p><p>3.4.3 Option <em>— builder onedev</em> is used to build image with a docker container driver (Refer to QEMU section on how to create it), which is necessary as the default docker driver sometimes generates incorrect manifest hash via option <em>— metadata-file</em></p><p>3.5 Step <em>create digest file</em> extracts image manifest digest from metadata file exported above, and create an empty file named by the digest</p><p>3.6 Step <em>publish digest file</em> publishes the digest file generated by above step</p><p>4. Job <a href="https://code.onedev.io/tutorials/multi-arch-docker-image/native/~files/main/.onedev-buildspec.yml?position=buildspec-jobs/create+image+index">create image index</a> collects digests of all platform images and calls docker imagetools to create an image index in registry:</p><p>4.1 It declares a job dependendy to <em>build arch images</em>, and passes value <em>amd64</em> and <em>arm64</em> for param <em>arch</em>, and then retrieve all published artifacts of the dependency job, which is the digest file</p><p>4.2 The step <em>prepare image sources</em> prefixes each image manifest digest with registry repository and prints them to a single file named <em>sources</em></p><p>4.3 The step <em>create image index</em> calls buildx imagetools command to create image index in docker registry using content of file <em>sources</em></p><p>5. Run job <em>create image index</em>, and it will trigger two instances of job <em>build arch images</em>, one for <em>amd64</em> param value, and another for <em>arm64</em>. After platform images being published, it continues to create index from these images and generate a <a href="https://code.onedev.io/tutorials/multi-arch-docker-image/native/~builds/9/packages/Container%20Image">multi-arch image</a> successfully</p><p>Thanks for reading!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*_ek8guchkpgoo55z.png" /></figure><h4>👋 If you find this helpful, please click the clap 👏 button below a few times to show your support for the author 👇</h4><h4>🚀<a href="http://from.faun.to/r/8zxxd">Join FAUN Developer Community &amp; Get Similar Stories in your Inbox Each Week</a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c7d0c9421d4" width="1" height="1" alt=""><hr><p><a href="https://faun.pub/build-multi-arch-docker-image-with-onedev-3c7d0c9421d4">Build Multi-Arch Docker Image with OneDev</a> was originally published in <a href="https://faun.pub/">FAUN.dev() 🐾</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Built-in Docker Registry in OneDev]]></title>
            <link>https://faun.pub/built-in-docker-registry-in-onedev-59b5a310f708?source=rss-d635cd326e40------2</link>
            <guid isPermaLink="false">https://medium.com/p/59b5a310f708</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Robin Shen]]></dc:creator>
            <pubDate>Wed, 29 Nov 2023 09:40:20 GMT</pubDate>
            <atom:updated>2023-12-06T18:03:12.650Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0_UYBgmuYhcqvabo" /><figcaption>Photo by <a href="https://unsplash.com/@rubaitulazad?utm_source=medium&amp;utm_medium=referral">Rubaitul Azad</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Since 9.3.0, <a href="https://onedev.io/">OneDev</a> added general infrastructure to manage binary packages. It has built-in docker registry now, and will support more package formats including npm/nuget/maven in coming releases.</p><p>Compared to using a standalone package registry, the integrated package registry have below benefits:</p><ol><li>Sharing the same account and permission system with OneDev</li><li>High availalability and scalability for package storage</li><li>Powerful and sophiscated package query just like other parts of OneDev</li><li>Subscribe to package query to get notifications of new packages</li><li>Access published packages from CI/CD build directly</li><li>Generate change log automatically for packages published via CI/CD</li></ol><p>Now let’s see how to enable package registry and how to publish/access packages in OneDev.</p><h3>Request a Trial Subscription</h3><p>Package registry requires a subscription to use. Switch to menu item <em>Administration / Subscription Management</em>, request a trial subscription key and install it into OneDev if you do not have a subscription yet:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mp87dtnxDqEzgT71UdbZVA.png" /></figure><h3>Enable Project Package Management</h3><p>A project can act as a package repository if package management option is enabled like below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gsqoxgt-hwPr-f8_HOvK2Q.png" /></figure><p>Once enabled, the packages menu item will be available for the project displaying detailed instructions on how to publish packages to the project:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UJlSBPMrRBDMEOXA.png" /></figure><p>(currently only supports docker image, more package formats are planned)</p><h3>Permission to Access and Publish Packages</h3><p>Package read permission is required to access packages of a project, and write permission is required to publish packages to a project. Package permission can be configured via role like below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*in1n1NkzvR2W6dhv.png" /></figure><h3>Publish Packages</h3><p>While it is possible to publish packages outside of OneDev, we highly recommend to publish packages in your CI/CD job to automate things. Also packages published via CI/CD job will be linked with build, code and issues automatically.</p><h4>Publish Container Images</h4><p>OCI-compliant container images can be published to project repository via build image step (or its Kaniko alternative) like below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*M6ga9daG1O2x-gTS.png" /></figure><p>Here tags property is specified to push image to built-in registry server. The image repository points to current project, but you can push to any other projects if desired. Image tag is specified as version of current build. Note that registry server should be <strong>the same as</strong> server url (without protocol part) in system setting, or you can use @server@ to make sure it always uses the correct one.</p><p>The property Built-in Registry Access Token Secret should also be specified as a job secret with value set to access token of a user who has permission to publish packages to desired projects.</p><h3>Access Published Packages<a href="https://docs.onedev.io/tutorials/package/working-with-packages#access-published-packages">​</a></h3><p>Published packages can be accessed via packages page as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*a4i3bNtIKS6fmR6z.png" /></figure><p>From here, you may query/subscribe packages, or select a package to view its detailed information:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aIH3yGPdHyUDCqAm.png" /></figure><p>If the package is published via CI/CD job, you may compare it with any previous versions published by same project to get list of fixed issues or code changes as indicated above.</p><p>Also packages published via CI/CD job can be accessed directly from build page like below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VQUOeL7ISCgbnjvk.png" /></figure><p>That’s it. Thanks for reading!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*0rM_F_9XoS3sP5GW.png" /></figure><h4>👋 If you find this helpful, please click the clap 👏 button below a few times to show your support for the author 👇</h4><h4>🚀<a href="http://from.faun.to/r/8zxxd">Join FAUN Developer Community &amp; Get Similar Stories in your Inbox Each Week</a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=59b5a310f708" width="1" height="1" alt=""><hr><p><a href="https://faun.pub/built-in-docker-registry-in-onedev-59b5a310f708">Built-in Docker Registry in OneDev</a> was originally published in <a href="https://faun.pub/">FAUN.dev() 🐾</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>