dylanratcliffe / onceover-octocatalog-diff

Onceover plugin for checking differences between controlrepo versions
MIT License
4 stars 8 forks source link

running octocatalog-diff in a container fails #9

Closed cyberkov closed 2 years ago

cyberkov commented 5 years ago

Hello!

I am very sorry if this is the wrong place to report, but I tried literally everything to make it work and I failed. I am trying to set up onceover-octocatalog-diff as a test within my gitlab-ci pipeline and therefore need to run it within a docker container.

My Gemfile:

group :test do
  gem 'octocatalog-diff', require: false
  gem 'onceover' , require: false
  gem 'onceover-codequality', require: false
  gem 'onceover-octocatalog-diff', require: false
  gem 'puppet', '~> 5', require: false
end

This is my .gitlab-ci.yml:

diff:
  stage: unit
  # image: puppet/puppet-dev-tools:centos # I tried this one as well. Didn't work.
  image: ruby:2.5
  cache:
    paths:
      - vendor/cache
      - vendor/r10k
  allow_failure: true
  tags:
    - puppet
  before_script:
    - mkdir -p vendor/r10k && ln -s ${PWD}/vendor/r10k /root/.r10k
    - eval $(ssh-agent -s)
    - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
    - mkdir -p ~/.ssh
    - chmod 700 ~/.ssh
    - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
    - cp -f scripts/ssh_config ~/.ssh/config
    - chmod 644 ~/.ssh/known_hosts
    - apt-get update && apt-get install -y rsync cmake
    # - yum install -y rsync cmake which  # Fun fact: octocatalog-diff needs "which".
    - find -L . -type l -delete # remove broken symlinks
    - bundle install --jobs $(nproc) "${FLAGS[@]}" --system
    # - bundle install --path=vendor/cache --binstubs=bin --jobs $(nproc) "${FLAGS[@]}"
  script:
    - make sync # My modules are not in site-modules yet.
    - 'echo "Testing branch: $CI_COMMIT_REF_NAME"'
    - bundle exec onceover run diff --trace -f $CI_COMMIT_REF_NAME -t puppet5_test -n ubuntu16.puppettest.at -c profile::base --debug
  only:
    refs:
      - merge_requests
  except:
    - puppet5_production
    - puppet5_test
bundle exec onceover run diff -f tiny-puppetfile-updates -t puppet5_test -n ubuntu16.puppettest.at -c profile::base --trace --debug
DEBUG    -> Reading factsets
DEBUG    -> Reading factsets
DEBUG    -> Reading factsets
DEBUG    -> Reading factsets
DEBUG    -> Reading factsets
DEBUG    -> Reading factsets
DEBUG    -> Reading factsets
DEBUG    -> Reading factsets
DEBUG    -> Reading factsets
DEBUG    -> Reading factsets
DEBUG    -> Reading factsets
DEBUG    -> Reading factsets
DEBUG    -> Reading factsets
DEBUG    -> Reading factsets
DEBUG    -> Reading factsets
DEBUG    -> Reading factsets
DEBUG    -> Reading factsets
DEBUG    -> Reading factsets
DEBUG    -> Creating r10k cache for thread at /tmp/r10k_cache20190516-4609-46o7mb
INFO     -> Preparing environment for profile::base on ubuntu16.puppettest.at
DEBUG    -> Creating temp directory
DEBUG    -> Temp directory created at /tmp/profile__base_on_ubuntu16.puppettest.at20190516-4609-sx43o8
DEBUG    -> Copying controlrepo to /tmp/profile__base_on_ubuntu16.puppettest.at20190516-4609-sx43o8
DEBUG    -> Deploying vendored factsets
INFO     -> Deploying Puppetfile for profile::base on ubuntu16.puppettest.at
DEBUG    -> Creating before script that overwrites site.pp
DEBUG    -> Getting Puppet binary
DEBUG    -> Running Octocatalog diff
INFO     -> Compiling catalogs for profile::base on ubuntu16.puppettest.at
DEBUG    -> Running: bundle exec octocatalog-diff --fact-file /tmp/profile__base_on_ubuntu16.puppettest.at20190516-4609-sx43o8/spec/factsets/ubuntu16.puppettest.at.yaml --from tiny-puppetfile-updates
 --to puppet5_test --basedir /tmp/profile__base_on_ubuntu16.puppettest.at20190516-4609-sx43o8 --puppet-binary /usr/local/bundle/bin/puppet --bootstrap-script '/tmp/profile__base_on_ubuntu16.puppettest.at20190516-4609-sx43o8/bootstrap_script.rb' --hiera-config /build/project-0/hiera.yaml --pass-env-vars RUBY_VERSION,RUBY_DOWNLOAD_SHA256,RUBY_MAJOR,GEM_HOME,BUNDLE_SILENCE_ROOT_WARNING,BUNDLE_APP_CONFIG,RU
BYGEMS_VERSION,BUNDLE_PATH,BUNDLER_ORIG_BUNDLE_BIN_PATH,BUNDLER_ORIG_BUNDLE_GEMFILE,BUNDLER_ORIG_BUNDLER_ORIG_MANPATH,BUNDLER_ORIG_BUNDLER_VERSION,BUNDLER_ORIG_GEM_HOME,BUNDLER_ORIG_GEM_PATH,BUNDLER_ORIG_MAN
PATH,BUNDLER_ORIG_PATH,BUNDLER_ORIG_RB_USER_INSTALL,BUNDLER_ORIG_RUBYLIB,BUNDLER_ORIG_RUBYOPT,BUNDLE_BIN_PATH,BUNDLE_GEMFILE,BUNDLER_VERSION,RUBYOPT,RUBYLIB,GEM_PATH
INFO     -> Storing results for profile::base on ubuntu16.puppettest.at
DEBUG    -> Backing up modules to thread cache /tmp/profile__base_on_ubuntu16.puppettest.at20190516-4609-sx43o8
DEBUG    -> Removing temporary build cache
Test: profile::base on ubuntu16.puppettest.at
Exit: 1
Status: failed
Errors:
#<Thread:0x0000558d51af7218@/usr/local/lib/ruby/2.5.0/open3.rb:354 run> terminated with exception (report_on_exception is true):
/usr/local/lib/ruby/2.5.0/open3.rb:354:in `read': stream closed in another thread (IOError)
        from /usr/local/lib/ruby/2.5.0/open3.rb:354:in `block (2 levels) in capture2e'
OctocatalogDiff::Errors::BootstrapError: bootstrap failed for /tmp/ocd-ipc-20190516-4874-8a5cgo/ocd-bootstrap-checkout-20190516-4879-1dtwltq: /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_requ
ire.rb:54:in `require': cannot load such file -- onceover/controlrepo (LoadError)
        from /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /tmp/ocd-ipc-20190516-4874-8a5cgo/ocd-bootstrap-checkout-20190516-4879-1dtwltq/tmp/profile__base_on_ubuntu16.puppettest.at20190516-4609-sx43o8/bootstrap_script.rb:3:in `<main>'

  /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/catalog-util/bootstrap.rb:150:in `run_bootstrap'
  /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/catalog-util/bootstrap.rb:96:in `bootstrap_directory'
  /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/catalog/computed.rb:96:in `bootstrap'
  /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/catalog/computed.rb:113:in `build_catalog'
  /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/catalog.rb:96:in `build'
  /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/util/catalogs.rb:241:in `build_catalog'
  /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/util/parallel.rb:34:in `call'
  /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/util/parallel.rb:34:in `execute'
  /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/util/parallel.rb:193:in `execute_task'
  /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/util/parallel.rb:119:in `block (2 levels) in run_tasks_parallel'
  /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/util/parallel.rb:117:in `fork'
  /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/util/parallel.rb:117:in `block in run_tasks_parallel'
  /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/util/parallel.rb:114:in `each'
  /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/util/parallel.rb:114:in `each_with_index'
  /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/util/parallel.rb:114:in `run_tasks_parallel'
  /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/util/parallel.rb:94:in `run_tasks'
  /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/util/catalogs.rb:92:in `build_catalog_parallelizer'
  /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/util/catalogs.rb:29:in `catalogs'
  /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/api/v1/catalog-diff.rb:34:in `catalog_diff'
  /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/api/v1.rb:19:in `catalog_diff'
  /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/cli.rb:151:in `run_octocatalog_diff'
  /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/cli.rb:125:in `cli'
  /usr/local/bundle/gems/octocatalog-diff-1.5.4/bin/octocatalog-diff:34:in `<top (required)>'
  /usr/local/bundle/bin/octocatalog-diff:23:in `load'
  /usr/local/bundle/bin/octocatalog-diff:23:in `<top (required)>'

I commented out the Fileutils.rm part and ran octocataog-diff manually within the docker container:

root@81c5662562c2:/build/project-0# octocatalog-diff --fact-file /tmp/profile__base_on_ubuntu16.puppettest.at20190516-3280-ubt5ip/spec/factsets/ubuntu16.puppettest.at.yaml --from tiny-puppetfile-upda
tes --to puppet5_test --basedir /tmp/profile__base_on_ubuntu16.puppettest.at20190516-3280-ubt5ip --puppet-binary /usr/local/bundle/bin/puppet --bootstrap-script '/tmp/profile__base_on_ubuntu16.puppettest
.at20190516-3280-ubt5ip/bootstrap_script.rb' --hiera-config /build/project-0/hiera.yaml --pass-env-vars RUBY_VERSION,RUBY_DOWNLOAD_SHA256,RUBY_MAJOR,BUNDLE_SILENCE_ROOT_WARNING,BUNDLE_APP_CONFIG,RUBYGEMS
_VERSION,BUNDLE_PATH,BUNDLER_ORIG_BUNDLE_BIN_PATH,BUNDLER_ORIG_BUNDLE_GEMFILE,BUNDLER_ORIG_BUNDLER_ORIG_MANPATH,BUNDLER_ORIG_BUNDLER_VERSION,BUNDLER_ORIG_GEM_HOME,BUNDLER_ORIG_GEM_PATH,BUNDLER_ORIG_MANPATH,B
UNDLER_ORIG_PATH,BUNDLER_ORIG_RB_USER_INSTALL,BUNDLER_ORIG_RUBYLIB,BUNDLER_ORIG_RUBYOPT,BUNDLE_BIN_PATH,BUNDLE_GEMFILE,BUNDLER_VERSION,RUBYOPT,RUBYLIB --debug
D, [2019-05-16T13:38:17.385271 #4907] DEBUG -- : Running octocatalog-diff 1.5.4 with ruby 2.5.5
D, [2019-05-16T13:38:17.385417 #4907] DEBUG -- : Command line arguments: ["--fact-file", "/tmp/profile__base_on_ubuntu16.puppettest.at20190516-3280-ubt5ip/spec/factsets/ubuntu16.puppettest.at.yaml",
"--from", "tiny-puppetfile-updates", "--to", "puppet5_test", "--basedir", "/tmp/profile__base_on_ubuntu16.puppettest.at20190516-3280-ubt5ip", "--puppet-binary", "/usr/local/bundle/bin/puppet", "--bootstr
ap-script", "/tmp/profile__base_on_ubuntu16.puppettest.at20190516-3280-ubt5ip/bootstrap_script.rb", "--hiera-config", "/build/project-0/hiera.yaml", "--pass-env-vars", "RUBY_VERSION,RUBY_DOWNLOAD_SHA256,
RUBY_MAJOR,BUNDLE_SILENCE_ROOT_WARNING,BUNDLE_APP_CONFIG,RUBYGEMS_VERSION,BUNDLE_PATH,BUNDLER_ORIG_BUNDLE_BIN_PATH,BUNDLER_ORIG_BUNDLE_GEMFILE,BUNDLER_ORIG_BUNDLER_ORIG_MANPATH,BUNDLER_ORIG_BUNDLER_VERSION,B
UNDLER_ORIG_GEM_HOME,BUNDLER_ORIG_GEM_PATH,BUNDLER_ORIG_MANPATH,BUNDLER_ORIG_PATH,BUNDLER_ORIG_RB_USER_INSTALL,BUNDLER_ORIG_RUBYLIB,BUNDLER_ORIG_RUBYOPT,BUNDLE_BIN_PATH,BUNDLE_GEMFILE,BUNDLER_VERSION,RUBYOPT
,RUBYLIB", "--debug"]
...
D, [2019-05-16T13:38:17.439159 #4909] DEBUG -- : Begin install bootstrap script in target directory
D, [2019-05-16T13:38:17.440273 #4909] DEBUG -- : Success: copied /tmp/profile__base_on_ubuntu16.puppettest.at20190516-3280-ubt5ip/bootstrap_script.rb to /tmp/ocd-ipc-20190516-4907-eb10zd/ocd-bootstrap-ch
eckout-20190516-4909-woq1n9/tmp/profile__base_on_ubuntu16.puppettest.at20190516-3280-ubt5ip/bootstrap_script.rb
D, [2019-05-16T13:38:17.440382 #4909] DEBUG -- : Begin bootstrap with '/tmp/profile__base_on_ubuntu16.puppettest.at20190516-3280-ubt5ip/bootstrap_script.rb' in /tmp/ocd-ipc-20190516-4907-eb10zd/ocd-boots
trap-checkout-20190516-4909-woq1n9
D, [2019-05-16T13:38:17.487895 #4912] DEBUG -- : ["Exit status: 0"]
D, [2019-05-16T13:38:17.488993 #4912] DEBUG -- : Success git archive /tmp/profile__base_on_ubuntu16.puppettest.at20190516-3280-ubt5ip:puppet5_test
D, [2019-05-16T13:38:17.489921 #4912] DEBUG -- : Success git checkout /tmp/profile__base_on_ubuntu16.puppettest.at20190516-3280-ubt5ip:puppet5_test -> /tmp/ocd-ipc-20190516-4907-eb10zd/ocd-bootstrap-chec
kout-20190516-4912-1r4m449
D, [2019-05-16T13:38:17.490927 #4912] DEBUG -- : Begin install bootstrap script in target directory
D, [2019-05-16T13:38:17.492708 #4912] DEBUG -- : Success: copied /tmp/profile__base_on_ubuntu16.puppettest.at20190516-3280-ubt5ip/bootstrap_script.rb to /tmp/ocd-ipc-20190516-4907-eb10zd/ocd-bootstrap-ch
eckout-20190516-4912-1r4m449/tmp/profile__base_on_ubuntu16.puppettest.at20190516-3280-ubt5ip/bootstrap_script.rb
D, [2019-05-16T13:38:17.493847 #4912] DEBUG -- : Begin bootstrap with '/tmp/profile__base_on_ubuntu16.puppettest.at20190516-3280-ubt5ip/bootstrap_script.rb' in /tmp/ocd-ipc-20190516-4907-eb10zd/ocd-boots
trap-checkout-20190516-4912-1r4m449
D, [2019-05-16T13:38:17.557493 #4909] DEBUG -- : Bootstrap: /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- onceover/controlrepo (LoadError)
D, [2019-05-16T13:38:17.557593 #4909] DEBUG -- : Bootstrap:     from /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
D, [2019-05-16T13:38:17.557645 #4909] DEBUG -- : Bootstrap:     from /tmp/ocd-ipc-20190516-4907-eb10zd/ocd-bootstrap-checkout-20190516-4909-woq1n9/tmp/profile__base_on_ubuntu16.puppettest.at20190516-3280
-ubt5ip/bootstrap_script.rb:4:in `<main>'
D, [2019-05-16T13:38:17.557750 #4909] DEBUG -- : Failed build_catalog for tiny-puppetfile-updates: OctocatalogDiff::Errors::BootstrapError bootstrap failed for /tmp/ocd-ipc-20190516-4907-eb10zd/ocd-bootstrap
-checkout-20190516-4909-woq1n9: /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- onceover/controlrepo (LoadError)
        from /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /tmp/ocd-ipc-20190516-4907-eb10zd/ocd-bootstrap-checkout-20190516-4909-woq1n9/tmp/profile__base_on_ubuntu16.puppettest.at20190516-3280-ubt5ip/bootstrap_script.rb:4:in `<main>'

D, [2019-05-16T13:38:17.564075 #4907] DEBUG -- : PID=4909 completed in 0.176356868 seconds, 80521 bytes
#<Thread:0x000055da21c35f18@/usr/local/lib/ruby/2.5.0/open3.rb:354 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
        1: from /usr/local/lib/ruby/2.5.0/open3.rb:354:in `block (2 levels) in capture2e'
/usr/local/lib/ruby/2.5.0/open3.rb:354:in `read': stream closed in another thread (IOError)
Traceback (most recent call last):
        24: from /usr/local/bundle/bin/octocatalog-diff:23:in `<main>'
        23: from /usr/local/bundle/bin/octocatalog-diff:23:in `load'
        22: from /usr/local/bundle/gems/octocatalog-diff-1.5.4/bin/octocatalog-diff:34:in `<top (required)>'
        21: from /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/cli.rb:125:in `cli'
        20: from /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/cli.rb:151:in `run_octocatalog_diff'
        19: from /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/api/v1.rb:19:in `catalog_diff'
        18: from /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/api/v1/catalog-diff.rb:34:in `catalog_diff'
        17: from /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/util/catalogs.rb:29:in `catalogs'
        16: from /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/util/catalogs.rb:92:in `build_catalog_parallelizer'
        15: from /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/util/parallel.rb:94:in `run_tasks'
        14: from /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/util/parallel.rb:114:in `run_tasks_parallel'
        13: from /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/util/parallel.rb:114:in `each_with_index'
        12: from /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/util/parallel.rb:114:in `each'
        11: from /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/util/parallel.rb:117:in `block in run_tasks_parallel'
        10: from /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/util/parallel.rb:117:in `fork'
         9: from /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/util/parallel.rb:119:in `block (2 levels) in run_tasks_parallel'
         8: from /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/util/parallel.rb:193:in `execute_task'
         7: from /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/util/parallel.rb:34:in `execute'
         6: from /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/util/parallel.rb:34:in `call'
         5: from /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/util/catalogs.rb:241:in `build_catalog'
         4: from /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/catalog.rb:96:in `build'
         3: from /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/catalog/computed.rb:113:in `build_catalog'
         2: from /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/catalog/computed.rb:96:in `bootstrap'
         1: from /usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/catalog-util/bootstrap.rb:96:in `bootstrap_directory'
/usr/local/bundle/gems/octocatalog-diff-1.5.4/lib/octocatalog-diff/catalog-util/bootstrap.rb:150:in `run_bootstrap': bootstrap failed for /tmp/ocd-ipc-20190516-4907-eb10zd/ocd-bootstrap-checkout-20190516-490
9-woq1n9: /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- onceover/controlrepo (LoadError) (OctocatalogDiff::Errors::BootstrapError)
        from /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /tmp/ocd-ipc-20190516-4907-eb10zd/ocd-bootstrap-checkout-20190516-4909-woq1n9/tmp/profile__base_on_ubuntu16.puppettest.at20190516-3280-ubt5ip/bootstrap_script.rb:4:in `<main>'

If I try to require manually it'll work (within the container):

root@81c5662562c2:/build/project-0# /usr/bin/env ruby -r pry -r onceover/controlrepo -e binding.pry
[1] pry(main)> Onceover::Controlrepo
=> Onceover::Controlrepo
[2] pry(main)> Onceover::Controlrepo.new
=> #<Onceover::Controlrepo:0x000055f9c73bca38

Sorry for this wall of text but I really hope you can help me with this issue. I'll be on the puppetcommunity slack as well if you need any further information to debug it.

Thanks in advance and thanks a lot for this really great project! Cheers Hannes

P.S.: On my Ubuntu 18.04 it works fine, but I don't want to put that one into the datacenter ;-)

cyberkov commented 5 years ago

Hello again :) I created a Dockerfile to reproduce the issue and hope that this will help: https://github.com/cyberkov/control-repo/tree/octodiff

Thanks again!

bprins commented 3 years ago

Running into the exact same issue. Will do some more troubleshooting on my side, but I'm curious if you (@cyberkov) ever managed to fix/work around this? Thanks!

bprins commented 3 years ago

Ok, so I found the issue. Only a limited set of environment variables are passed to the octocatalog-diff bootstrap script mechanism[1]. The ruby container we are using has GEM_HOME set to /usr/local/bundle[2] which is not known to the bootstrap script.

Passing the extra --bootstrap-environment argument with the GEM_HOME variable to the octocatalog-diff command_args list (see lib/onceover/octocatalog/diff/cli.rb) fixed this issue for me.

[1] https://github.com/github/octocatalog-diff/blob/master/doc/advanced-bootstrap.md [2] https://github.com/docker-library/ruby/blob/8e49e25b591d4cfa6324b6dada4f16629a1e51ce/2.5/buster/Dockerfile#L85

tuxmea commented 2 years ago

Also fixed by #12

tuxmea commented 2 years ago

@dylanratcliffe we can close this ticket, too.

dylanratcliffe commented 2 years ago

Awesome thanks @tuxmea