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/15 23:13:07 UTC
[openwhisk-website] 01/01: Update to modern versions of tools; use rbenv
This is an automated email from the ASF dual-hosted git repository.
dgrove pushed a commit to branch debug-jenkins
in repository https://gitbox.apache.org/repos/asf/openwhisk-website.git
commit b1e789776c66417ee411a732871b3af0ef23d6f3
Author: David Grove <gr...@us.ibm.com>
AuthorDate: Fri Sep 2 16:44:32 2022 -0400
Update to modern versions of tools; use rbenv
---
.ruby-version | 2 +-
Gemfile | 9 ++-------
tools/jenkins/website_build.groovy | 22 +++++++++-------------
3 files changed, 12 insertions(+), 21 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/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/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