Does the “Pipelines of Pipelines” feature work between two different projects - jfrog-pipelines

I’m trying to trigger a pipeline job in Project B from another in Project A. Is this allowed?
Is it possible to use Pipelines of Pipelines feature for the same?

Yes, it's possible using the TriggerPipeline step, provided the project integration has permission to trigger that pipeline.
Reference: https://www.jfrog.com/confluence/display/JFROG/TriggerPipeline
This step takes projectKey as a configuration, so from project A you can trigger a step in project B

Related

How to select Solution file of a particular project to build in YAML pipeline?

I have two projects lets say A and B under one repository in azure Dev-ops. Each project has its own solution file.
The pipeline have tasks to build the solution and then upload the packages to the feed.
I want to select the solution file for project A if changes in pull requests are targeted for project A.
As of now i have created in a variable with default value and allowing user to override the variable name while triggering pipeline manually. PFB
But how to achieve same behavior to auto trigger the pipelines from
Pull Request. Is there any way to supply solution(.sln) name to
pipeline from pull request?
There is no way to implement that scenario within a single pipeline. Use two pipelines. Use different path filters to ensure the pipeline only triggers when appropriate paths change.

How to start Azure pipeline from another pipeline in another project?

I have 2 projects in Azure DevOps and 1 pipeline in each of them.
I start pipeline in the first project manually.
I need this started pipeline to start another pipeline in the second project.
I cannot use $(System.AccessToken) in the REST API call because I get a http 401 error. I suppose due to different project.
How can I start second pipeline? Any automatic way is acceptable.
You can use the Trigger Build Task extension, it allows to trigger a build in a different team project.

How to deploy to a server without build a projekt

We have an ImageVault website that we do not develop ourselves. But want version management in TFS and be able to publish against tests and production servers.
It does not need to be built because it is already finished.
How should you set up a building when you should not build anything?
Is it possible to set up a pipeline without having a building?
It is possible to set up a pipeline that doesnot build your project. You project is built by the build tasks in the pipeline. You can just disable or exclude the build tasks from your pipeline if you donot want your project be built.
You can also create an empty pipeline without any tasks inside. You can follow below steps to create an empty pipeline.
1,Sign in to your Azure DevOps organization and navigate to your project.
2,In your project, navigate to the Pipelines page. Choose the Pipelines tab and click new pipeline on the top right corner of the page.
3,Walk through the steps of the wizard by first selecting the location of your source code.(You can create a classic UI pipeline by choosing "Use the classic editor to create a pipeline without YAML".)
4,Then choose to start with An Empty Job under Select a template
With above steps, a pipeline without build tasks is created. You can then add some utility tasks like copy file task, publish artifacts task etc. Utility tasks donot do the building work.
You might need to add some utility tasks like publish build artifacts tasks if you want to deploy release pipeline.
Check here to learn more about creating your pipeline

Automatically Tagging a PR Build in Azure Devops

I have branch validation in the form of a PR Build, which means I have duplicated my original build and removed some steps (such as pushing to my docker registry).
I would prefer to simply be able to automatically add a tag / some kind of identifier to a PR build and exclude the step on the original build using custom conditions.
Does anyone know if this is possible, and if so how to achieve it? I'd really rather not duplicate each and every build.
If I understand your question correctly, you would like to run a build step based on a custom condition. In this case, the custom condition is whether the build is a PR build or not.
You can check the pre-defined build variables available in Azure Devops here and you can see that there is a Build.Reason variable.
I am listing a few variables here.
Manual: A user manually queued the build.
IndividualCI: Continuous integration (CI) triggered by a Git push or a TFVC check-in.
PullRequest: The build was triggered by a Git branch policy that requires a build.
You can specify the condition in custom condition settings of your build step like this.
More examples available in the docs

How to publish artifacts separately for each project in solution from VSTS CI pipeline?

In my solution, I have two projects (a Asp.net MVC and a Windows Service). I want to create CI/CD pipeline to deploy web application and windows service on different VMs. But to achieve this my CI pipeline should be able to publish artifacts separately for both project and then I can feed these artifacts in CD pipeline for deployment. How artifacts for all projects can be published separately in a CI pipeline ?
PS: If I create two solutions each with one project only and create CI/CD pipeline separately, all works fine. But I want to achieve it with solution having multiple project as mentioned above.
You can use multiple, Publish tasks to create multiple artifacts in a single build definition.
For example lets say, you have below, as your current artifacts for a single project, comprising of _PublishedWebsites\MVS5WebApp (XCopy deployable website) and _PublishedWebsites\MVS5WebApp_Package (web deploy package).
If you want to separate these two, into two artifacts, you can use two Publish Artifact tasks as shown below, each one specifying exact path to publish (this path does not support wildcards, you just have to specify the folder you need to publish)
This will give you output as shown below.
In this example I just only used the Publish Artifacts task and created two artifacts using a single web site project. You can do same for your two project scenario. If you want to use wild card to filter more files before publish you can use "Copy File" task multiple times as required.
If you are using '.net core' task in the build pipeline then uncheck the checkbox 'Publish web projects' just after the command textbox.
Then it automatically creates publish artifacts separate for each project in the solution with the same name as each of the project files.
You have multiple ways to achieve that.
You can either create multiple build definitions targeting the project and not the solution in the build step with the proper arguments.
Or you can have one build definition with multiple build steps.
After that on the release side of things you can either leverage one release definition with multiple steps or multiple release definitions.