Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
61 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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
docker: | ||
image: yegor256/java8 | ||
assets: | ||
settings.xml: teamed/home#assets/zerocracy/settings.xml | ||
id_rsa: teamed/home#assets/heroku-key | ||
id_rsa.pub: teamed/home#assets/heroku-key.pub | ||
s3cfg: teamed/home#assets/s3cfg | ||
env: | ||
MAVEN_OPTS: -XX:MaxPermSize=256m -Xmx1g | ||
install: |- | ||
sudo gem install pdd | ||
java -version | ||
deploy: | ||
script: | | ||
mvn clean install -Prultor --settings ../settings.xml | ||
mvn clean | ||
pdd --source=$(pwd) --verbose --file=zc-farm.xml | ||
s3cmd --no-progress put zc-farm.xml --config=../s3cfg s3://pdd.teamed.io/zc-farm.xml | ||
release: | ||
script: | | ||
mvn versions:set "-DnewVersion=${tag}" | ||
git commit -am "${tag}" | ||
cp ../settings.xml settings.xml | ||
mvn clean package -Pqulice -Pzerocracy --errors --batch-mode | ||
git remote add heroku git@heroku.com:zc-farm.git | ||
mkdir ~/.ssh | ||
mv ../id_rsa ../id_rsa.pub ~/.ssh | ||
chmod -R 600 ~/.ssh/* | ||
echo -e "Host *\n StrictHostKeyChecking no\n UserKnownHostsFile=/dev/null" > ~/.ssh/config | ||
git add settings.xml | ||
git commit -m 'settings.xml' | ||
git fetch | ||
git push -f heroku $(git symbolic-ref --short HEAD):master | ||
git reset HEAD~1 | ||
curl -f --connect-timeout 15 --retry 5 --retry-delay 30 http://farm.zerocracy.com > /dev/null | ||
# mvn clean site-deploy -Psite --batch-mode --settings ../settings.xml | ||
commanders: | ||
- yegor256 | ||
merge: | ||
script: |- | ||
mvn help:system clean install -Pqulice --settings ../settings.xml | ||
mvn clean site -Psite --settings ../settings.xml | ||
mvn clean | ||
pdd --source=$(pwd) --verbose --file=/dev/null | ||
commanders: [] | ||
architect: | ||
- yegor256 | ||
- karato |
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,2 @@ | ||
web: java -Dfile.encoding=UTF-8 -Xmx400m -XX:MaxPermSize=64m -cp target/farm.jar:target/deps/* com.zerocracy.farm.Main --port=${PORT} --threads=50 --max-latency=45000 | ||
|
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,10 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
cd $(dirname $0) | ||
cp /code/home/assets/zerocracy/settings.xml . | ||
git add settings.xml | ||
git commit -m 'settings.xml for heroku' | ||
trap 'git reset HEAD~1 && rm settings.xml' EXIT | ||
git push heroku master -f | ||
|
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 @@ | ||
java.runtime.version=1.8 |