Skip to content

Commit

Permalink
omnibus cache: simplify the build images handling
Browse files Browse the repository at this point in the history
  • Loading branch information
chouquette committed Dec 11, 2024
1 parent c239913 commit 55e409d
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions tasks/libs/common/omnibus.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@
from tasks.release import _get_release_json_value


def _get_build_images(ctx):
# We intentionally include both build images & their test suffixes in the pattern
# as a test image and the merged version shouldn't share their cache
tags = ctx.run("grep -E 'DATADOG_AGENT_.*BUILDIMAGES' .gitlab-ci.yml | cut -d ':' -f 2", hide='stdout').stdout
return (t.strip() for t in tags.splitlines())


def _get_omnibus_commits(field):
if 'RELEASE_VERSION' in os.environ:
release_version = os.environ['RELEASE_VERSION']
Expand Down Expand Up @@ -211,9 +204,7 @@ def omnibus_compute_cache_key(ctx):
h = hashlib.sha1()
omnibus_last_changes = _last_omnibus_changes(ctx)
h.update(str.encode(omnibus_last_changes))
buildimages_hash = _get_build_images(ctx)
for img_hash in buildimages_hash:
h.update(str.encode(img_hash))
h.update(str.encode(os.getenv('CI_JOB_IMAGE')))
omnibus_ruby_commit = _get_omnibus_commits('OMNIBUS_RUBY_VERSION')
omnibus_software_commit = _get_omnibus_commits('OMNIBUS_SOFTWARE_VERSION')
print(f'Omnibus ruby commit: {omnibus_ruby_commit}')
Expand Down

0 comments on commit 55e409d

Please sign in to comment.