Don’t want to spend time trying to find the compartment ID in OCI CLI? Jq to the rescue!

If you’re using OCI CLI, you probably have realized compartment ID is a big thing. It’s needed in many of the commands, and sometimes it’s a pain to go find the compartment you’re looking for if you have many compartments.

Jq is the solution here, just like it’s the solution the almost every CLI related problem in the world.

Here’s a little helper function that will print the ID of the compartment name you passed as a parameter:

function fcid() {
oci iam compartment list --all | jq -r ".[] | .[] | select(.name==\"$@\") | .id"
}

 

How to sync branches between GitHub and Visual Studio Team Services (VSTS)

To enable branch sync between GitHub and Visual Studio Team Services (VSTS):

  • Create a build definition in VSTS
  • Save the PowerShell script below in a file
  • Add a PowerShell task and point to the PowerShell script from the previous step
git branch -r | findstr /v "\->" |  ForEach-Object {$br=$_.TrimStart(); git branch --track $br.TrimStart("origin/") $br}
$repoName = "$env:BUILD_REPOSITORY_NAME".split('/')[1]
$repoUri = "$env:SYSTEM_TEAMFOUNDATIONCOLLECTIONURI".Substring(8)+ "_git/$repoName"
git remote add vsts "https://$env:SYSTEM_ACCESSTOKEN@$repoUri"
git branch -r | findstr /v "\->" |  ForEach-Object { $br=$_.TrimStart("  origin/"); git push -u vsts $br }

The Ops Team #014 – “did we name this one?”

The Ops Team is a weekly show where 4 Technical Evangelists specializing in IT Operations get together to give you the deets on their 4 areas of expertise: Microsoft Azure/Cloud, On-premises datacenter technologies, Enterprise Mobility / Windows and DevOps.

This week on The Ops Team, we’re STILL missing MATT!!! How is it he’s on vacation – who authorized this departure? The remaining guys cobble together a show with Rick pulling double duty (can we say hybrid?) on Azure / Azure Stack topics.

Here’s all the links and info on the topics we covered, along with the time stamps to jump to specific points in the video.

Enterprise Mobile/Gadgets with Simon May

DevOps and OSS with Oguz Pastirmaci

Global Cloud Datacenters with Rick Claus

On-Premises Systems with Matt McSpirit (ABSENT)

  •  Off premises today