Fixing multiple pipelines - OGF and Integration tests (#902)

* Reducing the storage account length in OGF workflow
* CODEOWNERS updated
* New BuildNumber and changing version spec.
This commit is contained in:
Varad Meru 2021-10-28 19:09:44 -07:00 коммит произвёл Varad
Родитель 8f03839ea9
Коммит ae1f5f5796
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: D65E2959EB74910D
3 изменённых файлов: 60 добавлений и 18 удалений

64
.github/workflows/ogf_workflow.yml поставляемый
Просмотреть файл

@ -22,9 +22,9 @@ on:
description: 'To cleanup the test resource groups'
default: 'true'
schedule:
# Runs every 3 hours.
# Runs every 8 hours.
# * is a special character in YAML so you have to quote this string
- cron: "10 0/3 * * *"
- cron: "10 0/8 * * *"
env:
PROCESS_COUNT: "FUNCTIONS_WORKER_PROCESS_COUNT"
@ -111,6 +111,16 @@ jobs:
--tags "created on= $(date)" "Use=OGFTest" > /dev/null
sleep 3 # once the RG is created
if [ ${{ matrix.region }} = 'northcentralus' ]
then
STORAGE_ACCOUNT_NAME=(ogf${{ matrix.sku }}ncus${{ github.run_number }})
fi
if [ ${{ matrix.region }} = 'southcentralus' ]
then
STORAGE_ACCOUNT_NAME=(ogf${{ matrix.sku }}scus${{ github.run_number }})
fi
az storage account create --resource-group $RESOURCE_GROUP_NAME \
--name $STORAGE_ACCOUNT_NAME --location ${{ matrix.region }} \
--tags "created on= $(date)" "Use=OGFTest" --sku Standard_LRS
@ -121,6 +131,16 @@ jobs:
with:
azcliversion: 2.16.0
inlineScript: |
if [ ${{ matrix.region }} = 'northcentralus' ]
then
STORAGE_ACCOUNT_NAME="ogf${{ matrix.sku }}ncus${{ github.run_number }}"
fi
if [ ${{ matrix.region }} = 'southcentralus' ]
then
STORAGE_ACCOUNT_NAME="ogf${{ matrix.sku }}scus${{ github.run_number }}"
fi
az functionapp create --consumption-plan-location ${{ matrix.region }} \
--name $FUNCTION_APP_NAME --os-type $OS \
--functions-version 3 --runtime ${{ env.LANGUAGE || env.DEFAULT_DEPLOYMENT_LANGUAGE }} \
@ -133,21 +153,41 @@ jobs:
- name: Create new EP1 Azure Function App
if: ${{ matrix.sku == 'ep1' }}
run: |
az functionapp plan create --resource-group $RESOURCE_GROUP_NAME \
--name $FUNCTION_APP_PLAN_NAME --is-linux true --max-burst 1 \
--min-instances 1 --location ${{ matrix.region }} --sku EP1 \
--tags "created on= $(date)" "Use=OGFTest"
sleep 2
if [ ${{ matrix.region }} = 'northcentralus' ]
then
STORAGE_ACCOUNT_NAME="ogf${{ matrix.sku }}ncus${{ github.run_number }}"
fi
az functionapp create --resource-group $RESOURCE_GROUP_NAME --plan $FUNCTION_APP_PLAN_NAME \
--name $FUNCTION_APP_NAME --functions-version 3 --runtime ${{ env.LANGUAGE || env.DEFAULT_DEPLOYMENT_LANGUAGE }} \
--runtime-version ${{ env.LANGUAGE_VERSION || env.DEFAULT_DEPLOYMENT_LANGUAGE_VERSION }} --storage-account $STORAGE_ACCOUNT_NAME \
--tags "created on= $(date)" "Use=OGFTest"
sleep 2
if [ ${{ matrix.region }} = 'southcentralus' ]
then
STORAGE_ACCOUNT_NAME="ogf${{ matrix.sku }}scus${{ github.run_number }}"
fi
az functionapp plan create --resource-group $RESOURCE_GROUP_NAME \
--name $FUNCTION_APP_PLAN_NAME --is-linux true --max-burst 1 \
--min-instances 1 --location ${{ matrix.region }} --sku EP1 \
--tags "created on= $(date)" "Use=OGFTest"
sleep 2
az functionapp create --resource-group $RESOURCE_GROUP_NAME --plan $FUNCTION_APP_PLAN_NAME \
--name $FUNCTION_APP_NAME --functions-version 3 --runtime ${{ env.LANGUAGE || env.DEFAULT_DEPLOYMENT_LANGUAGE }} \
--runtime-version ${{ env.LANGUAGE_VERSION || env.DEFAULT_DEPLOYMENT_LANGUAGE_VERSION }} --storage-account $STORAGE_ACCOUNT_NAME \
--tags "created on= $(date)" "Use=OGFTest"
sleep 2
- name: Create new AppService plan Azure Function App
if: ${{ matrix.sku == 'p1v2' }}
run: |
if [ ${{ matrix.region }} = 'northcentralus' ]
then
STORAGE_ACCOUNT_NAME="ogf${{ matrix.sku }}ncus${{ github.run_number }}"
fi
if [ ${{ matrix.region }} = 'southcentralus' ]
then
STORAGE_ACCOUNT_NAME="ogf${{ matrix.sku }}scus${{ github.run_number }}"
fi
az functionapp plan create --resource-group $RESOURCE_GROUP_NAME \
--name $FUNCTION_APP_PLAN_NAME --is-linux true --number-of-workers 1 \
--location ${{ matrix.region }} --sku P1v2 \

Просмотреть файл

@ -3,11 +3,11 @@
#
# It uses the same pattern rule for gitignore file
# https://git-scm.com/docs/gitignore#_pattern_format
#
#
# AZURE FUNCTIONS TEAM
# For all file changes, github would automatically
# include the following people in the PRs.
#
* @vrdmr @AnatoliB
* @vrdmr @gavin-aguiar

Просмотреть файл

@ -8,6 +8,7 @@ trigger:
variables:
DOTNET_VERSION: '3.1.405'
DOTNET_VERSION_5: '5.0.x'
patchBuildNumberForDev: $(Build.BuildNumber)
jobs:
- job: Tests
@ -184,9 +185,10 @@ jobs:
elif [[ $BUILD_SOURCEBRANCHNAME = dev ]]
then
echo "Generating V3 Integration Test Package for $BUILD_SOURCEBRANCHNAME"
LATEST_TAG=$(curl https://api.github.com/repos/Azure/azure-functions-python-worker/tags -s | jq '.[0].name' | sed 's/\"//g')
LATEST_TAG=$(curl https://api.github.com/repos/Azure/azure-functions-python-worker/tags -s | jq '.[0].name' | sed 's/\"//g' | cut -d'.' -f-2)
NUSPEC="pack\Microsoft.Azure.Functions.V3.PythonWorker.nuspec"
WKVERSION="3.$LATEST_TAG-dev" # Integration Test (e.g. 3.1.1.6-dev)
# Only required for Integration Test. Version number contains date (e.g. 3.1.2.20211028-dev)
WKVERSION="3.$LATEST_TAG-$(patchBuildNumberForDev)"
else
echo "No Matching Release Tag For $BUILD_SOURCEBRANCH"
fi