Problem parsing yml configuration on Conditional build configuration
Hi, I have recently switched to Conditional build config instead of separate build config, but I have been having issues with parsing the config file.
I kept getting error parsing at the line where the first -
is (line 7)
Full yml config is attached below.
The current config looks something like this:
version: '#{build}'
pull_requests:
do_not_increment_build_number: true
skip_tags: true
skip_branch_with_pr: true
image: Visual Studio 2022
-
branches:
only:
- preview
configuration: Release
platform: x64
//proceeding install, clone, build script, artifact, and deploy config for preview branch
-
branches:
only:
- stable
configuration: Publish
platform: x64
//proceeding install, clone, build script, artifact, and deploy config for preview branch
-
- appveyor_(3).yml 11 KB
Comments are currently closed for this discussion. You can start a new one.
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
Support Staff 1 Posted by Owen McDonnell on Jan 11, 2024 @ 09:35 PM
I think what your missing is a
Lots more details in this blog postfor:
keyword before the first conditional config. Some indentation might not be necessary but recommended.2 Posted by dzakibagus on Jan 12, 2024 @ 07:30 AM
I see, my bad I was only reading the top "2nd approach requires appveyor.yml of the following format:" section where the
for:
is not mentioned, so I was a bit confused. Adding thefor:
fixed the issue and it builds just fine now.Another question is how to disable the build for other branch except
stable
andpreview
? I already added it to the "branches to build: Only branches specified below" section but it still tries to build other branchSupport Staff 3 Posted by Owen McDonnell on Jan 12, 2024 @ 07:11 PM
White/Black listing branches is described here.
Feodor Fitsner closed this discussion on Mar 13, 2024 @ 09:02 PM.