Skip to content

Instantly share code, notes, and snippets.

Todo

  • move beaker-abs to puppetlabs namespace
  • push facter#cinext branch to puppetlabs, with puppetlabs/beaker-hostgenerator#cinext
  • update puppet-agent#cinext to point to above puppetlabs/facter#cinext and puppetabs/lbeaker-hostgenerator#cinext
  • get a full run (step 5 fails because the plugin can't find the RESOURCE_TARGET_PARAMETER=TEST_TARGET, so thinks the job doesn't need resources QENG-4356)
  • modify pipeline to test on centos-7 instead of redhat-7
  • hard code RESOURCE_TARGET_PARAMETER for BUILD_TARGET (like we did for TEST_TARGET)
  • temporarily handle teardown in beaker run
  • move facter/acceptance bundle install to step 1 and calculate resource dependencies there instead of step 4
  • once that's done, remove puppet-agent dependency on beaker-hostgenerator
# native build using pooler
$ bundle exec build_host_info el-7-x86_64
{
"name": "centos-7-x86_64",
"engine": "pooler"
}
# cross-compile using pooler
$ bundle exec build_host_info eos-4-i386
{
irb(main):015:0> cat = Puppet::Resource::Catalog.convert_from(:pson, File.read('mycat.json'))
=> #<Puppet::Resource::Catalog:0x007fdd3b9a2f70 @in_to={}, @out_from={}, @upstream_from={}, @downstream_from={}, @name="foo", @catalog_uuid="626a8af6-2d1a-4357-b38d-6da2d74a3ea6", @classes=[], @resource_table={}, @resources=[], @relationship_graph=nil, @host_config=true, @environment_instance=<Puppet::Node::Environment::Remote:70294082229380 @name="none" @manifest="no_manifest" @modulepath="" >, @environment="none", @code_id=nil, @aliases={}, @tags=#<Puppet::Util::TagSet: {}>>
...
irb(main):017:0> cat.render(:pson)
=> "{\"tags\":[],\"name\":\"foo\",\"version\":null,\"code_id\":null,\"catalog_uuid\":\"626a8af6-2d1a-4357-b38d-6da2d74a3ea6\",\"environment\":\"none\",\"resources\":[],\"edges\":[],\"classes\":[]}"
irb(main):018:0> cat.name
=> "foo"
#!/bin/bash
echo -n "Enter merge commit: "
read merge_sha
echo -n "Enter last known passing commit: "
read ci_sha
git merge-base --is-ancestor $merge_sha $ci_sha
# curl -v -G -cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem \
-cert /etc/puppetlabs/puppet/ssl/certs/w4s5zf7hg24dll9.delivery.puppetlabs.net.pem \
-key /etc/puppetlabs/puppet/ssl/private_keys/w4s5zf7hg24dll9.delivery.puppetlabs.net.pem \
'https://w4s5zf7hg24dll9:8140/puppet/v3/static_file_content/foo/bar?code_id=foobar&environment=test'
* <url> malformed
* Closing connection -1
curl: (3) <url> malformed
* <url> malformed
* Closing connection -1
curl: (3) <url> malformed
https://jenkins.puppetlabs.com/view/puppet-agent/view/ad%20hoc/job/platform_puppet-agent_intn-van-sys_suite-manual-facter-ad-hoc/19/SLAVE_LABEL=beaker,TEST_TARGET=cumulus25-64a/consoleFull
Begin tests/ticket_1123_facter_with_invalid_locale.rb
ticket 1123 facter should not crash with invalid locale setting
* set an invalid value for locale and run facter
a1n8v6ua6x1ajmb.delivery.puppetlabs.net (cumulus25-64-1) 11:20:38$ LANG=ABCD facter facterversion
3.1.4
---
HOSTS:
redhat7-64-1:
pe_dir:
pe_ver:
pe_upgrade_dir:
pe_upgrade_ver:
hypervisor: vmpooler
platform: el-7-x86_64
template: redhat-7-x86_64
* Install puppet-agent...
de89om00mcp5g3m.delivery.puppetlabs.net (redhat7-64-1) 20:23:05$ mkdir -p /root/puppet-agent
de89om00mcp5g3m.delivery.puppetlabs.net (redhat7-64-1) executed in 0.05 seconds
Already fetched tmp/repo_configs/el/pl-puppet-agent-3e3aa2bf08096133d8ba82269dea5b17454ca288-el-7-x86_64.repo
localhost $ scp tmp/repo_configs/el/pl-puppet-agent-3e3aa2bf08096133d8ba82269dea5b17454ca288-el-7-x86_64.repo redhat7-64-1:/etc/yum.repos.d/ {:ignore => }
de89om00mcp5g3m.delivery.puppetlabs.net (redhat7-64-1) 20:23:05$ find /etc/yum.repos.d/ -name "*.repo" -exec sed -i 's/baseurl\s*=\s*http:\/\/builds.delivery.puppetlabs.net.*$/baseurl=file:\/\/\/root\/puppet-agent\/x86_64/' {} \;
* Install puppet-agent...
pbdnz4wuddsvwcr.delivery.puppetlabs.net (debian7-64-1) 20:16:27$ mkdir -p /root/puppet-agent
pbdnz4wuddsvwcr.delivery.puppetlabs.net (debian7-64-1) executed in 0.04 seconds
Fetching: http://builds.delivery.puppetlabs.net/puppet-agent/3e3aa2bf08096133d8ba82269dea5b17454ca288/repo_configs/deb/pl-puppet-agent-3e3aa2bf08096133d8ba82269dea5b17454ca288-wheezy.list
and saving to tmp/repo_configs/debian/pl-puppet-agent-3e3aa2bf08096133d8ba82269dea5b17454ca288-wheezy.list
localhost $ scp tmp/repo_configs/debian/pl-puppet-agent-3e3aa2bf08096133d8ba82269dea5b17454ca288-wheezy.list debian7-64-1:/etc/apt/sources.list.d {:ignore => }
pbdnz4wuddsvwcr.delivery.puppetlabs.net (debian7-64-1) 20:16:27$ [[ -d /root/puppet-agent/wheezy/PC1 ]]
centos4-64a:
bundle exec rake ci:test:aio TEST_TARGET=centos4-64a SUITE_VERSION=1.3.2.164.gb9b44ea SHA=b9b44eab32118af58c4d8bd97d0e57451f32534e TESTS=tests/yaml_backend/00-setup.rb
...
cwapgpdubsim3d2.delivery.puppetlabs.net (centos4-64-1) executed in 0.05 seconds
Fetching: http://builds.delivery.puppetlabs.net/puppet-agent/b9b44eab32118af58c4d8bd97d0e57451f32534e/repo_configs/rpm/pl-puppet-agent-b9b44eab32118af58c4d8bd97d0e57451f32534e-el-4-x86_64.repo
and saving to tmp/repo_configs/centos/pl-puppet-agent-b9b44eab32118af58c4d8bd97d0e57451f32534e-el-4-x86_64.repo
localhost $ scp tmp/repo_configs/centos/pl-puppet-agent-b9b44eab32118af58c4d8bd97d0e57451f32534e-el-4-x86_64.repo centos4-64-1:/etc/yum.repos.d/ {:ignore => }
couldn't find link at products, falling back to next option...
couldn't find link at devel, falling back to next option...