azure / azure-functions-devops-build Goto Github PK
View Code? Open in Web Editor NEWA python library for setting up and managing Azure DevOps builds for Azure Functions projects
License: MIT License
A python library for setting up and managing Azure DevOps builds for Azure Functions projects
License: MIT License
Reported by @JK87iab in Azure/azure-functions-python-worker#449
This issue occurs when a MSA user joined an AAD created organization.
The devops-pipeline command fails to return a list of proper organizations in this scenario.
A proper fix is to join the listing in organization_manager and combine MSA & AAD organizations together.
Update the Az CLI command that generates the yaml file.
add the ability to create a pipeline for a PowerShell function
@ahmedelnably will check the needed steps and circle back with requirements
Target Milestone: Azure CLI Milestone 59
I am using sample_yaml_builds/dotnet-windows.yml as a template for building and publishing an azure function project in Azure DevOps. I am not building and deploying in the same step, rather I intend to publish the zip file as a build artifact and deploy from a separate pipeline.
I have both pipelines (build and deploy) set up, and they both run successfully, however I am unable to see my functions through azure portal after deployment. The portal does show that a package has been deployed and even correctly indiactes the build from which it is deployed. However the functions are not available.
I examined my build artifact and compared that to the results of publishing to a folder from Visual Studio and found that the build artifact zip contained an additional root folder (with the same name as my solution file) that then contained the published outputs; the results of publishing to a folder from VS did not contain this additional directory layer.
I modified my build file, setting modifyOutputPath: false for the DotNetCoreCLI task, and this result was then consistent with VS publish. The new artifact deployed successfully to Azure with expected results.
I am submitting this issue for repro with the suggestion that modifyOutputPath be set to false if generated build artifacts do not deploy as expected
When creating an organization in Azure CLI with a Microsoft account (not an Azure Active Directory account), I don't have access to my own Azure Devops projects.
Everytime when I try to create one, an error message shows up:
TF400813: The user 'Windows Live ID\[email protected]' is not authorized to access this resource.
This may due to the organization creation process does not have "X-VSS-ForceMsaPassThrough" header set in the VSTS API request.
There are important files that Microsoft projects should all have that are not present in this repository. A pull request has been opened to add the missing file(s). When the pr is merged this issue will be closed automatically.
Microsoft teams can learn more about this effort and share feedback within the open source guidance available internally.
Need to update API call for validation in
From: https://app.vssps.visualstudio.com/_AzureSpsAccount/ValidateAccountName to https://app.vsaex.visualstudio.com/_apis/HostAcquisition/NameAvailability/<>
The azure-functions-devops-build
package depends on the vsts
package which has been deprecated by its developers and has been replaced by azure-devops
(see: microsoft/azure-devops-python-api#281 (comment)).
Could azure-functions-devops-build
switch over to the new azure-devops
package?
I am trying to deploy a python function to Azure function app using Linux ubuntu-18.04 agent.
It is failing with below error
Syncing triggers...
Request:
Method: POST, RequestUri: 'https://management.azure.com/subscriptions/XXXXXXXX/resourceGroups/XXXXX/providers/Microsoft.Web/sites/YYYYYYY/hostruntime/admin/host/synctriggers?api-version=2015-08-01', Version: 2.0, Content: System.Net.Http.StringContent, Headers:
{
Authorization:
User-Agent: functions-core-tools/2.7.1724
Accept: application/json
x-ms-request-id: b9f510cb-a473-4885-90df-7bf7de5dd730
Content-Type: application/json; charset=utf-8
}
null
Response:
StatusCode: 400, ReasonPhrase: 'Bad Request', Version: 1.1, Content: System.Net.Http.HttpConnection+HttpConnectionResponseContent, Headers:
{
Cache-Control: no-cache
Pragma: no-cache
Strict-Transport-Security: max-age=31536000; includeSubDomains
Server: Microsoft-IIS/10.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
x-ms-ratelimit-remaining-subscription-writes: 1198
x-ms-request-id: a98cd971-21f5-42d0-9011-e944e847e5ed
x-ms-correlation-request-id: a98cd971-21f5-42d0-9011-e944e847e5ed
x-ms-routing-request-id: CENTRALUS:20191019T015647Z:a98cd971-21f5-42d0-9011-e944e847e5ed
X-Content-Type-Options: nosniff
Date: Sat, 19 Oct 2019 01:56:46 GMT
Content-Length: 331
Content-Type: application/json; charset=utf-8
Expires: -1
}
{"Code":"Unauthorized","Message":"Encountered an error (Forbidden) from extensions API.","Target":null,"Details":[{"Message":"Encountered an error (Forbidden) from extensions API."},{"Code":"Unauthorized"},{"ErrorEntity":{"Code":"Unauthorized","Message":"Encountered an error (Forbidden) from extensions API."}}],"Innererror":null}
Following from our discussion today, we'll need an alternate version of this yaml file - https://github.com/Azure/azure-functions-devops-build/blob/master/sample_yaml_builds/linux/consumption/python-consumption.yml that does a conda install
instead of a pip install
for Python Functions.
in the publish step we can add the following to support slots
note that slots is not supported in Linux conusmption
deployToSlotOrASE: true
resourceGroupName: 'funcgbbdemocli'
slotName: 'stage'
Permission is insufficient to create a Azure devops pipeline.
Due to the lack of Microsoft.Authorization/roleAssignments/write permission, an exception is thrown.
Currently, to get the list of organizations we are calling https://app.vssps.visualstudio.com/_apis/Commerce/Subscription which is not a supported API. We need to use this instead https://docs.microsoft.com/en-us/rest/api/azure/devops/account/accounts/list?view=azure-devops-rest-5.0
Link to code:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.