简体   繁体   中英

Why Not TeamCity Building Project With Last Commit?

I'm new in TeamCity and using it to build and get war file from source code that is in the Github Repo. I set up a VCS trigger to build automatically project when I commit to my Java web project. On VCS trigger I only checked " Trigger a build on each check-in" box. When I send a commit, the build starts but not with latest commit. The build starts with commit that before the latest commit. I haven't got Branch specification on Version Control Settings. How can TeamCity build the project with latest commit? Where is the problem?

You don't need Trigger a build on each check-in . The purpose of it is:

If you have fast builds and enough build agents, you can make TeamCity launch a new build for each check-in ensuring that no other changes get into the same build. To do that, select the Trigger a build on each check-in option.

You can disable it.

Are you sure TeamCity builds one commit behind?

Read you build log. Find a section called Collecting changes and logs which say Latest commit attached to build configuration and Computed revision . These two guys should point to your master git hash (I assume refs/heads/master is your default branch in VCS settings).

You can also force TeamCity to build from specific point.

Try to hit "three dots icon" next to "Run" button and go to "Changes" tab. Select your "default branch" or "latest changes at the moment the build is started".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM