Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P10 #10

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
38 changes: 30 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
language: python
install: "pip install -r requirements.txt"
language: java
jdk:
- oraclejdk9

services:
- docker

env:
- COVERAGE=0.057 BUILD_TARGET=./monolithic/ui
- COVERAGE=0.148 BUILD_TARGET=./monolithic/service/cart
- COVERAGE=0.0 BUILD_TARGET=./monolithic/service/user
- COVERAGE=0.31 BUILD_TARGET=./monolithic/repository/order
- COVERAGE=0.0 BUILD_TARGET=./monolithic/repository/cart
- COVERAGE=0.124 BUILD_TARGET=./monolithic/repository/product
- COVERAGE=0.318 BUILD_TARGET=./monolithic/repository/user


install:
- ./gradlew clean jar

script:
# Run ANSIBLE checks
# - ANSIBLE0008: Disabled for use of sudo warnings - to address
# - ANSIBLE0011: Disabled for all tasks which should be named
# - ANSIBLE0012: Disabled (should not change if nothings needs doing) - to address
# - ANSIBLE0013: Disabled - few uses of shell commands - to address
- find vagrant/provision -name "*.yml" -exec ansible-lint -x ANSIBLE008,ANSIBLE0011,ANSIBLE0012,ANSIBLE0013 {} +
# - echo 'testing coming soon'
- ./gradlew -p $BUILD_TARGET check

after_success:
- find . -name jacocoTestReport.csv|xargs cat|awk -F',' '{print $3" "$4" "$5}'

deploy:
provider: script
script: ./script/deploy.sh
on:
all_branches: true
7 changes: 7 additions & 0 deletions script/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -e

bash -c "echo \"${Docker_password}\" | docker login --username \"${Docker_login}\" --password-stdin ;"
docker pull tarangs20/monolithic
docker tag tarangs20/monolithic:latest ${DOCKER_LOGIN}/monolithic:latest
docker push ${DOCKER_LOGIN}/monolithic:latest