Azure Devops Pass Variables between Tasks

Today I wanted to see if it was possible to create a variable in Azure Devops, change the value within a Task and then use the updated value in a step further down the list of Tasks.

 

Turns out its pretty easy (when you get the syntax correct)


So I created a variable in Azure Devops called Version like so and set its value to 1.0

 

 

 

And then I want to make sure I can read this from a standard PowerShell Task in a step within my Build like so :-

Which when built showed me the value as I’d expect of 1.0

And then I want to set the variable to a new value (which could be from anything or anywhere to be honest) using the syntax

##vso[task.setvariable variable=Version]1.2.3

And then finally read out the current value by using $(Version)

Which shows the Version parameter has been updated to 1.2.3 as we would want.

Hope this helps someone at some point πŸ™‚



Azure Devops – Add your build status badges to your Wiki

Its always a good idea on your project to keep your project documentation up to date,Β I personally like to make use of the Wiki inside Azure Devops, we use Azure Devops almost exclusively at work now.

On the wiki we have a page which documents the Azure Builds and Release pipelines, so that people can get an idea of what the individual builds are for and explain the steps within the Release pipelines, for the most part this is really straightforward, but for new people joining the team it just makes life easier to have this kind of thing written down and explained.

On that note I wanted to show you how to add the status badges for each build to your Wiki, it took me a wee while to find this so I thought I’d blog it because I’ll forget and so other people can see how to do it.

An example of the kind of thing I am talking about is below: –

So how do you find the Markdown for the badges so that you can add this to your wiki or elsewhere?

If you browse to your build(s) for your projects, click on the 3 ellipses on the right hand side, next to the Edit and Queue buttons and then choose Status Badge

Then you need to select the text next to Markdown, and then just paste this into your wiki page.

Hopefully someone finds this useful, bye for now.



Azure Devops – Release Gates

In this blog post I want to talk to you about release gates within Azure Devops, release gates can be useful if you want to add in some further pipeline checks to stop the release going ahead.

Nothing better than an example so here is how to set up gated releases using Azure Devops.


Example

This example shows how you can add in a release gate so that the release wont go ahead and deploy if say there are still open bug tasks within the Azure Board for the current sprint.

Once you have a release, first, click on the lightning bolt on the stage as seen below, and then enable the Gates are on the right hand side.

One this had been selected choose Add and then select Query Work Items, for this I have created a Shared Query where I created a shared query to show me if there are any bugs which are sitting as Approved (which I’m using as open but not started as yet), I don’t want the release to go ahead if there are any bugs in the Approved status.


Note:- In order to create a new query within Azure Devops on the left hand side select Boards, queries and then select new query.

An example query would look something like the following


Fill out the screen below like below and I set the upper threshold to 0.

To recap, I want my release to fail the gate so that the release wont go ahead because I have open bugs within my Azure Board for this particular project.

There are a number of different types of release gates you can use and here is a screen shot of the ones available to use at this time.

I hope you find this useful, if you have any questions please leave feedback.



Podcast appearance on CloudSkills.fm

On March 12th 2019, Mike Pfeiffer invited me to appear on his excellent podcast which is called CloudSkills.fm

CloudSkills.fm is a weekly podcast with technical tips and career advice for people working in the cloud computing industry

Mike Pfeiffer is a Pluralsight author, consultant, advisor, author, and mentor for people ramping up on cloud-based technologies and it was a privilege to have him invite me onto his show and chat about Azure Certifications and also Azure Devops. If you haven’t checked out his podcast as yet, then please do @ cloudskills.fm

In my episode we talk about how I studied for the Azure exams, what content and methods of studying I use and we also talk about how I make use of Azure Devops with my companies customers, where we use it to deploy web apps and infrastructure as code.

I have also been working on moving customer’s data from on premises to Azure using Azure Sql, Azure Data Factory and also using Analysis services with Power BI reporting capabilities, more on that coming soon on my blog. For this project we are building everything from the ground up using Arm templates, deploying the entire resource group to Azure and populating the Azure Data Factory with pipelines all using Azure Devops.

Before I blog about that, lets talk more about my podcast appearance. It’s always a pleasure to be able to talk on podcasts about what I get up to and I like to share what I have been doing with Azure on my blog here. Mike is a very knowledgeable guy and like myself is insanely busy working on multiple things whilst trying to learn and keep up to date, he also has a weekly mailing where he mentions the interesting things he comes across week to week.

I’ll keep this post short and move onto blogging about the Data side of things I’ve been involved in, but if your thinking of doing some Azure exams and wont to know where to get started then have a listen to the episode and give me feedback on it.

Enjoy listening if you take the time to tune in.

 



Tips for Running a User Group

A couple of people have asked for some tips on running an Azure user group, I help out with the Glasgow Azure User Group, I don’t run it  the awesome Sarah Lean runs it and does all the hard work, I just help out.

Instead of replying I thought I may as well blog some tips and collate other people’s tips going forward, so here is a list of tips on running a User Group.

  • Try and create a brand for it, think name, website url, logo etc.
  • Use Meetup or Eventbrite, although Meetup seems to be the most popular
  • Get your User Group added to lists of similar typed of User Group in the region
  • Try and generate interest from speakers as far in advance as possible, have a backup plan just in case speakers cancel last-minute (we all have busy lives)
  • Tweet information about the event and use LinkedIn and Facebook to get the User Group name out there
  • MVP’s need to deliver talks to help them maintain their MVP status and are always looking for places to deliver talks
  • Try and get sponsors for your User Group, they might help pay for food and drinks for your attendees
  • Always thanks your sponsors if you have them, they help you keep the User Group running normally
  • Folks always like swag, stickers especially, ask around and see who can get you stickers for your User Group
  • If your running a conference or event I use sessionize, and I recommend it if you’re organising an event
  • Last but not realise your doing a lot to help the community by organising and running a User Group, it’s not easy, so try to get help with it, good luck.

Please leave feedback and your tips after the beep…




Automation Accounts and Start/Stop VM Solutions in Azure

At work one of our customers has a huge number of vm’s that people in their teams use on and off, in order to keep costs down for them we wanted to turn these vm’s off at certain times, say shut them down at 8pm at night and restart them say 7am in the morning the next day – note this will save a lot of money over time.

To achieve this I was using an Azure automation account and using the Start / Stop solutions which allow you to set up schedules for doing just what I wanted.

I tested this out on the dev environment first (as you do) and it worked great, so I tried to delete the solution and create a new one which covers dev, integration and the quality environments but hmm I got this error when trying to delete the solution.

Hmm, ok what’s going on here then?, maybe its a browser issue, nope, re-open the browser, try a different browser, nope, nope and nope.

Ok so I’m googling and reading all sorts of stuff (Stack overflow for me is 99 replies and 1 right answer these days), nothing working.

I know I’ll tweet @AzureSupport and ask them, they then respond and very kindly gave me 1 free support ticket and after only a couple of emails back and forth they tell me I have a resource lock on the solution, I check that and nope I don’t, they tell me I have a resource lock of some sort and low and behold on the resource group was a resource lock.

Delete the resource lock and boom it deletes just fine, this wont be a particularly common issue for folks, but I’m blogging about it in case anyone comes across it and most likely I’ll forget and reach my own blog again one day as normally happens.



Microsoft Ignite Tour London edition – my take on it

This past week I attended the Microsoft Ignite Tour London edition, it was a day 2 event held at the London Excel Arena near the Docklands.

This event is part of a global tour Microsoft are doing and its FREE for anyone to attend, if you haven’t managed to attend one as yet I highly recommend you do, there is an amazing amount of sessions to go to covering a vast array of subject areas and if your using Microsoft software there will be something for you there.

I attended a number of session which are presented by Microsoft MVP’s as well as Microsoft employees.

As a dev it was great to be able to hang around the ask the experts area and see the faces I look up to and follow on social media, the list of well know people there was pretty substantial and they were very accessible if you wanted to rock up and say hi or if you had any kind of questions for them.

The fact that the event has these available people and the content is free makes it very compelling, I will definitely be back next year and I hear that things will only be getting better and better.

These types of events are something I need to personally go along to far more, being able to network and introduce myself to these kinds of people is something I recognise that I need to get better at, I recognised a number of people and only spoke to a few, next time I’ll rectify that.

I went to sessions on Data and AI, Arm Templates within Azure, Azure DataFactory and ingesting data and many more. The speakers are made readily available for questions and people who work on the teams hang out and there is a number of demo stations which change throughout both days, I really liked the demo stations and if I am honest that’s something I would love to do.

On Day 2 I decided to skip some sessions and network and I got a lot out of that, I met over 50 people who I follow on twitter and it was awesome to meet them in person and ask them what they’re working on and what sessions they liked the most.

Shout out to all the people who came up to me and say hi! – wearing my Octopus Deploy hoodie helped people recognise me so that was pretty neat.

Off the back of the event I feel a renewed energy and a clearer idea of what I want to learn, where id like to improve upon and also met people who do the type of job that one day I aspire to do.

It’s not every day you get the chance to see thee people in person and ask them questions etc, I will need to get over being shy and just say hi and go from there, I think it’s something a lot of people struggle with, so I’m not alone.

All of the session slides and more can be found here on the Microsoft Tech Communities Page

Roll on next years event and I’m also hoping to go to Ignite in Florida later this year!



Using Azure Recovery Vault to backup SQL Server within your Virtual Machines

In this blog post I’ll show you how to go about baking up SQL Server within your VM’s on Azure. I’m going to assume you have created an Azure Recovery Vault already.


Step 1 – Log into Azure and go into your Recovery Vault.


Step 2 – Click Backup.


Step 3 – Choose SQL Server in Azure VM (Preview).
Step 4 – Choose Start Discovery and that goes off to discover your VM’s which have SQL Server on them.
Step 5 – Select the Virtual Machine name(s) from the list and then hit the Discover DB’s button.
Step 6 Select Configure Backup.
Step 7 – Select from the list the instance(s) and then select the DB’s you wish backed up, you can also change the AutoProtect to ON from the drop down and this will always backup each new database added going forward.


Step 8 – Select Ok.



Step 9 – Choose your Backup Policy Options.

And that should be that, you now have your SQL Server’s within your VM’s on Azure backed up using a Policy which you can configure to suit your needs and change ant any time you wish.



Podcast Appearance on RadioTFS

Last week I was invited to be a guest on a podcast called RadioTFS by Greg Duncan among others, which is a podcast about Microsoft visual studio team foundation server, visual studio online and visual studio application life-cycle management.

 

I wont lie I was nervous and rambled a bit and talk too fast, working on that so that I can get better, got to start somewhere right. The opportunity to appear on shows like this is very welcome and hope to be on more in the future.

I was a guest on Show 171 where I talked about some of the following and more:-

  • Ask Me Anything with Scott Gu – If Carlsberg did meetings…
  • Azure DevOps – How to do a fully automated release (Part 1), Part 2, Part 3
  • Azure Devops – OSS Scanning using WhiteSource
  • WhiteSource Bolt
  • Retrospectives
  • Azure DevOps Blog Posts
  • Azure DevOps Hands-On Labs
  • Azure DevOps Demo Generator
  • New Azure Exams – My thoughts on them
  • Azure DevOps AZ-400 Exam – Study Notes
  • Azure Blobs from C# and Visual Studio – C# Advent Calendar
  • The Second Annual C# Advent

BTW you can find all of the above in more detail on my blog but also please go check out RadioTFS.

If any of the above sounds interesting then make sure to check out the show and the other podcasts where guests like Donovan Brown have been on and other awesome folks.



Ambition and Drive to Learn Azure – Part 2

To follow-up on my earlier post on Ambition and Drive to Learn Azure I’m happy to share with you an update on where I am at with the Azure exams.


Developer Exams (200 and 201 gives me Azure Developer Associate)

AZ-200 Microsoft Azure Developer Core Solutions – Passed
AZ-201 Microsoft Azure Developer Advanced Solutions – Passed
Microsoft Certified: Azure Developer Associate – Passed

 

 

 

 

 


Architect Exams

AZ-300 Microsoft Azure Architect Technologies – Passed
70-535: Architecting Microsoft Azure Solutions – Passed

I need to either sit AZ-301 or AZ-302 to become and Azure Architect Expert

 

 

 

 

 

 

Time to start studying for the AZ-302 exam so I can become Azure Solutions Architect Expert, which I have study notes for.