Category Archives: Technical

mermaid

I wrote about PlantText before. It is about creating diagrams with code. mermaid is another one from the same category. Recently GitHub has given support for this.

I tried to create some class diagrams with mermaid online editor.

classDiagram

    class ILog {
        <<interface>>
        void LogInfo(string message)
        void LogWarn(string message)
        void LogError(string message)
    }

    class ConsoleLog {
        void LogInfo(string message)
        void LogWarn(string message)
        void LogError(string message)
    }
    ILog --|> ConsoleLog : Implements

    class FileLog {
        void LogInfo(string message)
        void LogWarn(string message)
        void LogError(string message)
    }
    ILog --|> FileLog : Implements

    class AppInsightsLog {
        void LogInfo(string message)
        void LogWarn(string message)
        void LogError(string message)
    }
    ILog --|> AppInsightsLog : Implements

    class IGreetService {
        <<interface>>
        string UserName

        string GetHello()
        string GetBye()
    }

    class GreetService {        
        string UserName
        ILog Logger

        string GetHello()
        string GetBye()
    }
    IGreetService --|> GreetService : Implements
    ILog ..> GreetService : Dependency

Azure DevOps release pipeline

Some days ago I wrote a blog post about Azure release Pipelines (CD) and how we can’t use YAML in that. The only option is to do it visually with designer. If I compare this with GitHub workflows, there we can write CI and CD both in YAML syntax.

After that I found a blog post from Microsoft dev blog saying we can use YAML for CD in Azure Pipelines as well. Designing a release pipeline visually with designer, is a legacy way of doing CD now.

PowerShell in a container

Recently I found that we can execute a PowerShell script in a docker container. There is a base image for PowerShell in docker hub and you can use that to create your own image with your PowerShell script. Now when you create docker image and container from that, your PowerShell script can execute inside that container.

Example: https://github.com/Arnab-Developer/PowerShellInContainer