Skip to content

Commit

Permalink
Update Travis build
Browse files Browse the repository at this point in the history
With Travis, we :
* generate the documentation
* copy the documentation to the eclipse help plugin
* build the nightly update-site
* build the nightly bundles
* promote the nightly update-site, target platform and bundles under s3
  • Loading branch information
mbats committed Jul 9, 2015
1 parent 401d3d4 commit 1749b42
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 11 deletions.
39 changes: 37 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,49 @@ language: ruby
env:
global:
secure: "KpzAMqnf5+K5PNmZbcoiaSjWS//sVkPlbjrpb662rrkQcZHslqnAVmy2h+OsSaA6pefhRpzrSmys9vu7Ou4ZPNOBgxlmePOUl+MfEXOe+9EO3G6GLooyvzzk/9rsOYuHMiM6hrJZsPWF2NyIibElqE/l6YKuTUH9XOWnVbGZ+oY="

before_script:
- gem install jekyll --version '= 1.5.1'
- gem install RedCloth
- sudo apt-get install -y s3cmd

script:
# Build documentation web site
- cd documentation
- jekyll build
after_script:
- ls
- cd ../
- rm -rf plugins/org.obeonetwork.dsl.uml2.design.doc/html
- cp -r documentation/ plugins/org.obeonetwork.dsl.uml2.design.doc/html
# Build uml designer
- mvn clean verify
# Build uml designer products
- mvn clean package -f releng/org.obeonetwork.dsl.uml2.product.parent/pom.xml
# Prepare local dirs to deploy: copy repository, bundles and tp
- chmod a+x prepare-deploy-local-dir.sh
# Rename the zipped update site to nightly
- mv packaging/org.obeonetwork.dsl.uml2.update/target/org.obeonetwork.dsl.uml2.update-*-SNAPSHOT.zip packaging/org.obeonetwork.dsl.uml2.update/target/org.obeonetwork.dsl.uml2.update-nightly.zip
# Prepare the nightly dir
- ./prepare-deploy-local-dir.sh $TRAVIS_BUILD_DIR/nightly

after_script:
# Promote web site on gh-pages
- chmod a+x travis-promote.sh
- ./travis-promote.sh

before_deploy:
- export NIGHTLY_FOLDER=$TRAVIS_BUILD_DIR/nightly

deploy:
# Deploy nightly on s3
- provider: s3
access_key_id: AKIAJBMGYTQSRYMJHQKQ
secret_access_key:
secure: e7nTVGAnegvoba6ucXEJwJnub8oeWSUVOShQ2XBpxr45/mIPLmF+HtTPN9JpZyG6hK2E5IqQ1bHndjPT9E7blXQKEHPYVzeJd7XBHyzEnS3LMMWeI/TxO73hxScereW/OHYalgTHJK6wynUyqvCf/uO7dqTvpd059Q9DILC6qTI=
bucket: uml-designer
local-dir: ${NIGHTLY_FOLDER}
acl: public_read
skip_cleanup: true
region: eu-central-1
upload-dir: "nightly"
dd:
secure: SVW8lL8L5J7f/AgTRm69vYlOVx+U/grtQM52Ue/ZaHtNhZEuXbz2FmPhMzK3k7Adlqw2vbrzmBe78svbHvMLOuqWGPfcmYlBLeSDQPp8VI6KLpGt+y2UltoSdLKjnXyn6KCerXYm4FTdqxtZDuso52THGNC0Enn3kHv6d9tR4qw=
23 changes: 23 additions & 0 deletions prepare-deploy-local-dir.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#! /usr/bin/env sh
set -e
set -x
UPDATE_SITE_DIR=packaging/org.obeonetwork.dsl.uml2.update/target/
TP=releng/org.obeonetwork.dsl.uml2.target/*.tpd
BUNDLE_DIR=packaging/org.obeonetwork.dsl.uml2.product/target/products/*.zip
DEPLOY_LOCAL_DIR=$1
echo "Prepare deploy local dir = ${DEPLOY_LOCAL_DIR}"
# Create nightly folder
mkdir $DEPLOY_LOCAL_DIR
# Copy update-site and target platform to deploy local dir
cp -r $UPDATE_SITE_DIR/repository $DEPLOY_LOCAL_DIR
cp -r $UPDATE_SITE_DIR/*.zip $DEPLOY_LOCAL_DIR
cp -r $TP $DEPLOY_LOCAL_DIR
echo "ls ${DEPLOY_LOCAL_DIR}"
ls $DEPLOY_LOCAL_DIR
# Create bundles folder
mkdir $DEPLOY_LOCAL_DIR/bundles
# Copy bundles
cp -r $BUNDLE_DIR $DEPLOY_LOCAL_DIR/bundles
echo "ls ${DEPLOY_LOCAL_DIR}/bundles"
ls $DEPLOY_LOCAL_DIR/bundles
exit 0
5 changes: 5 additions & 0 deletions releng/org.obeonetwork.dsl.uml2.common.parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@ Contributors:
</properties>
<build>
<plugins>
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
Expand Down
9 changes: 1 addition & 8 deletions releng/org.obeonetwork.dsl.uml2.product.parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ Contributors:
<name>UML Designer Product Parent</name>

<properties>
<!--uml-site-local>file:${basedir}/../org.obeonetwork.dsl.uml2.update/target/repository</uml-site-local-->
<uml-site>http://marketplace.obeonetwork.com/updates/nightly/uml/repository</uml-site>
<!--sysml-site>http://marketplace.obeonetwork.com/updates/nightly/sysml/repository</sysml-site -->
<uml-site>file:${basedir}/../org.obeonetwork.dsl.uml2.update/target/repository</uml-site>
</properties>

<repositories>
Expand All @@ -37,11 +35,6 @@ Contributors:
<layout>p2</layout>
<url>${uml-site}</url>
</repository>
<!-- repository>
<id>sysml</id>
<layout>p2</layout>
<url>${sysml-site}</url>
</repository -->
</repositories>

<modules>
Expand Down
7 changes: 6 additions & 1 deletion travis-promote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ echo "Build $TRAVIS_JOB_NUMBER"
echo "Git: $TRAVIS_COMMIT [$TRAVIS_BRANCH]"
echo "Root dir: $TRAVIS_BUILD_DIR"
cd $TRAVIS_BUILD_DIR
echo "Promote umldesigner.org web site -- Start"
echo "Clone UML Designer repo"
git clone https://$GITHUB_TOKEN@github.com/ObeoNetwork/UML-Designer.git -b gh-pages --quiet
cd UML-Designer/
Expand All @@ -13,9 +14,13 @@ echo "Copy new generated web site"
cp -r ../documentation/_site/* .
ls
rm -rf ../documentation/_site/
echo "Promote umldesigner.org web site -- End"
git config user.email "[email protected]"
git config user.name "Mélanie Bats"
git status
git add .
git commit -m "Promoting a new website for https://github.com/ObeoNetwork/UML-Designer/commit/$TRAVIS_COMMIT [$TRAVIS_BRANCH]"
git commit -m "Promoting new website for https://github.com/ObeoNetwork/UML-Designer/commit/$TRAVIS_COMMIT [$TRAVIS_BRANCH]"
git status
git push origin gh-pages --quiet &>/dev/null

echo "Build promoted."

0 comments on commit 1749b42

Please sign in to comment.