This repository has been archived by the owner on Jan 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Flibio
committed
Jul 31, 2016
1 parent
bab266b
commit 59fdf02
Showing
3 changed files
with
54 additions
and
1 deletion.
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,11 @@ | ||
language: java | ||
jdk: | ||
- oraclejdk8 | ||
notifications: | ||
email: false | ||
install: | ||
- 'chmod +x ./gradlew' | ||
script: gradle shadowJar | ||
after_success: | ||
- 'chmod +x ./continuum.sh' | ||
- './continuum.sh' |
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
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,42 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Configuration # | ||
TARGET="http://continuum.flibio.net/api/" | ||
PROJECT="EconomyLite" | ||
BRANCH="develop" | ||
UPLOAD="${TRAVIS_BUILD_DIR}/build/libs/*.jar" | ||
|
||
# Make sure the branch is correct # | ||
|
||
if [[ "${TRAVIS_BRANCH}" != "${BRANCH}" ]]; then | ||
echo "Incorrect branch, stopping script!" | ||
exit; | ||
fi | ||
|
||
# Install JQ # | ||
|
||
wget http://stedolan.github.io/jq/download/linux64/jq | ||
chmod +x ./jq | ||
sudo cp /usr/bin | ||
|
||
# Create a new Continuum build # | ||
echo $(curl -v -X POST -d "project=${PROJECT}&commit=${TRAVIS_COMMIT}&job=${TRAVIS_BUILD_ID}" -u continuum:${CONTINUUM_TOKEN} "${TARGET}newbuild.php") >> response.json | ||
BUILD=$(jq '.build' response.json | tr -d '"') | ||
STATUS=$(jq '.status' response.json | tr -d '"') | ||
|
||
echo "New build status: ${STATUS}" | ||
echo "New build number: ${BUILD}" | ||
|
||
# Check if the build was created successfully # | ||
if [[ ${BUILD} -gt 0 ]]; then | ||
echo "Created build ${BUILD}!" | ||
|
||
# Upload the files # | ||
for f in $UPLOAD | ||
do | ||
echo "Attempting to add artifact ${f}" | ||
echo $(curl -v -X POST --form "file=@${f};filename=${f}" --form "project=${PROJECT}" --form "build=${BUILD}" -u continuum:${CONTINUUM_TOKEN} "${TARGET}upload.php") | ||
done | ||
else | ||
echo "Failed to create a build!" | ||
fi |