Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#1246] Adapt website deploy to move to Gerrit
- Configure build in Jenkinsfile - Configure Javascript runtime in Gemfile Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
- Loading branch information
Karsten Thoms
committed
Aug 28, 2018
1 parent
194f3af
commit 5dd27f4
Showing
3 changed files
with
88 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
pipeline { | ||
agent any | ||
|
||
triggers { | ||
pollSCM('H/2 * * * *') | ||
} | ||
|
||
stages { | ||
stage ('Checkout') { | ||
steps { | ||
sshagent(['29d79994-c415-4a38-9ab4-7463971ba682']) { // | ||
sh ''' | ||
rm -rf deploy-xtext-git-repo | ||
rm -rf deploy-xtend-git-repo | ||
git clone -b master ssh://genie.xtext@git.eclipse.org:29418/www.eclipse.org/Xtext deploy-xtext-git-repo | ||
git clone -b master ssh://genie.xtext@git.eclipse.org:29418/www.eclipse.org/xtend deploy-xtend-git-repo | ||
''' | ||
} | ||
} | ||
} | ||
stage('Generate site') { | ||
steps { | ||
echo 'Building..' | ||
dir ('git-repo/xtext-website') { | ||
sh ''' | ||
# generate things in _site | ||
~/.rvm/gems/ruby-2.2.0/wrappers/jekyll build | ||
''' | ||
} | ||
dir ('git-repo/xtend-website') { | ||
sh ''' | ||
# generate things in _site | ||
~/.rvm/gems/ruby-2.2.0/wrappers/jekyll build | ||
''' | ||
} | ||
} | ||
} | ||
stage('Commit changes') { | ||
steps { | ||
dir ('deploy-xtext-git-repo') { | ||
sh ''' | ||
cp -r $WORKSPACE/git-repo/xtext-website/_site/* . | ||
git diff | ||
git add --all :/ && git commit -m "Generated from commit: https://github.com/eclipse/xtext/commit/$GIT_COMMIT" | ||
git status | ||
''' | ||
} | ||
dir ('deploy-xtend-git-repo') { | ||
sh ''' | ||
cp -r $WORKSPACE/git-repo/xtend-website/_site/* . | ||
git diff | ||
git add --all :/ && git commit -m "Generated from commit: https://github.com/eclipse/xtext/commit/$GIT_COMMIT" | ||
git status | ||
''' | ||
} | ||
} | ||
} | ||
stage('Deploy') { | ||
steps { | ||
echo 'Deploying....' | ||
dir ('deploy-xtext-git-repo') { | ||
sshagent(['29d79994-c415-4a38-9ab4-7463971ba682']) { // | ||
sh ''' | ||
git push origin master | ||
''' | ||
} | ||
deleteDir() | ||
} | ||
dir ('deploy-xtend-git-repo') { | ||
sshagent(['29d79994-c415-4a38-9ab4-7463971ba682']) { // | ||
sh ''' | ||
git push origin master | ||
''' | ||
} | ||
deleteDir() | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem 'therubyracer' | ||
gem 'execjs' | ||
|
||
group :jekyll_plugins do | ||
gem 'jekyll-markdown-block' | ||
gem 'wdm', '>= 0.1.0' if Gem.win_platform? | ||
gem 'wdm', '>= 0.1.0' if Gem.win_platform? | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem 'therubyracer' | ||
gem 'execjs' | ||
|
||
group :jekyll_plugins do | ||
gem 'jekyll-markdown-block' | ||
gem 'wdm', '>= 0.1.0' if Gem.win_platform? | ||
gem 'wdm', '>= 0.1.0' if Gem.win_platform? | ||
end |