-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See #52 Move CI build to Travis
- Loading branch information
Showing
5 changed files
with
94 additions
and
0 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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
bin/ | ||
target/ | ||
deploy-key | ||
Thumbs.db | ||
.DS_Store | ||
hs_err_pid*.log | ||
|
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,43 @@ | ||
#!/bin/bash | ||
|
||
function error_exit | ||
{ | ||
echo -e "\e[01;31m$1\e[00m" 1>&2 | ||
exit 1 | ||
} | ||
|
||
if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then | ||
echo -e "Starting to deploy to gh-pages...\n" | ||
|
||
# create and cd into temporary deployment work directory | ||
mkdir deployment-work | ||
cd deployment-work | ||
|
||
# setup ssh agent | ||
ENCRYPTED_KEY="encrypted_${ENCRYPTION_LABEL}_key" | ||
ENCRYPTED_IV="encrypted_${ENCRYPTION_LABEL}_iv" | ||
openssl aes-256-cbc -K ${!ENCRYPTED_KEY} -iv ${!ENCRYPTED_IV} -in deploy-key.enc -out deploy-key -d | ||
chmod 600 deploy-key | ||
eval `ssh-agent -s` | ||
ssh-add deploy-key | ||
|
||
# setup git and clone from gh-pages branch | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Travis Deployer" | ||
git clone --quiet --branch=gh-pages [email protected]:${TRAVIS_REPO_SLUG}.git . > /dev/null 2>&1 || error_exit "Error cloning gh-pages" | ||
|
||
# clean the repository directory, then copy the build result into it | ||
git rm -rf repository | ||
mkdir -p repository | ||
cp -rf ../com.codeaffine.extras.repository/target/repository/* ./repository | ||
|
||
# add, commit and push files | ||
git add -f repository | ||
git commit -m "[ci skip] Deploy Travis build #${TRAVIS_BUILD_NUMBER} to gh-pages" | ||
git push -fq origin gh-pages > /dev/null 2>&1 || error_exit "Error uploading the build result to gh-pages" | ||
|
||
# go back to the directory where we started | ||
cd .. | ||
|
||
echo -e "Done with deployment to gh-pages\n" | ||
fi |
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,49 @@ | ||
env: | ||
global: | ||
- ENCRYPTION_LABEL: "8c7035aad7a2" | ||
|
||
install: true | ||
|
||
sudo: false | ||
|
||
language: java | ||
|
||
jdk: | ||
- oraclejdk8 | ||
|
||
branches: | ||
only: | ||
- master | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- gnome-themes-standard | ||
- metacity | ||
- libwebkit-dev | ||
|
||
script: | ||
- mvn -q -f clean verify -Dtarget-platform-classifier=eclipse-4.5 | ||
- mvn -q -f clean verify -Dtarget-platform-classifier=eclipse-4.6 | ||
- mvn -q -f clean verify -Dtarget-platform-classifier=eclipse-4.7 | ||
|
||
before_install: | ||
- openssl aes-256-cbc -K $encrypted_8c7035aad7a2_key -iv $encrypted_8c7035aad7a2_iv -in deploy-key.enc -out deploy-key -d | ||
|
||
before_script: | ||
- export DISPLAY=:99.0 | ||
- sh -e /etc/init.d/xvfb start | ||
- sleep 5 | ||
- metacity --sm-disable --replace & | ||
- sleep 5 | ||
|
||
after_success: | ||
- chmod a+x .travis-deploy.sh | ||
- "./.travis-deploy.sh" | ||
|
||
after_failure: | ||
- cat com.codeaffine.extras.ide.test/target/surefire-reports/*.txt | ||
- cat com.codeaffine.extras.imageviewer.test/target/surefire-reports/*.txt | ||
- cat com.codeaffine.extras.jdt.test/target/surefire-reports/*.txt | ||
- cat com.codeaffine.extras.launch.test/target/surefire-reports/*.txt | ||
- cat com.codeaffine.extras.workingset.test/target/surefire-reports/*.txt |
Binary file not shown.
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 @@ | ||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQChsMtb4TQbmU2zfl/9Fs/Yh6vpP2ebdSNKb6qsxsg/BNIENQQrCusF6ZflsJeZiX1gOMvm5DitA+7wVuQLFx3rwo9Q2ZnAdOxO2u+MqwP9lt1HAQLwgzolkNVxmyV/c4BkL/n/NZpYyU+7b7SjLEbdEMpOof2mYc1GHOo8E8krPVTBEWuMederPvQ6qH3m5jidH7cs/e7BAEyvxlgpkj8+enexZ4seilsCbplo1dHBEOr9N0eV51XhkuMhZQZ9lNDTVSOvB+IHtgh/9KfevomNEWuLxqdCF/Pb8sutSlo+1yheAH0e6NsnCKvEWFWTr1sDVQOaetlTrxZGbt1gl0Zi1MXWH6+KEMMiKgDjqOytEo274b2TUonjPFTq8iZF2JJrKBuAdwoxnQEf2bPwrjOhqSbLHZDSuxSPm2YjoppcCbfh3xSGb4mnqekaGenh61YrHK0/Bq8eAl8swWWEYUSm+sOucJxFYQB62FCwV8lROS5DelOoTALdB2GtbGmrgc3nUT9poAHcFHBp7rrx4U6caaWbRv6Ty2IJZGzxfveIUUTVjm3Ie44FO5dwbM0EwvEqWW4DSEkAPeYV4x/jK5482eIa54I2KusK4tQSqaOwWZ7DzAaKq7tCm4Wl4CC8ViMPI3V2qUx6a47pPtSVLwsLa95jHEKfZNYFvp4CoOXWQw== [email protected] |