From 1749b422c265f6385dbee1b3781f628b1d3564c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9lanie=20Bats?= Date: Mon, 6 Jul 2015 16:59:26 +0200 Subject: [PATCH] Update Travis build 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 --- .travis.yml | 39 ++++++++++++++++++- prepare-deploy-local-dir.sh | 23 +++++++++++ .../pom.xml | 5 +++ .../pom.xml | 9 +---- travis-promote.sh | 7 +++- 5 files changed, 72 insertions(+), 11 deletions(-) create mode 100755 prepare-deploy-local-dir.sh diff --git a/.travis.yml b/.travis.yml index e5b236d5e..dbadd4ff3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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= diff --git a/prepare-deploy-local-dir.sh b/prepare-deploy-local-dir.sh new file mode 100755 index 000000000..851a704c2 --- /dev/null +++ b/prepare-deploy-local-dir.sh @@ -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 diff --git a/releng/org.obeonetwork.dsl.uml2.common.parent/pom.xml b/releng/org.obeonetwork.dsl.uml2.common.parent/pom.xml index 5015cdcb4..0e33ad429 100644 --- a/releng/org.obeonetwork.dsl.uml2.common.parent/pom.xml +++ b/releng/org.obeonetwork.dsl.uml2.common.parent/pom.xml @@ -209,6 +209,11 @@ Contributors: + + org.eluder.coveralls + coveralls-maven-plugin + 3.1.0 + org.jacoco jacoco-maven-plugin diff --git a/releng/org.obeonetwork.dsl.uml2.product.parent/pom.xml b/releng/org.obeonetwork.dsl.uml2.product.parent/pom.xml index 0e8842330..2b5d8ac6c 100644 --- a/releng/org.obeonetwork.dsl.uml2.product.parent/pom.xml +++ b/releng/org.obeonetwork.dsl.uml2.product.parent/pom.xml @@ -26,9 +26,7 @@ Contributors: UML Designer Product Parent - - http://marketplace.obeonetwork.com/updates/nightly/uml/repository - + file:${basedir}/../org.obeonetwork.dsl.uml2.update/target/repository @@ -37,11 +35,6 @@ Contributors: p2 ${uml-site} - diff --git a/travis-promote.sh b/travis-promote.sh index 3bdc221b1..cbd411b77 100644 --- a/travis-promote.sh +++ b/travis-promote.sh @@ -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/ @@ -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 "melanie.bats@obeo.fr" 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."