Conditional pipelines

godrose's Avatar

godrose

27 Jan, 2019 02:22 PM

I'm trying to created several conditional pipelines for my solution. The basic description of my case is as follows:
- one repo
- 4 .sln files
- 1st pipeline: build solution A using config A1 (and run its unit tests if any), if this step succeeds build solution B using config B1 (and run its tests if any) o.w. fail the build (solution B depends on artifacts from solution A)
- 2nd pipeline: build solution C using config C1 (and run its unit tests if any)
- 3rd pipeline: build solution A using config A1 (and run its unit tests if any), if this step succeeds build solution D using config D1 (and run its tests if any), if this step succeeds build solution B using config B2 (and run its tests if any), o.w. fail the build (solution B depends on artifacts from solution A and D)
- 4th pipeline: build solution D using config D1 (and run its tests if any), if this step succeeds build solution C using config C2 (and run its tests if any) o.w. fail the build (solution C depends on artifacts from solution D)

I guess I will have to create 4 separate projects - each one for each pipeline and have them pointing at different .yml files.

I'm missing the knowledge of two subjects:
a) How can I point an appveyor pipeline to a file different from appveyor.yml
b) What is the syntax for conditionals inside the .yml file and how can I build more than one solution inside a pipeline

Thanks for any help.

  1. 1 Posted by godrose on 27 Jan, 2019 02:32 PM

    godrose's Avatar

    I'm trying to get some useful info using this link
    https://www.appveyor.com/docs/appveyor-yml/
    But can't find any option of "pipeline" syntax

  2. 2 Posted by godrose on 27 Jan, 2019 03:11 PM

    godrose's Avatar

    So I used the matrix approach but the build fails.
    My question is whether the two jobs run in the same physical/virtual machine? Do they share the file system?
    https://ci.appveyor.com/project/LogoFX/samples-specifications-rslg4/builds/21920308/job/4kmr0ctvk8iuu396

  3. Support Staff 3 Posted by Ilya Finkelshte... on 29 Jan, 2019 12:54 AM

    Ilya Finkelshteyn's Avatar

    Hi Gennady,

    AppVeyor instantiate new fresh VM for each job, and destroys it immediately after job finished.

    If you want to share artifacts between different jobs in the matrix, you can use it with AppVeyor API, check this sample. If you need one matrix job wait for another, check this sample (though in your case you probably need to make later job to wait for earlier one).

    Please feel free to ping with any additional questions.

    Side note: I checked your YAML and see APPVEYOR_BUILD_WORKER_CLOUD: GCE. Not sure what was the reason we recommended adding it, but I would try removing it now as all performance issues existed in our main datacenter are fixed and also you will enjoy fast build start in comparison to GCE.

    Ilya.

  4. 4 Posted by godrose on 29 Jan, 2019 08:28 AM

    godrose's Avatar

    Thanks, I will try this approach.
    Is this the only option of running multiple solution files?
    Any kind of “step” keywords to avoid uploading artifacts as they are actually used only by the subsequent job?

  5. Support Staff 5 Posted by Ilya Finkelshte... on 29 Jan, 2019 06:22 PM

    Ilya Finkelshteyn's Avatar

    Not right now. But sure we plans to add first class support for dependencies between jobs and artifact sharing. Cannot say ETA, but it is one of priorities.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac