From b2ede3f50a061eb36f94fee53e8754515922a364 Mon Sep 17 00:00:00 2001 From: Cameron Wall <75807506+cameronmwall@users.noreply.github.com> Date: Thu, 11 Jan 2024 14:56:20 -0500 Subject: [PATCH] bundle generation move with config (#565) Signed-off-by: Cameron Wall --- hack/bundle-automation/config.yaml | 42 ++++++++++++++++++++++++ hack/bundle-automation/generate-shell.py | 8 ++--- 2 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 hack/bundle-automation/config.yaml diff --git a/hack/bundle-automation/config.yaml b/hack/bundle-automation/config.yaml new file mode 100644 index 000000000..159c59b70 --- /dev/null +++ b/hack/bundle-automation/config.yaml @@ -0,0 +1,42 @@ +- repo_name: generate-hive-bundle + gen_command: ./hack/bundle-automation/gen-hive-bundle.sh + branch: mce-2.4 + sha: e3f9aed5bf2a2b43aa05621864fd37c71c38afda + bundlePath: /tmp/hive-operator-manifests + name: hive-operator + imageMappings: + hive: openshift_hive + +- repo_name: assisted-service + github_ref: "https://github.com/openshift/assisted-service.git" + branch: "release-ocm-2.10" + operators: + - name: assisted-service + bundlePath: "deploy/olm-catalog/manifests/" + imageMappings: + assisted-service: assisted_service + postgresql-12-centos7: postgresql_12 + assisted-installer-agent: assisted_installer_agent + assisted-installer-controller: assisted_installer_controller + assisted-installer: assisted_installer + assisted-image-service: assisted_image_service + +- repo_name: registration-operator + github_ref: "https://github.com/stolostron/ocm.git" + branch: "backplane-2.5" + operators: + - name: cluster-manager + bundlePath: "deploy/cluster-manager/olm-catalog/cluster-manager/manifests/" + imageMappings: + registration-operator: registration_operator + exclusions: + - readOnlyRootFilesystem + +- repo_name: discovery-operator + github_ref: "https://github.com/stolostron/discovery.git" + branch: "backplane-2.5" + operators: + - name: discovery-operator + bundlePath: "bundle/manifests/" + imageMappings: + discovery-operator: discovery_operator diff --git a/hack/bundle-automation/generate-shell.py b/hack/bundle-automation/generate-shell.py index fd146cde0..453f9c342 100644 --- a/hack/bundle-automation/generate-shell.py +++ b/hack/bundle-automation/generate-shell.py @@ -3,11 +3,11 @@ import shutil -repo_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "tmp/bundle-gen") # Path to clone repo to +repo_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "tmp/dev-tools") # Path to clone repo to if os.path.exists(repo_path): # If path exists, remove and re-clone shutil.rmtree(repo_path) repository = Repo.clone_from("https://github.com/stolostron/installer-dev-tools.git", repo_path) # Clone repo to above path repository.git.checkout('main') # If a branch is specified, checkout that branch - -os.system("python3 " + repo_path + "/bundle-generation/generate-bundles.py --destination pkg/templates/ --configLocation MCEconfig.yaml") -shutil.rmtree((os.path.join(os.path.dirname(os.path.realpath(__file__)), "tmp")), ignore_errors=True) \ No newline at end of file +shutil.copy(os.path.join(os.path.dirname(os.path.realpath(__file__)), "tmp/dev-tools/bundle-generation/generate-bundles.py"), os.path.join(os.path.dirname(os.path.realpath(__file__)), "generate-bundles.py")) +os.system("python3 " + os.path.dirname(os.path.realpath(__file__)) + "/generate-bundles.py --destination pkg/templates/") +os.remove(os.path.join(os.path.dirname(os.path.realpath(__file__)), "generate-bundles.py")) \ No newline at end of file