Skip to content

Commit

Permalink
add index image to metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
riprasad committed Jan 9, 2025
1 parent 372e574 commit a7c6a87
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions config/gam-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ components:
- name: odh-dashboard
src:
url: https://github.com/opendatahub-io/odh-dashboard.git
branch: sync-test
branch: main
dest:
url: https://github.com/red-hat-data-services/odh-dashboard-sync.git
branch: main
ignore_files: [".env", ".env.test"]
- name: odh-operator
src:
url: https://github.com/opendatahub-io/opendatahub-operator.git
branch: sync-test
branch: main
dest:
url: https://github.com/red-hat-data-services/opendatahub-operator-sync.git
branch: main
2 changes: 1 addition & 1 deletion scripts/gam-trigger.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
METADATA="data/metadata.yaml"


pipenv run python src/main.py --component Dashboard --execution_id 123456
pipenv run python src/main.py --component Dashboard

1 change: 1 addition & 0 deletions src/gam_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def generate_execution_metadata(self):
'config': self.component_config,
'metadata': {
'git': None,
'index_image': None,
'nvr': None,
'execution_id': self.execution_id,
'path': metadata_path,
Expand Down
3 changes: 2 additions & 1 deletion src/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ def populate_execution_metadata(execution_metadata, component_config):
cvp = json.load(open(temp_dir + '/build/latest/cvp.json'))
upstream_sources = ruamel.yaml.YAML(typ='safe').load(open(temp_dir + '/build/latest/upstream_sources.yml', 'r'))

# Update the metadata with the NVR from the CVP file
# Update the metadata with the NVR and index image from the CVP file
execution_metadata['metadata']['nvr'] = cvp['artifact']['nvr']
execution_metadata['metadata']['index_image'] = cvp['pipeline']['index_image']

execution_metadata['metadata']['status'] = 'TestingInProgress'
execution_metadata['metadata']['git'] = component_config['repositories']
Expand Down

0 comments on commit a7c6a87

Please sign in to comment.