Option: Empty Default branch to be the most recent commit from the Branches to build, settings.
Hi,
see this pic:
I look at these two settings as:
Default Branch : when ever i manually
push the BUILD button in AV, it will git clone etc from that
branch.
Branches to build : when a git webhook is sent to
AV, AV will decide if it should git clone, based on the
settings, here.
Would be awesome if Default Branch could have the option to get the latest commit from whatever setting is in Branches to build.
For example. I have:
branches:
exclude:
- master
so when i manually press the build button in AV, it
will grab the most recent commit that is NOT from the
master
branch. Boom! awesome!
Otherwise, set a value and it's the most recent commit from that branch (as is what's happening, now).
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
1 Posted by Pure Krome on 09 Jul, 2015 09:02 AM
Also - are the Default Branch & Branches to Build in the GUI totally separate and independant to the
branches:
section in theyml
? (my question above is suggesting they are linked...)ie.**Default Branch** & Branches to Build are used to determine if the build should start/kick off while the
branches:
section i the.yml
file is used to split out config data _AFTER the build has been determined to go ahead and start?eg.
master
kick off build (GUI Setting)Support Staff 2 Posted by Feodor Fitsner on 10 Jul, 2015 01:51 AM
"Default Branch" and "Branches to Build" are separate from those one in appveyor.yml. Basically, it's either UI or YAML there.
Regarding getting commit of "not master" - nice idea but I'm not sure if it's possible using GitHub API.
3 Posted by Pure Krome on 10 Jul, 2015 02:01 AM
So .. if it's UI or YAML .. if i go the YAML way, how does the AV service know when to pull down .. if using the file means it has to pull down first to find the file to check what branches to use?
Support Staff 4 Posted by Feodor Fitsner on 10 Jul, 2015 02:11 AM
It just fetches a single
appveyor.yml
at specified commit ID using GitHub API.5 Posted by Pure Krome on 10 Jul, 2015 02:24 AM
AH! winnah!!
so does that mean .. basically ... the only UI elements in the project settings are
the only settings that are NOT available via a YAML file?
6 Posted by Pure Krome on 10 Jul, 2015 02:29 AM
Also - another question about this..
if the AV service uses either the UI or the File ... what would the UI look like if i did this file setting in the UI
Basically, the UI has 2 settings .. and the file has 1?
Support Staff 7 Posted by Feodor Fitsner on 10 Jul, 2015 02:32 AM
Like that?
8 Posted by Pure Krome on 10 Jul, 2015 02:44 AM
How do you define the
default branch
in file?also, the previous q (above) about UI elements?
Support Staff 9 Posted by Feodor Fitsner on 10 Jul, 2015 02:49 AM
Ah, Default branch is on UI only. Sorry if I confused you.
10 Posted by Pure Krome on 10 Jul, 2015 03:53 AM
Sweet. ok. i've fired off a support query to GH to see if they have some GH Api :sparkle: magic that can do this :)
11 Posted by Pure Krome on 10 Jul, 2015 06:28 AM
OK . GH replied. First, their reply, them my comment...
Right now, my repo's look like they have WebHooks wired up already, so you could leverage the
Push Event
that occurs with the webhook and just read what branch the commit occurred against:https://developer.github.com/v3/activity/events/types/#pushevent
and then use the
ref
payload value :)WIN!
12 Posted by Pure Krome on 14 Jul, 2015 01:07 AM
Also - if it's possible to do this ... then this could also be added to a YAML file?
^ where any is a reserverd word (documented) or that value can be left empty... (as the title of this post, suggested)
Support Staff 13 Posted by Feodor Fitsner on 14 Jul, 2015 01:10 AM
Push event is wired anyway. As far as I understand their suggestion is to collect information about pushes and then use last push. It won't work if webhook disabled. I'd leave default branch on UI.
14 Posted by Pure Krome on 14 Jul, 2015 01:15 AM
But ... nothing would work if the webhook is disabled? that's how AV works, right?
Support Staff 15 Posted by Feodor Fitsner on 14 Jul, 2015 01:21 AM
You can start new builds with "New build" button - many users do manual or scheduled builds.
16 Posted by Pure Krome on 14 Jul, 2015 01:35 AM
but doesn't that button just read the value of the
Default branch
.. which might defeat the purpose of what I'm trying => eg. run a new build of the most recent commit. (well, that's usually what i want to try and do).side note: i do understand the process when people want to push a button, to manually kick of a live/production build/deployment.
Support Staff 17 Posted by Feodor Fitsner on 14 Jul, 2015 01:50 AM
Yes, it reads default branch and gets the latest commit from that branch. Looks like what you are trying to do can be accomplished by going to a history and clicking "Re-build commit" on the top most one.
18 Posted by Pure Krome on 14 Jul, 2015 04:42 AM
NP. i'll close this off then. Cheers for walking through the discussion with me.
Pure Krome closed this discussion on 14 Jul, 2015 04:42 AM.