tag:help.appveyor.com,2012-11-13:/discussions/questions/41311-how-to-combine-multiple-yaml-files-multiple-build-images-os-compilers-and-scripts-into-oneAppVeyor: Discussion 2020-04-03T18:44:43Ztag:help.appveyor.com,2012-11-13:Comment/475811512019-09-02T20:05:23Z2019-09-02T20:05:23ZHow to combine multiple yaml files (multiple build images, OS, compilers and scripts) into one<div><p>Let me try to address some of our questions:</p>
<ol>
<li>There is no need to combine all yamls into one for committing it to version control. you can commit them with different names and then set "Custom configuration .yml file name" setting in your projects.<br></li>
<li>It is possible though quite tricky to set up several build jobs to wait for each other.<br></li>
<li>
<p>Instead, may I suggest you split your build process between two projects:<br>
a. first one builds artifact in Ubuntu images and on success starts the second project via <a href="https://www.appveyor.com/docs/api/">Appveyor REST API</a>. b. the second project build with MinGW/Cygwin</p>
<p>You may find working example in <a href="https://github.com/appveyor/build-images">https://github.com/appveyor/build-images</a>: a. first project is configured to use <a href="https://github.com/appveyor/build-images/blob/master/appveyor-container.yml">https://github.com/appveyor/build-images/blob/master/appveyor-conta...</a>. It builds a docker image and on success starts a project named "build-images" and even pass a couple of variables to it. b. second project "build-images" uses <a href="https://github.com/appveyor/build-images/blob/master/appveyor.yml">https://github.com/appveyor/build-images/blob/master/appveyor.yml</a></p>
</li>
<li>
<p>In appveyor-2.yml you can use <a href="https://www.appveyor.com/docs/build-configuration/#specializing-matrix-job-configuration">Matrix job configuration</a> and get rid of <code>if "%BUILD_TYPE%"</code> clauses.</p>
</li>
<li>
<p>for notification emails have you looked into this <a href="https://www.appveyor.com/docs/notifications/#adding-custom-value-to-notification">little trick</a>?</p>
</li>
</ol></div>Wasa Pleshakovtag:help.appveyor.com,2012-11-13:Comment/475811512019-09-12T21:48:32Z2019-09-12T21:48:32ZHow to combine multiple yaml files (multiple build images, OS, compilers and scripts) into one<div><p>Thank you Wasa for the hints. I think I'm going with the approach of one "master" project and started build via API. One thing that I'm not sure about: how to pass the complete URL from an artifact in project A to project B?</p></div>humantag:help.appveyor.com,2012-11-13:Comment/475811512019-09-13T17:08:08Z2019-09-13T17:08:08ZHow to combine multiple yaml files (multiple build images, OS, compilers and scripts) into one<div><p>Can you clarify what you mean by "pass the complete URL from an artifact in project A to project B". Do you mean you want to download an artifact from one build into another?</p></div>Owen McDonnelltag:help.appveyor.com,2012-11-13:Comment/475811512019-09-13T18:37:53Z2019-09-13T19:36:11ZHow to combine multiple yaml files (multiple build images, OS, compilers and scripts) into one<div><blockquote>
<p>Do you mean you want to download an artifact from one build into another?</p>
</blockquote>
<p>Yes, totally. The only option I found so far is to always download the latest artifact (which always is translated to the actual url internally), but this results in multiple problems. It is important to have the URL that came from the original build in "project a" (especially for the case of rebuilds - where the same old artifact generated by the rebuild must be used, not the current one).</p>
<p>@Owen: I guess $env:APPVEYOR_JOB_ID is part of the solution for this.</p></div>humantag:help.appveyor.com,2012-11-13:Comment/475811512019-09-14T04:14:11Z2019-09-14T04:14:11ZHow to combine multiple yaml files (multiple build images, OS, compilers and scripts) into one<div><p>There are several ways to do this depending on what differentiates the job from which you are trying to download an artifact.</p>
<p><a href="https://www.appveyor.com/docs/api/samples/download-artifacts-ps/">Here</a> is the script from our docs. <a href="https://help.appveyor.com/discussions/support/2561-download-build-artifacts-from-another-job">Here</a> is a customized version for a user wanting to get the artifact from an Ubuntu build job. <a href="https://help.appveyor.com/discussions/questions/19858-accessing-build-artifacts-from-one-project-in-another">Here</a> is a non powershell example.</p></div>Owen McDonnell