diff --git a/.gitignore b/.gitignore index 0c9d47c18..4fa332f5c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ build .gradle .idea *.iml +ci/variables.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..a1e90fb53 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,42 @@ +dist: trusty +sudo: false +notifications: + email: false +env: + - RELEASE_TAG="release-$TRAVIS_BUILD_NUMBER" +if: tag IS blank + + +jobs: + include: + - stage: build and publish + language: java + jdk: oraclejdk8 + before_install: + - echo $TRAVIS_BUILD_DIR + - chmod +x gradlew + install: skip + script: ./gradlew clean build + before_deploy: + - git config --local user.name "Arun Nair" + - git config --local user.email "e034391@mastercard.com" + - git tag -f $RELEASE_TAG + deploy: + provider: releases + api_key: $GITHUB_OAUTH_TOKEN + file: "build/libs/pal-tracker.jar" + skip_cleanup: true + - stage: deploy to review + language: bash + script: + - echo "Downloading $RELEASE_TAG" + - wget -P build/libs/pal-tracker.jar + before_deploy: + - echo "Deploying $RELEASE_TAG to review" + deploy: + provider: cloudfoundry + api: $CF_API_URL + username: $CF_USERNAME + password: $CF_PASSWORD + organization: $CF_ORG + space: review