This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use the official lightweight Python image. | |
# https://hub.docker.com/_/python | |
FROM python:3.7-slim | |
# Allow statements and log messages to immediately appear in the Knative logs | |
ENV PYTHONUNBUFFERED True | |
# Copy local code to the container image. | |
WORKDIR /app | |
COPY . ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt update -y | |
sudo apt upgrade -y | |
# jq | |
echo "Installing jq..." | |
sudo apt install jq -y | |
# helm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
steps: | |
- bash: | | |
docker build \ | |
-f $(system.defaultWorkingDirectory)/$(projectName)/Dockerfile \ | |
-t $(registryServerName)/$(imageName):$(build.buildId) \ | |
$(system.defaultWorkingDirectory)/$(projectName) | |
failOnStderr: true | |
displayName: 'docker build' | |
- bash: | | |
echo $(registryPassword) | docker login \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt update -y | |
sudo apt upgrade -y | |
sudo apt autoremove -y | |
repo='kubernetes/kubernetes' | |
echo $repo '(v1.22.5, v1.21.8, v1.20.14, v1.19.16)' | |
curl -s https://api.github.com/repos/$repo/releases | jq -r '[.[] | select(.prerelease == false and (.tag_name | startswith("v1.22")))] | .[0].tag_name' | |
curl -s https://api.github.com/repos/$repo/releases | jq -r '[.[] | select(.prerelease == false and (.tag_name | startswith("v1.21")))] | .[0].tag_name' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Azure.WebJobs; | |
using Microsoft.Azure.WebJobs.Extensions.Http; | |
using Microsoft.Azure.WebJobs.Host; | |
using Newtonsoft.Json; | |
using System; | |
using System.Collections.Generic; | |
using System.Net; | |
using System.Net.Http; | |
using System.Text; | |
using System.Threading.Tasks; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This script has been inspired by this resource: https://michaelcollier.wordpress.com/2017/05/03/copy-managed-images/ | |
#But maybe this new Private Preview feature will help in the future? https://azure.microsoft.com/en-us/blog/shared-image-gallery-now-in-limited-public-preview/ | |
#Source: | |
SourceSubscriptionId=? | |
RG=mylinuxvm | |
VM=mylinuxvm | |
LOC=canadaeast | |
SNAP=mylinuxmsnapshot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Azure.WebJobs; | |
using Microsoft.Azure.WebJobs.Extensions.Http; | |
using Microsoft.Azure.WebJobs.Host; | |
using System; | |
using System.Drawing; | |
using System.IO; | |
using System.Net; | |
using System.Net.Http; | |
using System.Text.RegularExpressions; | |
using System.Threading.Tasks; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$connections": { | |
"value": { | |
"blogger": { | |
"connectionId": "/subscriptions/071eb531-0874-4eaf-823d-0a2d0d711d56/resourceGroups/MyMonthlyBlogArticle/providers/Microsoft.Web/connections/blogger", | |
"connectionName": "blogger", | |
"id": "/subscriptions/071eb531-0874-4eaf-823d-0a2d0d711d56/providers/Microsoft.Web/locations/eastus/managedApis/blogger" | |
}, | |
"linkedin": { | |
"connectionId": "/subscriptions/071eb531-0874-4eaf-823d-0a2d0d711d56/resourceGroups/MyMonthlyBlogArticle/providers/Microsoft.Web/connections/linkedin", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Param( | |
[string] [Parameter(Mandatory=$true)] $SubscriptionId, | |
[string] [Parameter(Mandatory=$true)] $ResourceGroupName, | |
[string] [Parameter(Mandatory=$true)] $WebAppName, | |
[string] [Parameter(Mandatory=$true)] $SlotName, | |
[string] [Parameter(Mandatory=$true)] $StorageAccountName, | |
[string] [Parameter(Mandatory=$true)] $ContainerName, | |
[string] [Parameter(Mandatory=$true)] $BlobFileName | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Currently there is an issue with New-AzureRmWebAppSlot so this snippet doesn't work. | |
#Issue entered here: https://github.com/Azure/azure-powershell/issues/3779 | |
#Stay tuned! | |
Param( | |
[string] [Parameter(Mandatory=$true)] $SubscriptionId, | |
[string] [Parameter(Mandatory=$true)] $ResourceGroupName, | |
[string] [Parameter(Mandatory=$true)] $AppServicePlan, | |
[string] [Parameter(Mandatory=$true)] $WebAppName, | |
[string] [Parameter(Mandatory=$true)] $SlotName |