Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
882100d478
|
No files matched your search
@@ -118,7 +118,8 @@ Maven jobs use machine executors with Docker pre-installed. Tests using Testcont
|
||||
|
||||
The QBit profile runs Maven verification without publishing when a single-parent
|
||||
`ci: ...` or `ci(scope): ...` commit changes only `.qqq-ci.yml`,
|
||||
`.circleci/config.yml`, or `.github/workflows/codeql.yml`. This applies on
|
||||
`.circleci/config.yml`, `.github/workflows/codeql.yml`, or
|
||||
`.github/workflows/release-rc.yml`. This applies on
|
||||
main, develop, release, and hotfix branches. The normal test job still runs,
|
||||
including on branches normally excluded from feature tests, and reports through
|
||||
the required `verify` workflow.
|
||||
|
||||
@@ -190,7 +190,8 @@ def proven_ci_maintenance(branch, tag):
|
||||
changed = git("diff", "--no-ext-diff", "--no-renames", "--name-only", "-z", base, "HEAD")
|
||||
if not changed:
|
||||
return False
|
||||
allowed = {b".qqq-ci.yml", b".circleci/config.yml", b".github/workflows/codeql.yml"}
|
||||
allowed = {b".qqq-ci.yml", b".circleci/config.yml", b".github/workflows/codeql.yml",
|
||||
b".github/workflows/release-rc.yml"}
|
||||
return all(path in allowed for path in changed.rstrip(b"\0").split(b"\0"))
|
||||
|
||||
|
||||
|
||||
@@ -190,7 +190,8 @@ def proven_ci_maintenance(branch, tag):
|
||||
changed = git("diff", "--no-ext-diff", "--no-renames", "--name-only", "-z", base, "HEAD")
|
||||
if not changed:
|
||||
return False
|
||||
allowed = {b".qqq-ci.yml", b".circleci/config.yml", b".github/workflows/codeql.yml"}
|
||||
allowed = {b".qqq-ci.yml", b".circleci/config.yml", b".github/workflows/codeql.yml",
|
||||
b".github/workflows/release-rc.yml"}
|
||||
return all(path in allowed for path in changed.rstrip(b"\0").split(b"\0"))
|
||||
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class MaintenanceTests(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.subject = b'ci: use central pipeline\n'
|
||||
self.parents = b'a'*40 + b' ' + b'b'*40 + b'\n'
|
||||
self.paths = b'.qqq-ci.yml\0.circleci/config.yml\0.github/workflows/codeql.yml\0'
|
||||
self.paths = b'.qqq-ci.yml\0.circleci/config.yml\0.github/workflows/codeql.yml\0.github/workflows/release-rc.yml\0'
|
||||
|
||||
def test_publishing_branches_keep_unfiltered_maven_tests(self):
|
||||
manifest = {'profile': 'qbit', 'orb_version': '0.7.14', 'default_branch': 'develop',
|
||||
@@ -35,7 +35,7 @@ class MaintenanceTests(unittest.TestCase):
|
||||
self.assertNotIn('branch_type', job)
|
||||
|
||||
def test_application_changes_and_unknown_files_publish_normally(self):
|
||||
for paths in (b'pom.xml\0', b'.qqq-ci.yml\0src/Main.java\0', b'.github/workflows/release-rc.yml\0', b'', None):
|
||||
for paths in (b'pom.xml\0', b'.qqq-ci.yml\0src/Main.java\0', b'.github/workflows/custom-release.yml\0', b'', None):
|
||||
self.paths = paths
|
||||
with mock.patch.object(pipeline, 'git', side_effect=self.git_result):
|
||||
self.assertFalse(pipeline.proven_ci_maintenance('release/0.1', ''))
|
||||
|
||||
@@ -204,7 +204,10 @@ class PipelineTests(unittest.TestCase):
|
||||
|
||||
def test_ci_maintenance_source_and_packed_keep_verification(self):
|
||||
self.write_manifest(test_branch_policy="feature-no-hotfix", publish={"hotfix": True})
|
||||
self.git("add", ".qqq-ci.yml")
|
||||
workflow = self.repo / ".github/workflows/release-rc.yml"
|
||||
workflow.parent.mkdir(parents=True)
|
||||
workflow.write_text("# central RC caller migration\n", encoding="utf-8")
|
||||
self.git("add", ".qqq-ci.yml", ".github/workflows/release-rc.yml")
|
||||
self.git("-c", "commit.gpgsign=false", "commit", "-qm", "ci: adopt central pipeline")
|
||||
for branch in ("develop", "release/0.1", "hotfix/0.1.1"):
|
||||
result = self.render(CIRCLE_BRANCH=branch)
|
||||
|
||||
Reference in new issue
Block a user