You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2022/04/07 06:23:45 UTC
[struts-site] branch test-build updated: Splits into stages
This is an automated email from the ASF dual-hosted git repository.
lukaszlenart pushed a commit to branch test-build
in repository https://gitbox.apache.org/repos/asf/struts-site.git
The following commit(s) were added to refs/heads/test-build by this push:
new 94f568f54 Splits into stages
94f568f54 is described below
commit 94f568f549d5e2c47950f92c382ff405ae4d3d05
Author: Lukasz Lenart <lu...@apache.org>
AuthorDate: Thu Apr 7 08:23:41 2022 +0200
Splits into stages
---
Jenkinsfile | 76 +++++++++++++++++++++++++++++++++----------------------------
1 file changed, 41 insertions(+), 35 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 10fa35b73..363878585 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -17,41 +17,47 @@ pipeline {
GEM_HOME="${RUBY_PATH}/gems"
PATH="${GEM_HOME}/bin:${env.PATH}"
}
- steps {
- sh """
- echo Generiting a new version of website
-
- curl -sSL https://get.rvm.io | bash -s -- --path ${RUBY_PATH}
- mkdir -p ${GEM_HOME}
- gem install --install-dir ${GEM_HOME} bundler -v '2.1.4'
-
- bundle install --path ${GEM_HOME}
- bundle
- bundle exec jekyll build
- """
- sh """
- echo "Pushing changes into stage site"
-
- if ! git config remote.asf.url > /dev/null; then
- git remote add asf https://gitbox.apache.org/repos/asf/struts-site.git
- fi
-
- git checkout asf-staging
- git pull asf asf-staging
-
- cp -r _site/* content
- cp -r _site/.htaccess content/.htaccess
-
- git add content/*
- git add content/.htaccess
- git status
-
- git commit -m "Updates stage by Jenkins" --allow-empty
- git push asf asf-staging
- git checkout master
- """
- if (env.CHANGE_ID) {
- pullRequest.comment("Staged site is ready at https://struts.staged.apache.org/")
+ stages {
+ stage {
+ steps {
+ sh """
+ echo Generiting a new version of website
+
+ curl -sSL https://get.rvm.io | bash -s -- --path ${RUBY_PATH}
+ mkdir -p ${GEM_HOME}
+ gem install --install-dir ${GEM_HOME} bundler -v '2.1.4'
+
+ bundle install --path ${GEM_HOME}
+ bundle
+ bundle exec jekyll build
+ """
+ sh """
+ echo "Pushing changes into stage site"
+
+ if ! git config remote.asf.url > /dev/null; then
+ git remote add asf https://gitbox.apache.org/repos/asf/struts-site.git
+ fi
+
+ git checkout asf-staging
+ git pull asf asf-staging
+
+ cp -r _site/* content
+ cp -r _site/.htaccess content/.htaccess
+
+ git add content/*
+ git add content/.htaccess
+ git status
+
+ git commit -m "Updates stage by Jenkins" --allow-empty
+ git push asf asf-staging
+ git checkout master
+ """
+ }
+ }
+ stage {
+ if (env.CHANGE_ID) {
+ pullRequest.comment("Staged site is ready at https://struts.staged.apache.org/")
+ }
}
}
}