Showing posts with label vsts. Show all posts
Showing posts with label vsts. Show all posts

Reading Notes #345

DSCF1554Suggestion of the week



Cloud



Programming



Miscellaneous

~

Reading Notes #338

ChocolateyGUI_main_screen

Suggestion of the week




Cloud


    Programming


      Miscellaneous





        Reading Notes #336

        MSInspire2018

        Cloud



        Programming


        Miscellaneous



        Does the Azure DevOps projects are worth it?

        Imagine you just arrived at the office. You only took a sip or two of your coffee or tea. You look at the tasks that need to be done today (well yesterday based on the request): a new project is starting, and you need to configure everything the team needs to start building that web application. The need a repository, a continuous integration and continuous delivery (CI/CD) pipeline, a place to deploy, monitoring tools, and of course you need to create an environment where they will be able to track their work. Should you panic? No, because you will use the new Azure DevOps Project available in Azure.

        Let's Create the project


        From the Azure portal (portal.azure.com) click on the plus button and search for "devops". Select DevOps Project, then click on the Create button. Then follow the five steps and Azure will create everything for you.

        What is deployed


        • Your application from many popular frameworks
        • Automatic full CI/CD pipeline integration
        • Monitoring with Application Insights
        • Git Repository
        • Tasks/ Bugs tracking board
        • Deployment to the platform of your choice


        In Video please!




        Conclusion


        The DevOps projects are really fantastic and are very useful. The fact that everything is all packaged together and automatically deployed is a considerable time saver. In short, are the Azure DevOps projects worth it? Oh yeah!

        Reading Notes #324

        Cloud

        IMG_20180421_092215


        Programming



        Miscellaneous



        Books


        Eat That Frog!: 21 Great Ways to Stop Procrastinating and Get More Done in Less Time by [Tracy, Brian]Eat That Frog!: 21 Great Ways to Stop Procrastinating and Get More Done in Less Time

        Author: Brian Tracy

        A short book that pushes to action. I really enjoyed it. A book to read and read again.

        ASIN: B01MYEM8SZ








        Reading Notes #314

        MVIMG_20180204_102600Suggestion of the week

        • The Modern Dev Team (Rob Conery) - What a great post. Maybe it's only me getting old ;) but I think we all have these thoughts one day or the other.

        Cloud


        Programming


        Databases

        • My Favorite SQL Prompt Features (MarlonRibunal) - If you never try SqlPrompt and you write SQL in your day to day, stop read this, and go downloading it, or at least read this post that gives you a glimpse of it's feature.

        Miscellaneous


        Reading Notes #305

        AzureDatabricks

        Cloud


        Programming


        Miscellaneous


        Reading Notes #304

        IMG_20171108_160315

        Cloud


        Programming


        Databases


        Podcast


        Miscellaneous



        Reading Notes #299

        azure-1Cloud


        Programming


        Databases


        Miscellaneous



        Lessons learned when deploying multiple databases to Azure with VSTS

        It's had been a while since I worked into Visual Studio Team Services (VSTS), and it was a real pleasure to get back in that area. For the solution I was working on, we need to keep the current database up and running while deploying a new version. For this purpose, we decided to append the release number to database name (ex: MyDatabase363). In our Build and Release processes, we needed to identify which databases are from the last release. In this post, I will show what I did using an inline PowerShell script to get that number and set it as an environment variable so it can be accessible by other tasks.

        To get started let's add a Azure PowerShell task to our build definition. In this post, I use a build process but of course this is also valid for release process. To find the task quickly, use the search text box. I will add two of those, one to get the number, the second to validate that this value is now set as an environment variable and readable from other tasks.
        AddPowerShellTask

        Now it's time to set the first task. Fill-out all the properties and select Inline Script as the Script Type. It should look like this.

        InlineScript

        Let's examine the code.
        Get last Release Number
        $matchingResources = Find-AzureRmResource -ResourceNameContains "mydatabase" -ResourceType "Microsoft.Sql/servers/databases"
        
        $lastRelease = 0
        
        ForEach($resource in $matchingResources)
        {
            if ($resource.ResourceName -match '(\d)+$') {
                if($lastRelease -lt $matches[0]){
                    $lastRelease = $matches[0]
                }
            }
        }
        Write-Output "The last release number is:  $lastRelease"
        Write-Output ("##vso[task.setvariable variable=lastReleaseNumber;]$lastRelease")
        On the first line, I use the Azure PowerShell commandlet Find-AzureRmResource1 to get an array of all the databases currently online in my resource group that contains a specific string. In this case, it's the name of the database without the release number. Then I will loop through all returned resources and using a very simple Regex to extract the release number and keep the biggest one (the last release).

        To close that script we have two outputs. The first one is to give feedback in the logs, because it's always good to have some information there. The second one look more complicated, but if you split it, it's easier to see what's happening. In fact, we are producing a VSTS (previously called Visual Studio Online this is why it's VSO) command to initialize a variable ##vso[task.setvariable variable=lastReleaseNumber;] And of course, assign to it our last release number $lastRelease

        To validate that we really successfully found our last release number and assigned it to a variable, let's try to read it back but from another step. That will be easily done this code in the other step created:
        Validate the last Release Number
        $number = $env:lastReleaseNumber
        
        Write-Output "Confirmation, the last Release Number is:  $number "
        The only thing missing before we can run our test is to create that environment variable. To to it simply go in the Variables tab and add it there.

        env-variable

        It's all set, run the build and you should see something similar in your logs.

        trace



        References




        Reading Notes #284

        IMG_20170609_092421Cloud

        Programming

        Miscellaneous




        Reading Notes #268

        microsoft-integration-stencils-pack-v2-4_thumbCloud


        Programming


        Miscellaneous



        Reading Notes #259

        three-amigos-mainCloud


        Programming




        Reading Notes #255

        microsoft_studioCloud


        Programming


        integration


        Miscellaneous




        Reading Notes #242

        mapCloud


        Programming

        • Exploring dotnet new with .NET Core (Scott Hanselman) - I discover the different types in dotnet new command during Julie Lerman's talk at DevTeach and now this post shows a list of incredible opportunities.

        Miscellaneous


        Reading Notes #234

        tree in a blue skySuggestion of the week


        Cloud


        Programming


        Miscellaneous



        Reading Notes #226

        build-2016Microsoft Build 2016


        Cloud


        Programming



        Reading Notes #225

        Postman Cloud


        Programming


        Databases


        Reading Notes #221

        logo_JavaScriptSuggestion of the week

        • Why You Should Learn JavaScript in 2016 (Ken Powers) - I eared a lot of people complaining about Javascript, this excellent post explains why you undeniably, we should all know it, an if it's not the case why 2016 is a great time to learn it.

        Cloud


        Programming


        Data

        • Power BI Service February Update (Amanda Cofsky) - Fantastic! This update will give us the possibility to share outside ou organization... And many other things.

        Miscellaneous


        ~Frank


        Reading Notes #220

        Logic-AppSuggestion of the week


        Cloud


        Programming


        Data

        Book

        • Software Development Book Giveaway! - Cool! A great opportunity, 3 free books are given: Building Microservices, Working Effectively with Legacy Code, and Javascript: The Good Parts.

        Miscellaneous