appveyor / ci

AppVeyor community support repository
https://www.appveyor.com
344 stars 66 forks source link

Troubleshooting build/release on tags #1846

Open matthewkmayer opened 7 years ago

matthewkmayer commented 7 years ago

I'm working on publishing Windows versions of release-party and only want to do that for git tags.

It appears I've got some Appveyor settings telling it to skip tags, as I can create a tag, push to GitHub and a new build will not fire off. I see this in the build output when I re-run a build on the same commit but was caused by a push to the branch:

"GitHub" deployment has been skipped as environment variable has not matched ("appveyor_repo_tag" is "false", should be "true")

I see GitHub has delivered a webhook successfully to Appveyor with a 204 response code:

{
  "ref": "v0.3.1+n",
  "ref_type": "tag",
  "master_branch": "master",
  "description": "Release party automation",
  "pusher_type": "user",
  "repository": {
    "id": 83238361,
    "name": "release-party-BR",
    "full_name": "matthewkmayer/release-party-BR",
    "owner": {
      "login": "matthewkmayer",
      "id": 4998189,
      "avatar_url": "https://avatars1.githubusercontent.com/u/4998189?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/matthewkmayer",
      "html_url": "https://github.com/matthewkmayer",
      "followers_url": "https://api.github.com/users/matthewkmayer/followers",
      "following_url": "https://api.github.com/users/matthewkmayer/following{/other_user}",
      "gists_url": "https://api.github.com/users/matthewkmayer/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/matthewkmayer/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/matthewkmayer/subscriptions",
      "organizations_url": "https://api.github.com/users/matthewkmayer/orgs",
      "repos_url": "https://api.github.com/users/matthewkmayer/repos",
      "events_url": "https://api.github.com/users/matthewkmayer/events{/privacy}",
      "received_events_url": "https://api.github.com/users/matthewkmayer/received_events",
      "type": "User",
      "site_admin": false
    },
    "private": false,
    "html_url": "https://github.com/matthewkmayer/release-party-BR",
    "description": "Release party automation",
    "fork": false,
    "url": "https://api.github.com/repos/matthewkmayer/release-party-BR",
    "forks_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/forks",
    "keys_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/keys{/key_id}",
    "collaborators_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/collaborators{/collaborator}",
    "teams_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/teams",
    "hooks_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/hooks",
    "issue_events_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/issues/events{/number}",
    "events_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/events",
    "assignees_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/assignees{/user}",
    "branches_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/branches{/branch}",
    "tags_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/tags",
    "blobs_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/git/blobs{/sha}",
    "git_tags_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/git/tags{/sha}",
    "git_refs_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/git/refs{/sha}",
    "trees_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/git/trees{/sha}",
    "statuses_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/statuses/{sha}",
    "languages_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/languages",
    "stargazers_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/stargazers",
    "contributors_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/contributors",
    "subscribers_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/subscribers",
    "subscription_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/subscription",
    "commits_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/commits{/sha}",
    "git_commits_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/git/commits{/sha}",
    "comments_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/comments{/number}",
    "issue_comment_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/issues/comments{/number}",
    "contents_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/contents/{+path}",
    "compare_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/compare/{base}...{head}",
    "merges_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/merges",
    "archive_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/{archive_format}{/ref}",
    "downloads_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/downloads",
    "issues_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/issues{/number}",
    "pulls_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/pulls{/number}",
    "milestones_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/milestones{/number}",
    "notifications_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/notifications{?since,all,participating}",
    "labels_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/labels{/name}",
    "releases_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/releases{/id}",
    "deployments_url": "https://api.github.com/repos/matthewkmayer/release-party-BR/deployments",
    "created_at": "2017-02-26T20:28:11Z",
    "updated_at": "2017-03-23T21:10:00Z",
    "pushed_at": "2017-10-05T02:55:16Z",
    "git_url": "git://github.com/matthewkmayer/release-party-BR.git",
    "ssh_url": "git@github.com:matthewkmayer/release-party-BR.git",
    "clone_url": "https://github.com/matthewkmayer/release-party-BR.git",
    "svn_url": "https://github.com/matthewkmayer/release-party-BR",
    "homepage": null,
    "size": 65,
    "stargazers_count": 1,
    "watchers_count": 1,
    "language": "Rust",
    "has_issues": true,
    "has_projects": true,
    "has_downloads": true,
    "has_wiki": false,
    "has_pages": false,
    "forks_count": 0,
    "mirror_url": null,
    "open_issues_count": 5,
    "forks": 0,
    "open_issues": 5,
    "watchers": 1,
    "default_branch": "master"
  },
  "sender": {
    "login": "matthewkmayer",
    "id": 4998189,
    "avatar_url": "https://avatars1.githubusercontent.com/u/4998189?v=4",
    "gravatar_id": "",
    "url": "https://api.github.com/users/matthewkmayer",
    "html_url": "https://github.com/matthewkmayer",
    "followers_url": "https://api.github.com/users/matthewkmayer/followers",
    "following_url": "https://api.github.com/users/matthewkmayer/following{/other_user}",
    "gists_url": "https://api.github.com/users/matthewkmayer/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/matthewkmayer/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/matthewkmayer/subscriptions",
    "organizations_url": "https://api.github.com/users/matthewkmayer/orgs",
    "repos_url": "https://api.github.com/users/matthewkmayer/repos",
    "events_url": "https://api.github.com/users/matthewkmayer/events{/privacy}",
    "received_events_url": "https://api.github.com/users/matthewkmayer/received_events",
    "type": "User",
    "site_admin": false
  }
}

Resending the web hook doesn't make a build happen, so I figure it's something with how my project is configured. As far as I can tell my Appveyor config file is set up right but apparently not. I'd sure like a hand making this work! 😄

IlyaFinkelshteyn commented 7 years ago

@matthewkmayer could you please send specific time (with time zone) when webhook was sent? I want to check our traces. I am not sure how can I get exact time from here and it is pretty difficult to dig traces for long periods of time.

matthewkmayer commented 7 years ago

Sure thing! I redelivered the latest webhook Oct 7, 2017 10:10 AM Pacific time. I believe that's 10-07-2017 17:10 UTC.

JustArchi commented 7 years ago

Bump, I stumbled upon the same issue issue today. Last tag build that was built and deployed successfully was https://ci.appveyor.com/project/JustArchi/archisteamfarm/build/4645-master (3.0.3.4) yesterday. Today I created tag 3.0.3.5 and new build was not scheduled, I tried re-delivering webhook messages and also no go, finally I removed and pushed tag again generating new webhook message and that didn't work either. I didn't change any AppVeyor configuration bit since when it was working, it happened out of sudden. Normal commits are triggering build properly. Thank you.

JustArchi commented 7 years ago

I re-tagged my release at different point of time and it worked now.

It could be a coincidence, but my faulty tag had "merge branch" as last commit. In any case it works for me now.

matthewkmayer commented 7 years ago

Still seeing this. Here's my workflow:

I expect the tag push to kick off a new Appveyor build that publishes the artifact back to Github. This workflow is successful with TravisCI.

Latest tag push event is around 17:12:00 UTC Saturday, October 28, 2017.

The merge commit to master is correctly built but it's missing the tag that isn't pushed yet. I see this in the merge build logs:

"GitHub" deployment has been skipped as environment variable has not matched ("appveyor_repo_tag" is "false", should be "true")

Let me know if I can provide more info! 😄

JustArchi commented 7 years ago

Are you sure you're tagging latest commit and not hitting this?

Just making sure because it's what was happening in my case, and your description is very similar.

matthewkmayer commented 7 years ago

Thanks for the help!

It looks to be the latest commit:

$ git fetch $ git lg1 ( from https://stackoverflow.com/questions/1057564/pretty-git-branch-graphs )

*   1c46684 - (20 minutes ago) Merge pull request #71 from matthewkmayer/update-deps-bump-version - Matthew Mayer (HEAD -> master, tag: v0.3.2, origin/master, origin/HEAD)
|\  
| * a88f308 - (38 minutes ago) Update deps, bump to version 0.3.2. - Matthew Mayer (update-deps-bump-version)
|/  
*   94e270a - (4 days ago) Merge pull request #68 from matthewkmayer/update-readme - Matthew Mayer
JustArchi commented 7 years ago

Looks good, then perhaps it's some other issue, always worth a try 🙂.