diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e0a7f67..0d5e7d8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,16 +42,16 @@ fail: tags: - terraform -.terraform/openstack: +.terraform/gcp: extends: .base tags: - - terraform/openstack + - terraform/gcp stream9-qcow2-x86_64: stage: test - extends: .terraform/openstack + extends: .terraform/gcp variables: - RUNNER: rhos-01/fedora-43-x86_64 + RUNNER: gcp/fedora-43-x86_64 rules: - changes: - Schutzfile @@ -81,9 +81,9 @@ stream9-qcow2-aarch64: stream10-qcow2-x86_64: stage: test - extends: .terraform/openstack + extends: .terraform/gcp variables: - RUNNER: rhos-01/fedora-43-x86_64 + RUNNER: gcp/fedora-43-x86_64 rules: - changes: - Schutzfile @@ -113,9 +113,9 @@ stream10-qcow2-aarch64: stream10-installer-x86_64: stage: test - extends: .terraform/openstack + extends: .terraform/gcp variables: - RUNNER: rhos-01/fedora-43-x86_64-large + RUNNER: gcp/fedora-43-x86_64 rules: - changes: - Schutzfile @@ -207,9 +207,9 @@ rhel-10-gcp-x86_64: rhel-10-installer-x86_64: stage: test - extends: .terraform/openstack + extends: .terraform/gcp variables: - RUNNER: rhos-01/fedora-43-x86_64-large + RUNNER: gcp/fedora-43-x86_64 SUBSCRIPTION_NEEDED: true RH_REGISTRY_LOGIN_NEEDED: true rules: @@ -230,9 +230,9 @@ rhel-10-installer-x86_64: rhel-10-qcow2-x86_64: stage: test - extends: .terraform/openstack + extends: .terraform/gcp variables: - RUNNER: rhos-01/fedora-43-x86_64 + RUNNER: gcp/fedora-43-x86_64 SUBSCRIPTION_NEEDED: true RH_REGISTRY_LOGIN_NEEDED: true rules: @@ -268,9 +268,9 @@ rhel-10-qcow2-aarch64: hummingbird-qcow2-x86_64: stage: test - extends: .terraform/openstack + extends: .terraform/gcp variables: - RUNNER: rhos-01/fedora-43-x86_64 + RUNNER: gcp/fedora-43-x86_64 rules: - changes: - Schutzfile diff --git a/schutzbot/terraform b/schutzbot/terraform index 8796f25..37cdbf9 100644 --- a/schutzbot/terraform +++ b/schutzbot/terraform @@ -1 +1 @@ -3545c5e293c8677f8f48b9a1e4cf6131bf288c24 +a11e597746a09993a0cb93151ab610535f772435 diff --git a/test/config.yml b/test/config.yml index 71bd83e..0374de8 100644 --- a/test/config.yml +++ b/test/config.yml @@ -3,7 +3,7 @@ images: runner: aws/fedora-43 containerfiles: - containerfile: stream9-qcow2 - runner: rhos-01/fedora-43 + runner: gcp/fedora-43 image-type: qcow2 arches: [x86_64] - containerfile: stream9-qcow2 @@ -14,14 +14,14 @@ images: runner: aws/fedora-43 containerfiles: - containerfile: stream10-qcow2 - runner: rhos-01/fedora-43 + runner: gcp/fedora-43 image-type: qcow2 arches: [x86_64] - containerfile: stream10-qcow2 image-type: qcow2 arches: [aarch64] - containerfile: stream10-installer - runner: rhos-01/fedora-43-{arch}-large + runner: gcp/fedora-43 image-type: bootc-generic-iso payload-containerfile: stream10-qcow2 arches: [x86_64] @@ -43,12 +43,12 @@ images: image-type: gce arches: [x86_64] - containerfile: rhel-10-installer - runner: rhos-01/fedora-43-{arch}-large + runner: gcp/fedora-43 image-type: bootc-generic-iso payload-containerfile: rhel-10-qcow2 arches: [x86_64] - containerfile: rhel-10-qcow2 - runner: rhos-01/fedora-43 + runner: gcp/fedora-43 image-type: qcow2 arches: [x86_64] - containerfile: rhel-10-qcow2 @@ -59,7 +59,7 @@ images: runner: aws/fedora-43 containerfiles: - containerfile: hummingbird-qcow2 - runner: rhos-01/fedora-43 + runner: gcp/fedora-43 image-type: qcow2 arches: [x86_64] - containerfile: hummingbird-qcow2 diff --git a/test/generate_ci.py b/test/generate_ci.py index d3462e9..05be729 100755 --- a/test/generate_ci.py +++ b/test/generate_ci.py @@ -93,8 +93,8 @@ def build_job(cntfile_name, image_type, arch, runner_name, distro_id, change_rul script.append("test/boot.sh") extends = ".terraform" - if runner_name.startswith("rhos-01/"): - extends = ".terraform/openstack" + if runner_name.startswith("gcp/"): + extends = ".terraform/gcp" variables = { "RUNNER": runner, @@ -164,9 +164,9 @@ def generate_ci_config(config, cntfile_cache, repo_root): "extends": ".base", "tags": ["terraform"], }, - ".terraform/openstack": { + ".terraform/gcp": { "extends": ".base", - "tags": ["terraform/openstack"], + "tags": ["terraform/gcp"], }, } diff --git a/test/test_generate_ci.py b/test/test_generate_ci.py index a04d2ee..1b917fe 100644 --- a/test/test_generate_ci.py +++ b/test/test_generate_ci.py @@ -369,60 +369,30 @@ def test_build_change_rules(tmp_path, case): ), pytest.param( dict( - cf_name="rhel-10-qcow2", + cf_name="stream10-qcow2", image_type="qcow2", arch="x86_64", - runner="rhos-01/rhel-10.1-ga", - distro_id="rhel-10", - change_rules=["rhel-10-qcow2", "qcow2-amd64/**/*", "test/**/*", "Schutzfile"], + runner="gcp/fedora-43", + distro_id="centos-10", + change_rules=["stream10-qcow2", "qcow2-amd64/**/*", "test/**/*", "Schutzfile"], payload_name=None, subscription_needed=False, rh_registry_login_needed=False, expected={ "stage": "test", - "extends": ".terraform/openstack", + "extends": ".terraform/gcp", "variables": { - "RUNNER": "rhos-01/rhel-10.1-ga-x86_64", + "RUNNER": "gcp/fedora-43-x86_64", }, - "rules": [{"changes": ["rhel-10-qcow2", "qcow2-amd64/**/*", "test/**/*", "Schutzfile"]}], + "rules": [{"changes": ["stream10-qcow2", "qcow2-amd64/**/*", "test/**/*", "Schutzfile"]}], "script": [ - "CONTAINER_REF=$(test/get-container.sh rhel-10-qcow2)", - 'test/build.sh "$CONTAINER_REF" qcow2 x86_64 rhel-10', + "CONTAINER_REF=$(test/get-container.sh stream10-qcow2)", + 'test/build.sh "$CONTAINER_REF" qcow2 x86_64 centos-10', "test/boot.sh", ], }, ), - id="simple-qcow2", - ), - pytest.param( - dict( - cf_name="rhel-10-installer", - image_type="bootc-generic-iso", - arch="x86_64", - runner="rhos-01/rhel-10.1-ga-{arch}-large", - distro_id="rhel-10", - change_rules=["rhel-10-installer", "rhel-10-qcow2", "qcow2-amd64/**/*", "test/**/*", "Schutzfile"], - payload_name="rhel-10-qcow2", - subscription_needed=True, - rh_registry_login_needed=True, - expected={ - "stage": "test", - "extends": ".terraform/openstack", - "variables": { - "RUNNER": "rhos-01/rhel-10.1-ga-x86_64-large", - "SUBSCRIPTION_NEEDED": True, - "RH_REGISTRY_LOGIN_NEEDED": True, - }, - "rules": [{"changes": ["rhel-10-installer", "rhel-10-qcow2", "qcow2-amd64/**/*", "test/**/*", "Schutzfile"]}], - "script": [ - "CONTAINER_REF=$(test/get-container.sh rhel-10-installer)", - "PAYLOAD_REF=$(test/get-container.sh rhel-10-qcow2)", - 'test/build.sh "$CONTAINER_REF" bootc-generic-iso x86_64 rhel-10 "$PAYLOAD_REF"', - "test/boot.sh", - ], - }, - ), - id="installer-with-payload", + id="simple-gcp", ), ], ) @@ -482,9 +452,9 @@ def test_generate_ci_config_top_level_keys(tmp_path): assert ".terraform" in ci assert ci[".terraform"]["extends"] == ".base" assert ci[".terraform"]["tags"] == ["terraform"] - assert ".terraform/openstack" in ci - assert ci[".terraform/openstack"]["extends"] == ".base" - assert ci[".terraform/openstack"]["tags"] == ["terraform/openstack"] + assert ".terraform/gcp" in ci + assert ci[".terraform/gcp"]["extends"] == ".base" + assert ci[".terraform/gcp"]["tags"] == ["terraform/gcp"] def test_generate_ci_config_generates_job_per_arch(tmp_path):