-
Notifications
You must be signed in to change notification settings - Fork 497
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
(FACT-1281) Allow host configs to be generated at runtime #1243
(FACT-1281) Allow host configs to be generated at runtime #1243
Conversation
When I try to run this on top of stable, I get
|
if platforms | ||
cli = BeakerHostGenerator::CLI.new([platforms, '--disable-default-role']) | ||
ENV['CONFIG'] = "tmp/#{platforms}-#{SecureRandom.uuid}.yaml" | ||
File.open(config, 'w') do |fh| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does this config variable come from? Well that's not the problem.
This Rakefile assumes the presence of acceptance/tmp
. Adding Dir.mkdir('tmp')
seems to work as an option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Down below there's
def config
ENV['CONFIG']
end
I'm going to close this PR while we work on getting ci-job-configs and hiera figured out. |
ed85c88
to
e9b279e
Compare
Verified using:
|
Did you start with a |
Ah that must be it. It's in the .gitignore list so didn't realize it was generated during the build. |
This commit adds a dependency on beaker-hostgenerator in the acceptance Gemfile, which may be overridden using the `BEAKER_HOSTGENERATOR_VERSION` environment variable. The acceptance Rakefile will continue to use the `CONFIG` environment variable, which must point to an existing host config file. If `TEST_TARGET` is specified, it will override `CONFIG`, and the Rakefile will use beaker-hostgenerator to dynamically generate a host config. The host config is generated in the `acceptance/tmp` directory, as opposed to `/tmp` so that it doesn't conflict with concurrent acceptance tests running on the same CI coordinator. It also appends SecureRandom to the hostfile, because it seems like a good idea. The resulting host config is copied to the `log/latest/config.yml`. For example, to run against a tagged build: $ bundle exec rake ci:test:aio TEST_TARGET=redhat7-64a SHA=1.3.2 To run against a non-tagged commit: $ bundle exec rake ci:test:aio TEST_TARGET=redhat7-64a \ SHA=<full sha> SUITE_VERSION=<git describe> This commit doesn't remove the static host configs as CI jobs need to be updated first.
e9b279e
to
f1608d9
Compare
👍 looks good to me |
Hiera failed, hold off until that's fixed. |
Superceded by #1244, which adds the one-line, temporary workaround discussed in HipChat. |
This commit adds a dependency on beaker-hostgenerator in the acceptance
Gemfile, which may be overridden using the
BEAKER_HOSTGENERATOR_VERSION
environment variable.The acceptance Rakefile will continue to use the
CONFIG
environmentvariable, which points to an existing host config file.
If
PLATFORMS
is specified, it will overrideCONFIG
, and the Rakefilewill use beaker-hostgenerator to dynamically generate a host config. The
host config is generated in the
facter/acceptance/tmp
directory, asopposed to
/tmp
so that it doesn't conflict with concurrent acceptancetests running on the same CI coordinator. It also appends SecureRandom
to the hostfile, because it seems like a good idea. The resulting host
config is copied to the
log/latest/config.yml
.For example, to run against a tagged build:
To run against a non-tagged commit:
This commit doesn't remove the static host configs as CI jobs need to be
updated first.