Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement writing out a containerfile for a host #125

Merged
merged 1 commit into from
Mar 17, 2024

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Mar 9, 2024

This allows running:

beaker-docker containerfile centos9-64

The spec is ran through beaker-hostgenerator and then it writes to Containerfile. The filename can also be passed in as an additional argument.

This is an alternative to #124.

Copy link

codecov bot commented Mar 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.37%. Comparing base (895bc0a) to head (e13be08).
Report is 6 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #125   +/-   ##
=======================================
  Coverage   86.37%   86.37%           
=======================================
  Files           1        1           
  Lines         279      279           
=======================================
  Hits          241      241           
  Misses         38       38           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This allows running:

    beaker-docker containerfile centos9-64

The spec is ran through beaker-hostgenerator and then it writes to
Containerfile. The filename can also be passed in as an additional
argument.

hypervisor = network_manager.hypervisors['docker']
# TODO: private method
File.write(filename, hypervisor.send(:dockerfile_for, hosts.first))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I considered alternatives like writing out multiple files if there are multiple hosts, but I decided to keep it simple for now.

@bastelfreak bastelfreak merged commit 752ef19 into voxpupuli:master Mar 17, 2024
11 checks passed
@ekohl ekohl deleted the containerfile branch March 17, 2024 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants