Skip to content

Commit

Permalink
Reduce input manifest build frequency for new upcoming versions (#2231)
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <[email protected]>
  • Loading branch information
peterzhuamazon authored Jun 22, 2022
1 parent 2b883e2 commit 570a8ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/manifests_workflow/input_manifests.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def add_to_cron(self, version: str) -> None:
with open(jenkinsfile, "r") as f:
data = f.read()

cron_entry = f"H/10 * * * * %INPUT_MANIFEST={version}/{self.prefix}-{version}.yml;TARGET_JOB_NAME=distribution-build-{self.prefix}\n"
cron_entry = f"H 1 * * * %INPUT_MANIFEST={version}/{self.prefix}-{version}.yml;TARGET_JOB_NAME=distribution-build-{self.prefix}\n"

if cron_entry in data:
raise ValueError(f"{jenkinsfile} already contains an entry for {self.prefix} {version}")
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_manifests_workflow/test_input_manifests.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def test_add_to_cron(self, mock_open: MagicMock) -> None:
mock_open.assert_has_calls([call(InputManifests.cron_jenkinsfile(), 'w')])
mock_open.assert_has_calls([call(InputManifests.cron_jenkinsfile(), 'r')])
mock_open().write.assert_called_once_with(
f"parameterizedCron '''\n{' ' * 12}H/10 * * * * %INPUT_MANIFEST=0.1.2/test-0.1.2.yml;TARGET_JOB_NAME=distribution-build-test\n"
f"parameterizedCron '''\n{' ' * 12}H 1 * * * %INPUT_MANIFEST=0.1.2/test-0.1.2.yml;TARGET_JOB_NAME=distribution-build-test\n"
)

def test_create_manifest_with_components(self) -> None:
Expand Down

0 comments on commit 570a8ce

Please sign in to comment.