I am implementing a Logic App in Visual Studio.
I created the Logic App which works properly and I can deploy it using VSTS.
But when I am adding a new ARM file (Test1_QA.parameters.json), I cannot find it in VSTS.
In VSTS I am using Azure Resource Group Deployment task.
Of course when I am deploying directly from within VS by right click on the project, I can select the new file.
I searched the web but couldn't find anything.
Any kind of help would be appreciated.
Make sure the file properties in VS have a "Build Action" set to "Content"
Ok, i suppose you would need to commit the file and push it to VSTS.
generally you can do it by using these commands:
git add -a
git commit -m 'commit message'
git push
Related
I am creating a new Azure Pipeline to deploy .NET Core API app to an App Service in Azure. I am using connection type=publish profile in the pipeline, which is asking for a .pubxml file.
I have already committed the .pubxml file in my Azure repository.
But while giving the path for getting this .pubxml file, I am suspecting that I can't get .pubxml file through build artifacts. Is there any way to get the .pubxml file from azure repos to release pipeline?
I tried with $(Build.SourcesDirectory)\${{ parameters.Location }}\Properties\PublishProfiles\fcmapapi_Dev%20-%20Web%20Deploy.pubxml but no luck.
Any suggestions?
Step 1: Add Azure Repos / Build artifact with an alias to your release pipeline.
https://learn.microsoft.com/en-us/azure/devops/pipelines/release/artifacts?view=azure-devops#artifact-sources
https://learn.microsoft.com/en-us/azure/devops/pipelines/release/artifacts?view=azure-devops#artifact-sources---tfvc-git-and-github
Add "Build" resources as an artifact:
Add "Azure Repository" as an artifact:
Once, you have added both, the classic release pipeline will look like this:
Step 2: Use the three dots to browse the files / packages.
I'm new to Azure DevOps, and I was wondering if there was a way to automatically detected a .yml build file and create a pipeline without having to interact with the site.
I have tried creating a file called azure-pipelines.yml in the root of the repo, with no luck.
Is there anyway to automatically create pipelines? Like how Jenkins detects a Jenkinsfile?
No this is nott possible out of the box, because YAML file is not always pipeline definition. You my try to figure out if it is trully is, however you need to listen for repo changes and in fact you can do this via another pipeline ;) for instance as this:
check if commit has a new yaml file added
verify if the file is pipeline
create a pipeline using azure cli (for instance)
However, this would be quite a lot of work and then you need to create such pipeline in every repo you want to have this detection enabled.
I use Azure DevOps with which I execute an Azure Pipeline bash script that deploys my ARM templates stored on Github.
Github repo structure:
- deploy.sh
- arm_templates_folder
- storageacocunt.json
- eventhub.json
-etc...
How is it possible to only deploy templates that has been modified on Github since the last deployment?
For example, eventhub.json changed, than Event Hubs gets redeployed, but the storageaccount.json will be skipped.
You can combine the following command
git diff --name-only HEAD HEAD~1
with your deployment script.
But... Why do you want to detect what has been modified? Do you want to optimize deployment time? If yes, then combine all templates into one and let Azure Resource Manager deploy them in parallel while maintaining defined dependencies.
I'm using CircleCI for the first time and having trouble publishing to Azure.
The docs don't have an example for Azure, they have an example for AWS and a note for Azure saying "To deploy to Azure, use a similar job to the above example that uses an appropriate command."
If anybody has an example YAML file that would be great, if not a nudge in the right direction would be handy. So far I think I've worked out the following.
I need a config that will install the Azure CLI
I need to put my Azure deployment credentials in an environment variable and
I need to run a deploy command in the YAML file to zip up all the right files and deploy to my Azure app service.
I have no idea if the above is correct, or how to do it, but that's my understanding right now.
I've also posted this on the CircleCi forum.
EDIT: Just to add a little more info, the AWS version of the config file used the following command:
- run:
name: Deploy to S3
command: aws s3 sync jekyll/_site/docs s3://circle-production-static-site/docs/ --delete
So I guess I'm looking for the Azure equivalent.
The easiest way is that on the azure management console you setup as deployment from source control and you can follow this two links
https://medium.com/#strid/automatic-deploy-to-azure-web-app-with-circle-ci-v2-0-1e4bda0626e5
https://www.bradleyportnoy.com/how-to-set-up-continuous-deployment-to-azure-from-circle-ci/
if you want to do the copy of the files from ci to the iis server or azure you will need ssh access the keys etc.. and In the Dependencies section of circle.yml you can have a line such as this:
deployment:
production:
branch: master
commands:
- scp -r circle-pushing/* username#my-server:/path-to-put-files-on-server/
“circle-pushing” is your repo name, which is whatever it’s called in GitHub or Bitbucket, and the rest is the hostname and filepath of the server you want to upload files to.
and probably this could help you understand it better
https://learn.microsoft.com/en-us/azure/virtual-machines/linux/copy-files-to-linux-vm-using-scp
We are using VS 2017 on a single solution with multiple projects and we right mouse click and deploy 3 C# Azure Function to two different Azure Function apps with slots.
How do you set up the VSTS build definition to accomplish this on every check in?
We are using the DLLs and setting up the function.json this way. I don’t know if we need to deploy differently based on this type of configuration.
"scriptFile": "..\\bin\\target.dll",
"entryPoint": "target.Application.Run"
I was able to create a VSTS deployment through the following steps
Solutions structure
Build Configuration Steps
Sync from master branch
Added Nuget Restore using default options
Added MSBuild Step with the followign optons
Project : vstsSolution.sln (Selected using '...')
MSBuild Version: Latest
MSBuild Architechture: MSBuild x86
Clean: Checked
Create Log File: Checked
Added App Service Deploy for Function App1
Azure Subscription: Target Subscription
App Service Name: Target Function App
Deploy to slot: If you check this it allows you to select the actual slot you want to deploy to
Package or folder: FunctionApp1\bin\Debug\net461
Added App Service Deploy for Function App1
Package or folder: FunctionApp2\bin\Debug\net461
Make sure you selected "Hosted VS2017" Agent Queue for this build.
All Build Steps
Triggers: Enable Continuous Integration. So that both function app deploy every time you check-in.
Continuous Integration