Skip to content

(PDB-1300) Set conditional beaker options for AIO#1424

Merged
kbarber merged 1 commit intopuppetlabs:stablefrom
johnduarte:pdb-1300-add-puppetserver-postres-options
May 29, 2015
Merged

(PDB-1300) Set conditional beaker options for AIO#1424
kbarber merged 1 commit intopuppetlabs:stablefrom
johnduarte:pdb-1300-add-puppetserver-postres-options

Conversation

@johnduarte
Copy link

This commit adds a beaker options file for puppetserver_postgres_db
in order to facilitate acceptance testing of PuppetDB with the
server provided by puppetserver and the database provided by
postgres.

@pljenkinsro
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.puppetlabs.com/job/platform_puppetdb_intn-sys_pr/1324/

@johnduarte johnduarte force-pushed the pdb-1300-add-puppetserver-postres-options branch from 2236d3d to ce3d1e3 Compare May 29, 2015 00:27
@johnduarte johnduarte changed the title (PDB-1300) Add Beaker options for puppetserver-postres (PDB-1300) Set conditional beaker options for AIO May 29, 2015
@pljenkinsro
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.puppetlabs.com/job/platform_puppetdb_intn-sys_pr/1330/

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm sorry @johnduarte I've given you bad advice here. The options file stuff is parsed by beaker, not by us. In fact it's done in an order that means you can't fetch the options hash this way, you have to pluck the value from the environment instead - like ENV["BEAKER_TYPE"]. This sounds scarier than it sounds, the name of the variable is still a static API so its still not going to just underneath us (unless we do a major revision bump to beaker I guess, but it would break other stuff anyway since our CI jobs would need changing). Basically its a chicken and egg scenario, because this code loads the options hash, the options hash isn't yet available - or something like that, either way 'options' is out of scope in this module, the ENV variable is never out of scope however.

I'll fire up a job tomorrow with this change before you get online and we can see if it solves it.

Copy link
Author

Choose a reason for hiding this comment

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

@kbarber the eval in the options parser did not seem to like typical conditional statements. I wound up using the tap method to influence the merge on an item-by-item basis. It looks a little weird, but it works. Let me know if you have a better recommendation.

FYI: We will need to update the jenkins job(s) to use the correct options when the puppetserver_embedded_db.rb is deleted

This commit adds conditional logic to the embedded_db.rb and
postgres.rb beaker options files to include puppetserver options
when the beaker `type` option is set to `aio`.
@johnduarte johnduarte force-pushed the pdb-1300-add-puppetserver-postres-options branch from ce3d1e3 to 1c5859a Compare May 29, 2015 04:53
@pljenkinsro
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.puppetlabs.com/job/platform_puppetdb_intn-sys_pr/1331/

@kbarber kbarber merged commit 1c5859a into puppetlabs:stable May 29, 2015
@johnduarte johnduarte deleted the pdb-1300-add-puppetserver-postres-options branch May 29, 2015 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants