Override appveyor publish profile - msbuild

I have an MVC 5 application we're moving from on-premise to the Azure cloud. Currently, we have several publish profiles, one per environment, which we determine using a powershell script. One of our goals is to make the building scripts and infrastructure as simple as possible, so I was wondering if I could make it so that using only my appveyor.yml file I could set the publish profile to be used, so
Is there a way to set the publish profile from the appveyor.yml file?
If not what are my choices?

You can run your PowerShell script as part of desired build step in pipeline. It is possible can run commands right from YAML file or UI or check-in your PowerShell script into repository and run .ps1 file. You might consider using secure variables to avoid checking in things like connection strings into repo in clear text.
However this custom script/profiles approach will not allow you to use built-in WAP artifacts packaging and you will be also needed to use custom script instead of automatic MSBuild mode. Which is OK, but a little bit more scripting. Also you will be needed to publish artifacts so it will be available for deployment.
Maybe easier option is to let AppVeyor do all build and WAP artifacts packaging/publishing automatically, and then use built-in Web Deployment with Web Deploy parametrization instead of multiple publishing profiles.
But if you decide to go with custom scripts, and multiple publishing profiles, you still can use use built-in Web Deployment with artifacts created by your scripts.

Related

Azure Pipeline build multiple solutions "checkin" build

I am moving from "XAML" builds to DevOps YAML builds and trying to replicate what I had in TFS 2012. In the XAML build I had several "Solutions" in the "Items to build" and this build was triggered on any checkin. From what I can tell the Pipeline was designed to build a single solution. I've "unlinked" the Pipeline from a single solution and was planning on adding additional Build Tasks for each solution to build. Is this the proper way? If this is not the best way to do this I'm open to suggestions. Using Azure DevOps 2019 and Visual Studio 2017.
Theoretically, you are able to do this. If you manage to do this with if's or something like that, you have to add multiple tasks - to each solution. You have to deal with triggers, finally your yaml file would be unmaintainable. YAML script would be huge and difficult to understand the dependencies.
I would suggest you just use a single file for each solution build. You are able to have many of .yml files all targeting different solutions.
Multiple YAML build pipelines in Azure DevOps
Can I have multiple build pipelines for the same repository?
Besides, since you are moving from "XAML" and not familiar with this build process. You can always use the Designer approach and pull out the system generated YAML if you are new to the system. Here's the YAML schema reference that might help you!!!

Nuxt webapp deployment through azure pipelines

i'm already thankfull for anyone reading this.
I've stumbled across some problems trying to deploy a Nuxt application in a correct way. For testing purposes i've created a clean installed Nuxt application so i'm sure nothing is wrong with my codebase. What my ultimate goal is is to push all my nuxt code to github which than gets picked up from a azure deployment pipeline and generates the needed build files and drops them to the webapp service and runs the needed start command. There's no documentation to be find about Azure which is really annoying for me. I'm not used to deploying stuff through a pipeline but need this to be working for this project.
Has anyone experience with Nuxt and deployments through Github -> Azure pipeline -> Build -> Web app running immediatly
What's i've tried already is pushing all the source code to a repository which get's picked up by azure pipeline. The only thing the pipeline does is paste the code in the wwwroot folder. Which is obviously not enough to make the application run automated.
What i expect is some insight from someone who is experienced with nuxt and azure deployments through github/bitbucket (doesn't really make a difference)
You have to configure your pipeline to build the nuxt files and deploy them. You can usually achieve the first step through npm commands, npm install then npm run build.
There's a few different ways to deploy them, which you'll have to decide between depending on your use case and environment. You can create an endpoint pointing to a CDN serving a blob, zip the built files and publish the artifact which is then used by a release pipeline, etc. Once the next files are created, you have all you need to deploy.

How to Test a Deployment in Octopus Deploy

I am working on automating our ASP.Net projects' release, using Octopus Deploy. While creating release in Octopus, I am performing following testing completely manually:
I am checking if release is deploying
Everything expected
In the expected places
All required services or web services were restarted
All Pre/Post deploy scripts ran successfully
This means going to different servers and reading release log generated by Octopus Deploy. It leaves risk of introducing mistakes and any future change can make deployment unstable.
Is there any tool to perform a kind of integration testing for Octopus Deploy Release or automate the process mentioned above. I am also open to writing a quick tool automating my testing but then I was wondering what will be the best way to go about it.
Thanks!
For Octopus 2.0 we're building a powerful API that gives you access to everything in Octopus. Using the API you'll be able to create and deploy a release, as well as read the activity logs and see what was deployed. You could hook this up to an automated test (which is what we're doing internally for end-to-end automated testing).

Auto discover projects in continous integration Tools

We have a code base composed of many projects. Currently each time we add a project on SVN we must reconfigure CruiseControl to start build and test on such project.
I'm looking for a tool (better if open source) able to scan the SVN repository and find new projects by itself.
A project can be "a SVN folder containing trunk, tags, branches subfolders".
Even better if the tool supports multistaged continous integration and build on demand.
Thanks
In general, projects tend to be just different enough to require the build system to be set-up manually. However, you could probably use something like Jenkins with some bash scripts to achieve what you're looking for; eg. if your SVN server has an HTML index of all the projects, you could set up a bash script to poll that page for changes then tell Jenkins to add a new project from a template.

Bamboo Integration

This is my second question on Bamboo (My First One). My understanding after reading suggested info, I need a build tool, like nAnt or MSbuild to write a script that gets the source code and builds it (I am working on a .net 3.5 with silverlight project). After, when deploying, I need to write scripts to move my files to the diff servers. Please tell me whether I am going in the right direction or not. Can I use ant, maven, bash scripts to do the same with a .net project?
Yes, that is true:
Bamboo is the central management server which coordinates all work
Bamboo itself has interfaces and plugins for lots of types of work
Bamboo basically needs to first get your source from a source repository (lots of plugins here for a variety of systems)
Then it needs to do the build - that can be done by using MSBuild to build your Visual Studio solution, or it could be a batch file to call your XYZ compiler and linker to create your app - whatever it is you have and use
Once your solution or project is built, you have "artifacts" (build results, e.g. executable app, config files, etc.) lying around
with those results, you can do additional things:
zip them up into a ZIP file and copy them somewhere
run a install builder on them and create an MSI
install them on a test server to make sure everything installs just fine
The sky's the limit! :-)
But in general: Bamboo is just the "orchestrator" - the coordinator. The actual work is done by either direct Bamboo plugins (of which there are plenty), or then you can call external command-line apps by means of a unix script or Windows batch file.
Marc