diff options
| author | Daniel P. Berrangé <berrange@redhat.com> | 2022-05-04 17:19:34 +0100 |
|---|---|---|
| committer | Daniel P. Berrangé <berrange@redhat.com> | 2022-05-11 13:22:06 +0100 |
| commit | 09c27ce0d90634ae8629cffbb6616a58cbc1f771 (patch) | |
| tree | ef73c1b4e16ceb4a43a48e8838c7932ab4747e14 | |
| parent | 8602a1d2dfa02a97074b04f5f47ed2e585f650a6 (diff) | |
| download | libvirt-ci-09c27ce0d90634ae8629cffbb6616a58cbc1f771.zip libvirt-ci-09c27ce0d90634ae8629cffbb6616a58cbc1f771.tar.gz libvirt-ci-09c27ce0d90634ae8629cffbb6616a58cbc1f771.tar.bz2 | |
lcitool/manifest: create a 'ci/gitlab' subdirectory
This subdirectory is going to be populated with files that are included
from the main ci/gitlab.yml file.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
| -rw-r--r-- | guests/lcitool/lcitool/manifest.py | 9 | ||||
| -rw-r--r-- | guests/lcitool/tests/test_manifest.py | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/guests/lcitool/lcitool/manifest.py b/guests/lcitool/lcitool/manifest.py index 07b011d..964ea94 100644 --- a/guests/lcitool/lcitool/manifest.py +++ b/guests/lcitool/lcitool/manifest.py @@ -251,11 +251,9 @@ class Manifest: util.atomic_write(path, lines) def _generate_gitlab(self, dryrun): - outdir = Path(self.basedir, self.cidir) + gitlabdir = Path(self.cidir, "gitlab") if not dryrun: - outdir.mkdir(parents=True, exist_ok=True) - - gitlabfile = Path(self.cidir, "gitlab.yml") + Path(self.basedir, gitlabdir).mkdir(parents=True, exist_ok=True) have_native = False have_cross = False @@ -304,7 +302,8 @@ class Manifest: gitlabcontent.extend(self._generate_gitlab_cross_build_jobs()) gitlabcontent.extend(self._generate_gitlab_cirrus_build_jobs()) - self._replace_file(gitlabcontent, gitlabfile, dryrun) + path = Path(self.cidir, "gitlab.yml") + self._replace_file(gitlabcontent, path, dryrun) def _generate_gitlab_container_jobs(self, cross): jobs = [] diff --git a/guests/lcitool/tests/test_manifest.py b/guests/lcitool/tests/test_manifest.py index 8e16e57..b12af84 100644 --- a/guests/lcitool/tests/test_manifest.py +++ b/guests/lcitool/tests/test_manifest.py @@ -104,7 +104,7 @@ def test_generate(monkeypatch, custom_projects): def assert_operations(): # Verify which directories we expect to be created - assert_mkdir(Path("ci")) + assert_mkdir(Path("ci", "gitlab")) assert_mkdir(Path("ci", "containers")) assert_mkdir(Path("ci", "cirrus")) |
