Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

fix docsite build issue #2083

Merged
merged 2 commits into from
May 31, 2018
Merged

Conversation

jboyd01
Copy link
Contributor

@jboyd01 jboyd01 commented May 30, 2018

Disclaimer: I don't have much knowledge around ruby/jekyll/docsite, this fixed the issue locally.

@carolynvs is out for 2 weeks, but please review on your return.

Travis builds are erroring out with

./build/docs.sh generate
+++dirname ./build/docs.sh
++cd ./build/..
++pwd
+REPO_ROOT=/home/travis/build/kubernetes-incubator/service-catalog
+DOCSITE=/home/travis/build/kubernetes-incubator/service-catalog/docsite
+DEST=/home/travis/build/kubernetes-incubator/service-catalog/docsite/_site
+generate
+clean
+[[ -d /home/travis/build/kubernetes-incubator/service-catalog/docsite/_site ]]
+mkdir -p /home/travis/build/kubernetes-incubator/service-catalog/docsite/_site
+echo 'Generating site...'
Generating site...
+docker run -it --rm -v /home/travis/build/kubernetes-incubator/service-catalog/docsite:/srv/jekyll -v /home/travis/build/kubernetes-incubator/service-catalog/docs:/srv/docs -v /home/travis/build/kubernetes-incubator/service-catalog/docsite/.bundler:/usr/local/bundle jekyll/jekyll jekyll build
Unable to find image 'jekyll/jekyll:latest' locally
latest: Pulling from jekyll/jekyll
Status: Downloaded newer image for jekyll/jekyll:latest
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-musl]
Traceback (most recent call last):
    12: from /usr/gem/bin/jekyll:23:in `<main>'
    11: from /usr/gem/bin/jekyll:23:in `load'
    10: from /usr/gem/gems/jekyll-3.8.1/exe/jekyll:11:in `<top (required)>'
     9: from /usr/gem/gems/jekyll-3.8.1/lib/jekyll/plugin_manager.rb:50:in `require_from_bundler'
     8: from /usr/local/lib/ruby/site_ruby/2.5.0/bundler.rb:107:in `setup'
     7: from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/runtime.rb:20:in `setup'
     6: from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/runtime.rb:108:in `block in definition_method'
     5: from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/definition.rb:227:in `requested_specs'
     4: from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/definition.rb:238:in `specs_for'
     3: from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/definition.rb:171:in `specs'
     2: from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/spec_set.rb:85:in `materialize'
     1: from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/spec_set.rb:85:in `map!'
/usr/local/lib/ruby/site_ruby/2.5.0/bundler/spec_set.rb:91:in `block in materialize': Could not find public_suffix-3.0.2 in any of the sources (Bundler::GemNotFound)
make: *** [docs] Error 1

Googling the error, I updated the docs.sh to do a bundle update. I got an error about "Invalid date ': Document 'vendor/cache/ruby/2.5.0/gems/jekyll-3.6.0/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb' does not have a valid date in the YAML front matter." and found I needed to update docsite/_config.yml with an exclude of [vendor]

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 30, 2018
@jboyd01 jboyd01 force-pushed the fix-docsite-build branch from efedd4c to 6ba74a6 Compare May 30, 2018 13:46
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 30, 2018
@jpeeler
Copy link

jpeeler commented May 30, 2018

The last error looks like to me that a bundle add public_suffix should fix this. I'm assuming that'll update the gemfile and lock file appropriately.

@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 30, 2018
@jboyd01
Copy link
Contributor Author

jboyd01 commented May 30, 2018

Jeff pointed out wrong/bad to do bundle update. I did a bundle add public_suffix that updated the Gemfile, with the missing gem, changed docs.sh do a bundle install (not an update), then it builds the docsite. Feels more correct.

Copy link
Contributor

@MHBauer MHBauer left a comment

Choose a reason for hiding this comment

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

ran it locally, also works.

my guess is there was an update to the jekyll image on dockerhub.

LGTM

@MHBauer MHBauer added the LGTM1 label May 30, 2018
@@ -36,6 +36,8 @@ exclude:
- proposals
- v1

exclude: [vendor]

Copy link
Contributor

Choose a reason for hiding this comment

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

this is the only thing I don't have any feeling for what it does.

@nilebox nilebox added the LGTM2 label May 30, 2018
@nilebox
Copy link
Contributor

nilebox commented May 30, 2018

LGTM. I have no idea about ruby/jekyll, but since this change makes the build green, seems critical to merge.

@carolynvs
Copy link
Contributor

carolynvs commented May 31, 2018

Shoot, I should have pinned the jekyll image to a version. Yes since I created our site, the upstream k8s.io site moved to Hugo. I'd like to follow their lead (since I totally ripped off their site) and switch over as well at some point.

I'll add an issue for that, since I don't want to use ruby anyway. 😇

@carolynvs
Copy link
Contributor

Thanks for fixing the build, @jboyd01! 💖

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. LGTM1 LGTM2 size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants