This is an automated email from the ASF dual-hosted git repository.
lukaszlenart pushed a commit to branch results
in repository https://gitbox.apache.org/repos/asf/struts-site.git
The following commit(s) were added to refs/heads/results by this push:
new 32c6ebc20 Builds with Docker and moves content out of Docker
32c6ebc20 is described below
commit 32c6ebc20a54495bbc1a53ee62ce2f54e32e5f3e
Author: Lukasz Lenart <[email protected]>
AuthorDate: Fri Oct 14 09:06:07 2022 +0200
Builds with Docker and moves content out of Docker
---
Jenkinsfile | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 6c31777fe..11376c449 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -15,6 +15,7 @@ pipeline {
agent {
docker {
image 'jekyll/builder:4.2.2'
+ args "-e DESTINATION=${env.WORKSPACE}"
}
}
steps {
@@ -26,22 +27,29 @@ pipeline {
bundle config set --local path $GEM_HOME
bundle install
bundle exec jekyll build
-
- rm -rf $GEM_HOME
-
+
+ mv _site $DESTINATION
+ '''
+ }
+ }
+ stage('Deploy to stage area') {
+ steps {
+ sh '''
echo "Pushing changes into stage site"
+
+ pwd
+ ls -la
if ! git config remote.asf.url > /dev/null; then
git remote add asf
https://gitbox.apache.org/repos/asf/struts-site.git
fi
- git config --local user.email "[email protected]"
- git config --local user.name "Mr. Jenkins"
-
git fetch asf
git checkout asf-staging
git pull asf asf-staging
+ ls -la
+
cp -r _site/* content
cp -r _site/.htaccess content/.htaccess