This repository has been archived by the owner on Dec 6, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Deploy changes according to ops config * Use ops artifact bucket * Latest release as well as tagged releases * Latest master as well as per-build master * Make single reusable file
- Loading branch information
Showing
2 changed files
with
63 additions
and
7 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,27 +1,46 @@ | ||
sudo: required | ||
|
||
language: scala | ||
|
||
jdk: | ||
- oraclejdk8 | ||
- oraclejdk8 | ||
|
||
addons: | ||
apt: | ||
packages: # Required for docker build | ||
- net-tools | ||
# These directories are cached to S3 at the end of the build | ||
packages: | ||
- net-tools | ||
|
||
cache: | ||
directories: | ||
- $HOME/.ivy2/cache | ||
- $HOME/.sbt/boot/ | ||
- "$HOME/.ivy2/cache" | ||
- "$HOME/.sbt/boot/" | ||
|
||
before_cache: | ||
# Tricks to avoid unnecessary cache updates | ||
- find $HOME/.ivy2 -name "ivydata-*.properties" -delete | ||
- find $HOME/.sbt -name "*.lock" -delete | ||
|
||
services: | ||
- docker | ||
|
||
scala: | ||
- 2.11.8 | ||
|
||
env: | ||
- DOCKER_DIR="../docker/" | ||
|
||
script: | ||
- sbt ci | ||
|
||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) | ||
|
||
before_deploy: | ||
- export JAR="target/scala-2.11/telemetry-streaming-assembly-0.1-SNAPSHOT.jar" | ||
|
||
deploy: | ||
- provider: script | ||
script: bash deploy.sh | ||
skip_cleanup: true | ||
on: | ||
repo: mozilla/telemetry-streaming | ||
all_branches: true |
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,37 @@ | ||
#!/bin/bash | ||
|
||
if [[ -z "$JAR" ]]; then | ||
echo "Missing arguments!" 1>&2 | ||
exit 1 | ||
fi | ||
|
||
TRAVIS_REPO_OWNER=${TRAVIS_REPO_SLUG%/*} | ||
SLUG=${TRAVIS_REPO_SLUG#*/} | ||
JAR_DIR="$TRAVIS_REPO_OWNER/$SLUG" | ||
JAR_NAME="$SLUG.jar" | ||
TXT_NAME="$SLUG.txt" | ||
|
||
sbt assembly | ||
|
||
if [[ -z "$TRAVIS_TAG" ]]; then | ||
BRANCH_OR_TAG=$TRAVIS_BRANCH | ||
ID=$TRAVIS_JOB_NUMBER | ||
else | ||
BRANCH_OR_TAG=tags | ||
ID=$TRAVIS_TAG | ||
fi | ||
|
||
CANONICAL_JAR="$JAR_DIR/$BRANCH_OR_TAG/$ID/$JAR_NAME" | ||
echo $CANONICAL_JAR > $TXT_NAME | ||
|
||
mkdir -p $JAR_DIR/$BRANCH_OR_TAG/$ID | ||
cp $JAR $CANONICAL_JAR | ||
cp $JAR "$JAR_DIR/$BRANCH_OR_TAG/$JAR_NAME" | ||
cp $TXT_NAME "$JAR_DIR/$BRANCH_OR_TAG/$TXT_NAME" | ||
|
||
curl -sL https://raw.githubusercontent.com/travis-ci/artifacts/master/install | bash | ||
|
||
export ARTIFACTS_PERMISSIONS="public-read" | ||
export ARTIFACTS_PATHS="$TRAVIS_REPO_OWNER/" | ||
export ARTIFACTS_TARGET_PATHS="/$TRAVIS_REPO_OWNER/" | ||
artifacts upload |