This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts-site.git
The following commit(s) were added to refs/heads/master by this push: new 738e1a04d Uses Docker to build staged site 738e1a04d is described below commit 738e1a04d0c47f9ecd8eb4f7c69b5c4fcebfee38 Author: Lukasz Lenart <lukaszlen...@apache.org> AuthorDate: Fri Oct 7 08:54:37 2022 +0200 Uses Docker to build staged site --- Gemfile.lock | 6 +++--- Jenkinsfile | 13 +++++-------- docker-build.fish | 5 ----- docker-build.sh | 2 +- docker-run.fish | 3 --- docker-run.sh | 5 ----- docker/Dockerfile | 21 --------------------- source/_plugins/remote_file_content.rb | 2 +- 8 files changed, 10 insertions(+), 47 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6a10d368d..31c2f9b4a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -33,7 +33,7 @@ GEM sassc (> 2.0.1, < 3.0) jekyll-watch (2.2.1) listen (~> 3.0) - json (2.6.2) + json (2.6.1) kramdown (2.4.0) rexml kramdown-parser-gfm (1.1.0) @@ -59,11 +59,11 @@ GEM unicode-display_width (1.8.0) PLATFORMS - x86_64-darwin-21 + x86_64-linux-musl DEPENDENCIES jekyll json BUNDLED WITH - 2.3.13 + 2.3.22 diff --git a/Jenkinsfile b/Jenkinsfile index 42c6f5cf5..5a7eca8a5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,16 +16,13 @@ pipeline { } stages { stage('Build a staged website') { + agent { + docker { + image 'jekyll/jekyll:4.2.2' + } + } steps { sh """ - echo Generiting a new version of website - rvm install 2.7.6 - - mkdir -p ${GEM_HOME} - gem install --install-dir ${GEM_HOME} bundler -v '2.3.13' - - bundle install --path ${GEM_HOME} - bundle bundle exec jekyll build """ } diff --git a/docker-build.fish b/docker-build.fish deleted file mode 100755 index f950c1130..000000000 --- a/docker-build.fish +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/local/bin/fish -set -x JEKYLL_VERSION 3.8 - -docker run --rm -v $PWD:/srv/jekyll -it jekyll/jekyll:$JEKYLL_VERSION jekyll build - diff --git a/docker-build.sh b/docker-build.sh index f33173811..95277602e 100755 --- a/docker-build.sh +++ b/docker-build.sh @@ -1,5 +1,5 @@ #!/bin/sh -export JEKYLL_VERSION=3.8 +export JEKYLL_VERSION=4.2.2 docker run --rm -v $PWD:/srv/jekyll -it jekyll/jekyll:$JEKYLL_VERSION jekyll build diff --git a/docker-run.fish b/docker-run.fish deleted file mode 100755 index 94e0a8843..000000000 --- a/docker-run.fish +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/local/bin/fish - -docker run --rm -v $PWD:/srv/jekyll -it -p 4000:4000 jekyll/jekyll:3.8 jekyll serve --watch --trace --host 0.0.0.0 --force_polling --incremental diff --git a/docker-run.sh b/docker-run.sh deleted file mode 100755 index ff1efab5b..000000000 --- a/docker-run.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -export JEKYLL_VERSION=3.8 - -docker run --rm -v $PWD:/srv/jekyll -it -p 4000:4000 jekyll/jekyll:$JEKYLL_VERSION jekyll serve --watch --trace --host 0.0.0.0 --force_polling --incremental - diff --git a/docker/Dockerfile b/docker/Dockerfile deleted file mode 100644 index eb4303a59..000000000 --- a/docker/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM alpine -MAINTAINER Lukasz Lenart <lukaszlen...@apache.org> -LABEL Description="This image is used to support building Apache Struts main website" -RUN \ - apk update && \ - apk upgrade && \ - apk add bash sudo curl-dev ruby-dev build-base libffi-dev && \ - apk add ruby ruby-io-console ruby-bundler nodejs && \ - gem clean && gem install bundler io-console --pre --no-document && \ - sudo rm -rf /usr/lib/ruby/gems/*/cache/*.gem && \ - rm -rf /var/cache/apk/* && \ - addgroup -S -g 1000 jekyll && \ - adduser -S -G jekyll -u 1000 -h /home/jekyll -D jekyll && \ - mkdir -p /srv/jekyll && \ - chown jekyll:jekyll /srv/jekyll && \ - echo "jekyll ALL=NOPASSWD:ALL" >> /etc/sudoers - -EXPOSE 4000 -WORKDIR /srv/jekyll -USER jekyll -ENTRYPOINT bundle install && bundle exec jekyll build && bundle exec jekyll serve --watch --trace --host=0.0.0.0 --force_polling --incremental diff --git a/source/_plugins/remote_file_content.rb b/source/_plugins/remote_file_content.rb index b81e1b7ca..090dddf94 100644 --- a/source/_plugins/remote_file_content.rb +++ b/source/_plugins/remote_file_content.rb @@ -28,7 +28,7 @@ module Jekyll end def fetchContent(url) - Net::HTTP.get(URI.parse(URI.encode(url.strip))) + Net::HTTP.get(URI.parse(url.strip)) end end end