You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by dg...@apache.org on 2023/01/16 15:39:30 UTC
[openwhisk-website] branch master updated: Update to modern versions of tools; use rbenv (#504)
This is an automated email from the ASF dual-hosted git repository.
dgrove pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk-website.git
The following commit(s) were added to refs/heads/master by this push:
new 826d082 Update to modern versions of tools; use rbenv (#504)
826d082 is described below
commit 826d082a4a902711d597dd02182945e13d7e62b7
Author: David Grove <dg...@users.noreply.github.com>
AuthorDate: Mon Jan 16 10:39:16 2023 -0500
Update to modern versions of tools; use rbenv (#504)
* Update to modern versions of tools; use rbenv
---
.ruby-version | 2 +-
.travis.yml | 2 +-
Gemfile | 9 ++-------
bin/test | 8 ++++----
tools/jenkins/website_build.groovy | 22 +++++++++-------------
5 files changed, 17 insertions(+), 26 deletions(-)
diff --git a/.ruby-version b/.ruby-version
index 37c2961..ff365e0 100644
--- a/.ruby-version
+++ b/.ruby-version
@@ -1 +1 @@
-2.7.2
+3.1.3
diff --git a/.travis.yml b/.travis.yml
index d3850e8..33ba707 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,6 @@
language: ruby
rvm:
- - 2.4.1
+ - 3.1.3
script: ./bin/test
diff --git a/Gemfile b/Gemfile
index 8de00bc..8efdfe8 100644
--- a/Gemfile
+++ b/Gemfile
@@ -9,14 +9,9 @@ ruby RUBY_VERSION
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
-gem 'jekyll', '3.3.0'
+gem 'jekyll'
-# This is the default theme for new Jekyll sites. You may change this to anything you like.
-# gem 'minima', '~> 2.0'
-
-# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
-# uncomment the line below. To upgrade, run `bundle update github-pages`.
-# gem "github-pages", '104', group: :jekyll_plugins
+gem "webrick", "~> 1.7"
# If you have any plugins, put them here!
group :jekyll_plugins do
diff --git a/bin/test b/bin/test
index 88cdf98..427ddfe 100755
--- a/bin/test
+++ b/bin/test
@@ -15,10 +15,10 @@ bundle exec jekyll build
if [[ $DISABLE_EXTERNAL_SITE_CHECK = "true" ]]; then
# run htmlproofer to test the site
- echo "$ bundle exec htmlproofer ./_site --check-html --disable-external"
- bundle exec htmlproofer ./_site --check-html --disable-external true
+ echo "$ bundle exec htmlproofer ./_site --disable-external"
+ bundle exec htmlproofer ./_site --disable-external true
else
# run htmlproofer to test the site
- echo "$ bundle exec htmlproofer ./_site --check-html"
- bundle exec htmlproofer ./_site --check-html
+ echo "$ bundle exec htmlproofer ./_site"
+ bundle exec htmlproofer ./_site
fi
diff --git a/tools/jenkins/website_build.groovy b/tools/jenkins/website_build.groovy
index d24118d..ad9dd78 100644
--- a/tools/jenkins/website_build.groovy
+++ b/tools/jenkins/website_build.groovy
@@ -2,23 +2,19 @@
node("git-websites") {
sh 'env'
stage('Build') {
- // Run jekyll
+ // Install tools and run jekyll to build site
checkout scm
sh '''
- ls
- pwd
- env
export
- echo "Set ruby path to avoid writing to /usr directory"
- export RUBY_PATH=${WORKSPACE}/shared/.rvm
- export GEM_HOME=${RUBY_PATH}/gems
- curl -sSL https://get.rvm.io | bash -s -- --path ${RUBY_PATH}
- mkdir -p ${GEM_HOME}/gems
- gem install --install-dir ${GEM_HOME} jekyll bundler
- export PATH=${GEM_HOME}/bin:$PATH
+ echo "Install rbenv into the workspace"
+ export RBENV_ROOT=${WORKSPACE}/shared/.rbenv
+ git clone https://github.com/rbenv/rbenv.git ${RBENV_ROOT}
+ eval "$(${RBENV_ROOT}/bin/rbenv init - sh)"
+ git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
+ rbenv install
+ gem install bundler
which bundle
- bundle install --path ${GEM_HOME}
- bundle
+ bundle install
npm install
npm run build:js
bundle exec jekyll build --verbose