Run Pipeline Button disabled - pipeline

I am new to Azure DevOps Pipeline. I have connected to a bitbucket repo and running against master for the build works fine.
I am trying to manually run against a branch. I choose the correct branch from branch/tag and I see that the "Run" button is disabled. If I choose "master" it is enabled.
What am I missing?

So you may not have the same issue I had but it's definitely one cause.
Lets say you start with a branch called "master" and a build pipeline called "Build Master" which uses an YAML file called "azure-pipelines.yml".
If like me you created a feature branch before setting up the build for the master branch then your feature branch won't have the azure-pipelines.yml file.
To make the "Run" enabled make sure when using the "Build Master" pipeline that the branch you are trying to build has an azure-pipelines.yml file in as it will use that yml file for the build and not the one in the "master" branch. If it doesn't then I just created one in the branch and copied over the contents from the master branch.
Hope that makes sense.

Related

Ctrl-r do not run when the build directory has been changed

By default the build directory of a project is a sibling, withing the same directory than the project himself.
To have a better organisation in my backup process, I have moved the defaut build path in a directory which is sibling of the parent directory of all my projects. The compilation default path has been updated accordingly.
Now I only backup my projects, without the builds.
The problem I'm facing now is about the execute key combo Ctrl-r for which I get the compilation progress bar, but in fact, the project is not compiled now. This is confirmed because the compiled files do not update within the buid directory.
The only way, now, to update compilation is through the menu Build-> build all. It works but without key binding and I need after to execute.
Is there a way to recover Ctrl-r when changing the build directory path ?
Thanks for help
When you run a project from Qt Creator, it gets rebuilt only if needed, as clearly stated here:
Run configurations start the application in the location where it was
copied by the deploy configuration. By default, when you select the
Run function, Qt Creator builds the project, deploys it to the device
defined in the kit, and runs it there. However, if you have not made
any changes to the project since you last built and deployed it, Qt
Creator simply runs it again.
The only way to force build is to issue the rebuild command explicitely (you can use the Ctrl-B shortcut for that purpose).
If the default build directory is changed (in Tools>Options>Build & Run>General) this setting will apply (as a default) for subsequently created projects. Existing projects will keep their build directory, as specified in the project Build Settings.
You may also want to check if the options
Always build project before deploying it
Always deploy project before running it
in Tools>Options>Build & Run>General are set.
Sometimes, editing a header file does not trigger a build, even if the file is included in some cpp file. To solve this issue in Qt Creator, just add a line like this to the pro file:
DEPENDPATH += path/to/the/header(s)

Precompiling and Deploying website from Visual Studio Team Services

We're using Visual Studio Team Services with Git as the source control system and I've configured a build which executes successfully online. Ideally I'd like to:
After building the site in VSO, precompile and dump the aspx and .dll files to the git repository
On the on-premises web server, pull from git and move to our staging site
The second part I can figure out on my own, but the documentation for VSTeam seems sketchy on how to dump the compiled sources to git. I've kept the default build configration almost the same as the default with the exception of a Powershell script which is supposed to create artifacts for the drop. Despite this, the drop.zip file create is empty.
The following is how my build definition is set up in VSO.
Instead of the PowerShell script, you'd be able to use the "Copy and Publish artefacts" and have it create a specific artefact with the specific bits you need:
This will automatically create a named build artefact which you can then use from Release Management as an input.
The PowerShell script was used in the XAML builds when used with the "Project Output | As Configured" option.
To create your "packaged" website, you need to add a couple of parameters to the MsBuild/Visual Studio Build step to instrict the compiler to package your website:
/p:DeployOnBuild=true /p:DeployTarget=Package
/p:SkipInvalidConfigurations=true /p:PackageAsSingleFile=false
/p:AspNetCompileMerge=true
Optionally you can configure your target directory as well using
/p:PackageLocation="$(Build.BinariesDirectory)\Published"
If you do this, you need to configure this directory as your copy root in the copy and publish task.
I did a quick look at the Power-Shell script, there are two issues with it:
It still use the variables like "$Env:TF_BUILD_SOURCESDIRECTORY" which does not exist in VSTS(VSO). See Variables for VSTS.
It copies the files from "BUILD_SOURCESDIRECTORY" folder to "BUILD_BINARIESDIRECTORY". But the "Publish Build Artifacts" step in your definition publish the files in "BUILD_ARTIFACTSTAGINGDIRECTORY" folder.
So if you want to use this script, you need to update the script to remove the "TF_" string in the variables and update the "Publish Build Artifacts" step to publish the files in "BUILD_BINARIESDIRECTORY" folder(Set Path to Publish to: $(Build.BinariesDirectory)).
However, if you want to copy and publish the website files, you can simply add one more argument in "MSBuild Arguments" section of "Visual Studio Build" step:
"/p:outdir=$(build.artifactstagingdirectory)"
Remove the Power-Shell script step and the other steps just keep default settings.
Or you can also change the settings of "Copy Files" steps to select the files/folders you'd like to copy.

Deploying specific TeamCity build Arifact using Build Master

We use Team City as our CI server and Build Master as our deployment mechanism. I have a project that builds and runs test on teamcity and creates a release-0.0.%build.number%.zip.
How do i instruct Build Master to get the latest release-0.0.%build.number%.zip?
Currently I use Create Build Artifact which collects files from a directory, but this is causing problems for us. I already have the artifact as a .zip and just want to deploy that.
Have you looked at the TeamCity Extensions? The idea that immediately comes to mind is to use the Get TeamCity Artifact action, which has the option to use latest Build or specify a variable. This might be easiser than pulling from disk, too.

setup wizard silent argument

I have a solution that contains a setup project(made with VS2008 setup wizard). I need to have the option to silently install the setup project. I read that in order to do this, I should delete the User Interface screens. But this will make my setup project ONLY silent. I need it to be available to be used normally (non-silent), and when called with a specific argument, to be silent.
So my 2 questions:
How can I pass arguments to the setup project?
How can I create a silent install procedure, while also keeping the normal setup, when the project is called with no argument?
If there are resources on the web, please point me to them.
Setup exe can usually be run in silent mode using:
setup.exe /q
MSI can be run in silent mode using:
msiexec /qn /i setup.msi

Can you configure TeamCity "Artifacts" to be checked back into source control?

I would like to have TeamCity Artifacts be checked back into source control.
I have used TFS Integrator before. So I am used to its approach where, through config, it can check in the output builds back into source control. Then when people do a get they will receive these artifacts.
Or is there a completely different way of achieving this with TeamCity?
The two ways I can think of are
VCS Labeling
specify a path in your working directory to label and the location relative to the trunk to check it in. jetbrains explains it here
/project/trunk/dist=>/project/tags/%system.build.number%
from the build script
manually checkin the artifacts from the build script and add an ignore to the place where your checking in to so it doesn't trigger the build again.
e.g. use -:user=devA:project/sources/** to prevent build triggering after a change of VCS user devA made in subfolder project/sources/**

Resources