-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TeamCity: update nightly workflow to use static branch #18447
Conversation
** WARNING **: This repository is generated by https://github.com/GoogleCloudPlatform/magic-modules. Any changes made directly to this repository will likely be overwritten. If you have further questions, please feel free to ping your reviewer or, internal employees, reach out to one of the engineers. Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments!
Have you have this PR's GHAs labelling your fork of the TPG repo and seeing if your TeamCity project is picking up the static named branch ok?
@SarahFrench From teamcity config change PR:
had to update the cronjob due to it being the same time as when the teamcity builds are triggered. This caused teamcity to filter before the job was completed. Fixed now by setting the cronjob to run at 3AM UTC. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving, but given that there are 2 workflows now you'll also need to add a new workflow in the google-beta repo that re-uses the teamcity-nightly-sweeper.yaml
workflow.
Next step lets make sure your TeamCity test project is able to pull in the new branches each night.
We got a successful branch creation and build from last night, we can see it here: https://hashicorp.teamcity.com/buildConfiguration/TerraformProviders_MauricioSTestProjectSameCommitNightlyTestsWork_GOOGLE_NIGHTLYTESTS_GOOGLE_PACKAGE_ACCESSAPPROVAL?branch=&mode=branches#all-projects I noticed that the sweeper didn't delete old branches, this was due to the filter not being updated. This PR already has the updated changes. I'll make a PR for beta repo but after one more cronjob trigger we can merge this. 👍🏼 |
Co-authored-by: Sarah French <15078782+SarahFrench@users.noreply.github.com>
merging after seeing successful branch creation and branch sweeping with new workflow method. Other changes that were made were done in teamcity config files. |
Continuation of #18241
An issue with TeamCity unable to perform updates on branchFilter spec resulted in the date itself not matching the nightly test branch created.
This is resolved with using a static branch filter (
+:UTC-*
) within teamcity configs. To make this work we'll create a branch such asUTC-2024-06-24
for use by TeamCity to run the nightly test. Once a considerable period of time has passed, a cronjob will trigger that renames theUTC-2024-06-24
->UTC-nightly-tests-2024-06-24
. The renaming is just for Github and allows us to only focus on one branch which must match both+:UTC-*
and-:UTC-nightly-tests-*
The update to the TeamCity branchFilter spec can be seen here: GoogleCloudPlatform/magic-modules#10785
Example run of the new workflows:
teamcity-nightly-workflow.yaml
teamcity-nightly-sweeper.yaml