Skip to content

Commit

Permalink
fix pipeline genration
Browse files Browse the repository at this point in the history
  • Loading branch information
robertomonteromiguel committed Feb 7, 2025
1 parent 8e2ffe3 commit 57a1452
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
17 changes: 14 additions & 3 deletions utils/_context/_scenarios/auto_injection.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from utils.onboarding.debug_vm import extract_logs_to_file
from utils.virtual_machine.utils import get_tested_apps_vms, generate_gitlab_pipeline
from utils.virtual_machine.virtual_machines import _VirtualMachine, load_virtual_machines

from utils.scripts.ci_orchestrators.gitlab.gitlab_ci_orchestrator import generate_aws_matrix
from .core import Scenario


Expand Down Expand Up @@ -75,10 +75,21 @@ def configure(self, config):
# Pipeline generation mode. No run tests, no start vms
self.vm_gitlab_pipeline = config.option.vm_gitlab_pipeline

supported_vms = load_virtual_machines(self.vm_provider_id)
# TODO REMOVE THIS AFTER REMOVE THE PIPELINE GENERATION FROM THE SCENARIO.
# TODO we will load only the machine set by the --vm-only flag
all_vms = load_virtual_machines(self.vm_provider_id)
supported_vm_names = generate_aws_matrix(
"utils/virtual_machine/virtual_machines.json",
"utils/scripts/ci_orchestrators/gitlab/aws_ssi.json",
[self.name],
self._library.library,
)[self.name][self._weblog]
logger.info(f" Supported names: {supported_vm_names} ")
supported_vms = [vm for vm in all_vms if vm.name in supported_vm_names]
logger.info(f"Supported VMs: {', '.join([vm.name for vm in supported_vms])}")

if self.vm_gitlab_pipeline:
# TODO REMOVE THE PIPELINE GENRATION FROM THE SCENARIO
# TODO REMOVE THE PIPELINE GENREATION FROM THE SCENARIO
provisioner.remove_unsupported_machines(
self._library.library,
self._weblog,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ def generate_aws_matrix(virtual_machines_file, aws_ssi_file, scenarios, language
results[scenario][weblog].append(vm["name"])
elif os_branch not in excluded or (not excluded and not exact):
results[scenario][weblog].append(vm["name"])
print(results)
return results


Expand Down

0 comments on commit 57a1452

Please sign in to comment.