I am using the pipeline configuration below in order to deploy an azure function to a tenant.
However, when activating the manual deployment step, i am continuously getting the following error:
<span>✖ Could not get the resource group associated with function xxxx-dlt-tst-rg.</span>
<span>I have looked at the answer provided by the other user who had the same problem here (<a href="https://community.atlassian.com/t5/Bitbucket-Pipelines-questions/Pipeline-azure-functions-deploy-failing-because-it-can-t-find/qaq-p/1056786" target="_blank">https://community.atlassian.com/t5/Bitbucket-Pipelines-questions/Pipeline-azure-functions-deploy-failing-because-it-can-t-find/qaq-p/1056786</a>) but this isn't so in my case, since the service principal which i created only has access to one subscription. </span>
Any clue as to what the issue could be would be great!
image: microsoft/dotnet:sdk
pipelines:
default:
- step:
name: Build
caches:
- dotnetcore
script:
- export PROJECT_NAME=myproj.csproj
- apt-get update
- apt-get install -y zip
- dotnet restore
- dotnet build $PROJECT_NAME -c Release -o ./bin
- cd ./bin
- zip ../package.zip
artifacts:
- package.zip
- step:
deployment: staging
name: Deploy zip (Staging)
trigger: manual
script:
- export DATE=$(date +%Y%m%d%H%M)
- mv package.zip $DATE.zip
- export FILENAME=$DATE'.zip'
- ls
- echo $FILENAME
- pipe: microsoft/azure-functions-deploy:1.0.0
variables:
AZURE_APP_ID: $AZURE_APP_ID
AZURE_PASSWORD: $AZURE_PASSWORD
AZURE_TENANT_ID: $AZURE_TENANT_ID
ZIP_FILE: $FILENAME
FUNCTION_APP_NAME: $FUNCTION_APP_NAME
DEBUG: $true