I used:
on:
branch: master
appveyor_repo_tag: true
in my deploy:, to only deploy when a tag is made on
the master branch. But no deployment was made when I
did:
git tag -a appveyor-test
git push --tags
I noticed that somehow Appveyor thinks it's building a branch
called appveyor-test, even if no such branch exists
(only a tag with that name exists). See the attached screenshot,
notice how it thinks both the branch name and tag name is
appveyor-test, even if the tag was made on
master.
I've now removed the branch: master to avoid this
problem. But why is it thinking my tag was pushed on an
appveyor-test branch in the first place?
My current .appveyor.yml is at
https://github.com/estan/protoc-gen-doc/blob/master/.appveyor.yml.
-
build-on-tag.png
19.7 KB

#1 Posted by elvstone on 12 Jan, 2016 02:41 PM
To clarify, the tag-triggered build that puzzles me is:
https://ci.appveyor.com/project/estan/protoc-gen-doc/build/1.0.12
As you can see by the end of the build, it skipped the deployment because it thinks the branch is
appveyor-test, notmaster:But I clearly have no such branch: https://github.com/estan/protoc-gen-doc/branches ,
appveyor-testis the name of the tag that was made frommaster, not the name of a branch.This build was made when I still had the
branch: masterin.appveyor.yml.#2 Posted by Feodor Fitsner Support staff on 12 Jan, 2016 06:08 PM
AppVeyor sets the name of the branch to tag name if there was no information about tag's base branch in webhook request. You can check request payload in "Recent deliveries" of webhook on GitHub.
#3 Posted by Chris Simmons on 18 Feb, 2016 09:24 PM
I'm seeing the same behavior. My setup is exactly like elvstone's example, with a deployment firing on the master branch but only for tags.
I can see the GitHub webhook payloads like you mention. Where would this "information about tag's base branch" be found in the payload? For example, in the webhook that fired on the tag from mine, I see nothing referencing "master."
At this point, I don't see how the example in this documentation link would work:
https://www.appveyor.com/docs/branches#build-on-tags-github-only
#4 Posted by Feodor Fitsner Support staff on 18 Feb, 2016 10:21 PM
It's in
base_refproperty of webhook payload. If you tag through GitHub web UI thenbase_refis set.#5 Posted by Chris Simmons on 18 Feb, 2016 11:22 PM
Ah, I see. That's the issue. I'm pushing tags from SourceTree and all the base_ref values from the push event payloads are null.
Thanks for the clarification.
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:04 AM.