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 8, 2015
1 parent 401d3d4 commit 757fd97
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 12 deletions.
49 changes: 46 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,58 @@
language: ruby
env:
global:
secure: "KpzAMqnf5+K5PNmZbcoiaSjWS//sVkPlbjrpb662rrkQcZHslqnAVmy2h+OsSaA6pefhRpzrSmys9vu7Ou4ZPNOBgxlmePOUl+MfEXOe+9EO3G6GLooyvzzk/9rsOYuHMiM6hrJZsPWF2NyIibElqE/l6YKuTUH9XOWnVbGZ+oY="
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:
- 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
- mvn clean verify
- find packaging/org.obeonetwork.dsl.uml2.update/target/ -mindepth 1 -maxdepth 1 -not -name '*.zip' -not -name 'repository' -print0 | xargs -0 rm -rf
- 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
- mvn clean package -f releng/org.obeonetwork.dsl.uml2.product.parent/pom.xml
- find packaging/org.obeonetwork.dsl.uml2.product/target/products/ -mindepth 1 -maxdepth 1 -not -name '*.zip' -print0 | xargs -0 rm -rf
- find releng/org.obeonetwork.dsl.uml2.target/ -mindepth 1 -maxdepth 1 -not -name '*.tpd' -print0 | xargs -0 rm -rf
- if [[ "$TRAVIS_TAG" == "" ]]; then mkdir nightly; cp -r packaging/org.obeonetwork.dsl.uml2.update/target/ nightly; cp -r releng/org.obeonetwork.dsl.uml2.target/ nightly; mkdir nightly/bundles; cp -r packaging/org.obeonetwork.dsl.uml2.product/
- if [[ "$TRAVIS_TAG" != "" ]]; then mkdir ${TRAVIS_TAG}; cp -r packaging/org.obeonetwork.dsl.uml2.update/target/ ${TRAVIS_TAG}; mkdir ${TRAVIS_TAG}/bundles; cp -r packaging/org.obeonetwork.dsl.uml2.product/target/products/ ${TRAVIS_TAG}/bundles; exit 0; fi
- ls ${TRAVIS_TAG}
- ls ${TRAVIS_TAG}/bundles
after_script:
- chmod a+x travis-promote.sh
- ./travis-promote.sh
before_deploy:
- export NIGHTLY=$TRAVIS_BUILD_DIR/nightly
- if [[ "$TRAVIS_TAG" == "" ]]; then s3cmd del -r s3://uml-designer/nightly; exit 0; fi
- if [[ "$TRAVIS_TAG" != "" ]]; then export RELEASE_TAG=$TRAVIS_BUILD_DIR/$TRAVIS_TAG; exit 0; fi
deploy:
- provider: s3
access_key_id: AKIAJBMGYTQSRYMJHQKQ
secret_access_key:
secure: e7nTVGAnegvoba6ucXEJwJnub8oeWSUVOShQ2XBpxr45/mIPLmF+HtTPN9JpZyG6hK2E5IqQ1bHndjPT9E7blXQKEHPYVzeJd7XBHyzEnS3LMMWeI/TxO73hxScereW/OHYalgTHJK6wynUyqvCf/uO7dqTvpd059Q9DILC6qTI=
bucket: uml-designer
local-dir: ${NIGHTLY}
acl: public_read
skip_cleanup: true
region: eu-central-1
upload-dir: "nightly"
- provider: s3
access_key_id: AKIAJBMGYTQSRYMJHQKQ
secret_access_key:
secure: e7nTVGAnegvoba6ucXEJwJnub8oeWSUVOShQ2XBpxr45/mIPLmF+HtTPN9JpZyG6hK2E5IqQ1bHndjPT9E7blXQKEHPYVzeJd7XBHyzEnS3LMMWeI/TxO73hxScereW/OHYalgTHJK6wynUyqvCf/uO7dqTvpd059Q9DILC6qTI=
bucket: uml-designer
local-dir: ${RELEASE_TAG}
acl: public_read
skip_cleanup: true
region: eu-central-1
upload-dir: "release"
on:
tags: true
all_branches: true
repo: ObeoNetwork/UML-Designer
dd:
secure: SVW8lL8L5J7f/AgTRm69vYlOVx+U/grtQM52Ue/ZaHtNhZEuXbz2FmPhMzK3k7Adlqw2vbrzmBe78svbHvMLOuqWGPfcmYlBLeSDQPp8VI6KLpGt+y2UltoSdLKjnXyn6KCerXYm4FTdqxtZDuso52THGNC0Enn3kHv6d9tR4qw=
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 757fd97

Please sign in to comment.