2022-05-17 22:57:06 +02:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: Azure Function App
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Build and upload function app
|
|
|
|
environment:
|
|
|
|
AZURE_SP:
|
|
|
|
from_secret: AZURE_SP
|
|
|
|
AZURE_SP_PASSWORD:
|
|
|
|
from_secret: AZURE_SP_PASSWORD
|
|
|
|
AZURE_SP_TENANT:
|
|
|
|
from_secret: AZURE_SP_TENANT
|
|
|
|
FUNCTION_APP_NAME:
|
|
|
|
from_secret: FUNCTION_APP_NAME
|
2022-05-17 23:22:46 +02:00
|
|
|
image: ubuntu:20.04
|
2022-05-17 22:57:06 +02:00
|
|
|
commands:
|
2022-05-17 23:22:46 +02:00
|
|
|
- apt update
|
|
|
|
- apt install -y wget
|
|
|
|
- wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb
|
|
|
|
- dpkg -i packages-microsoft-prod.deb
|
2022-05-17 23:37:29 +02:00
|
|
|
- echo 'tzdata tzdata/Areas select Europe' | debconf-set-selections
|
|
|
|
- echo 'tzdata tzdata/Zones/Europe select Budapest' | debconf-set-selections
|
|
|
|
- DEBIAN_FRONTEND="noninteractive" apt install -y azure-cli npm
|
2022-05-17 23:30:26 +02:00
|
|
|
- npm i -g azure-functions-core-tools@4 --unsafe-perm true
|
2022-05-17 22:57:06 +02:00
|
|
|
- az login --service-principal -u $AZURE_SP -p $AZURE_SP_PASSWORD --tenant $AZURE_SP_TENANT
|
|
|
|
- func azure functionapp publish $FUNCTION_APP_NAME --python
|