From 14f01d5fa3cc728bb5de8c6c2c8b9e5bc6b323ed Mon Sep 17 00:00:00 2001 From: Zhangmei Li Date: Fri, 17 Aug 2018 14:35:26 +0800 Subject: [PATCH] fix run deploy multiple times fix #10 Change-Id: Ife6d5e7960d4e2abdc05e7b432b0c322299f6bba --- .travis.yml | 68 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 26 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1c4213991d..e15408698f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,44 +19,60 @@ addons: install: mvn compile -script: mvn test -Pcore-test,$BACKEND - -before_deploy: +script: + - mvn test -P unit-test + - mvn test -P core-test,$BACKEND + - | + if [[ "$TRAVIS_BRANCH" =~ $RELEASE_BRANCH ]]; then + mvn test -P tinkerpop-structure-test,$BACKEND + fi - | - if [ "$DEPLOYED" == "false" ]; then - DEPLOYED=true - mvn cobertura:cobertura > /dev/null && bash <(curl -s https://codecov.io/bash) - mvn clean package -DskipTests - else - echo "Skipping before_deploy since it has been executed once." + if [[ "$TRAVIS_BRANCH" =~ $RELEASE_BRANCH ]]; then + mvn test -P tinkerpop-process-test,$BACKEND fi -deploy: - - provider: script - skip_cleanup: true - script: - echo $GPG_KEY_ENC_PASSW | gpg -d --passphrase-fd 0 .private-key.gpg.gpg | gpg --import && - mvn deploy --settings .maven.xml -DskipTests=true -B -U -Prelease - on: - tags: true - - provider: releases - skip_cleanup: true - file_glob: true - file: "$TRAVIS_BUILD_DIR/hugegraph-*.tar.gz" - api_key: - secure: nSGEnk5tJsTHMGABO8OJMTk47L3QA2O4xHXLKGIuTK5kLGJkrl0Bs27IveggLxf1E7DSrhcfNW44yIjn5lWA/5QX3DweWH4FGDAgWYFyj7QsBZl7WT2NReMW7BLzpvsIjyEKDw5pLbYBOpOrHflmyQB4w0oXTZVl6awll7JicuL1air7lpqJ4Ju4ukj1mo6rcX3MHRkzgMuS5eemArm8T15y9IlDqK3gmjVUOVo7LoYDFaq3eMzQ7ufrOFiiVIV2LUxn2t2/YRcKU05zal4IKifMKbXISX5u7ZwYe8T14ZQ7eMTOzmFY21gv3HEg+KXWh4gq8HvG4FKbzrl+KYSacJ1xINJQaQGIOD7Pz7vzQdj9wpM/WLqmYF5SE5ZYzXV3ejrtYlEUpJQSnpyiHlfyRuDRzYq/dB2V1ua6t9xkbjL/a2uqHa9WjbOi1jqw2E2XSnx794pzCvKYn1RLOiqpzVlEnb3cPb5M7vl9wsGf5MFLS8zLmMa5DyJn+e45W6GpW1zT4uLl2yR3Ja9ROlVapAb4aMyhKnWQZtUMDVhD6Xjj/CAumeOQLe31NM3i8NK2L0iEYSFWUigLEcCapXo3aOVlzckdJ6p7k94dFd5wcg/EY2aFMhyjYUKUFP1V535uB4ZKvf/dotMKY29nsYyceYgOJ/VNZt2BPZ8oCdc8+ys= - on: - tags: true +jobs: + include: + - stage: deploy + if: tag IS present AND branch =~ env(RELEASE_BRANCH) + script: skip + + before_deploy: + - | + if [ "$DEPLOYED" == "false" ]; then + DEPLOYED=true + mvn cobertura:cobertura > /dev/null && bash <(curl -s https://codecov.io/bash) + mvn clean package -DskipTests + else + echo "Skipping before_deploy since it has been executed once." + fi + deploy: + - provider: script + skip_cleanup: true + script: + echo $GPG_KEY_ENC_PASSW | gpg -d --passphrase-fd 0 .private-key.gpg.gpg | gpg --import && + mvn deploy --settings .maven.xml -DskipTests=true -B -U -P release + on: + tags: true + - provider: releases + skip_cleanup: true + file_glob: true + file: "$TRAVIS_BUILD_DIR/hugegraph-*.tar.gz" + api_key: + secure: nSGEnk5tJsTHMGABO8OJMTk47L3QA2O4xHXLKGIuTK5kLGJkrl0Bs27IveggLxf1E7DSrhcfNW44yIjn5lWA/5QX3DweWH4FGDAgWYFyj7QsBZl7WT2NReMW7BLzpvsIjyEKDw5pLbYBOpOrHflmyQB4w0oXTZVl6awll7JicuL1air7lpqJ4Ju4ukj1mo6rcX3MHRkzgMuS5eemArm8T15y9IlDqK3gmjVUOVo7LoYDFaq3eMzQ7ufrOFiiVIV2LUxn2t2/YRcKU05zal4IKifMKbXISX5u7ZwYe8T14ZQ7eMTOzmFY21gv3HEg+KXWh4gq8HvG4FKbzrl+KYSacJ1xINJQaQGIOD7Pz7vzQdj9wpM/WLqmYF5SE5ZYzXV3ejrtYlEUpJQSnpyiHlfyRuDRzYq/dB2V1ua6t9xkbjL/a2uqHa9WjbOi1jqw2E2XSnx794pzCvKYn1RLOiqpzVlEnb3cPb5M7vl9wsGf5MFLS8zLmMa5DyJn+e45W6GpW1zT4uLl2yR3Ja9ROlVapAb4aMyhKnWQZtUMDVhD6Xjj/CAumeOQLe31NM3i8NK2L0iEYSFWUigLEcCapXo3aOVlzckdJ6p7k94dFd5wcg/EY2aFMhyjYUKUFP1V535uB4ZKvf/dotMKY29nsYyceYgOJ/VNZt2BPZ8oCdc8+ys= + on: + tags: true env: matrix: - BACKEND=memory + - BACKEND=rocksdb - BACKEND=cassandra - BACKEND=scylladb - - BACKEND=rocksdb - BACKEND=mysql global: - DEPLOYED=false + - RELEASE_BRANCH=^release.* - secure: dYmFTVeEtRzLNaHp9ToTV/+CkTD0/rEj+K7dRN8wsv/yg4pbqwnyWbSXcqMlj6iNFzAz3nPbmFLCvAWON9/SMN9iJIT6x/xfcf+LqCT8QWczo2nc9xeX144ij2VHX1Drvtk5fRTMaTXRfWEQIrjqx2yrJTIdrXWzWSaZLFv1CRCUizEiGGCePnzUWxx9dBypNyC6IaH6lIv8uN5E6+10SYhb7UJGjWUMDg1bCeW9X7X2wg4QpsGDzlGFXT2EBPU/dAb5attTAtW8dKxrCZqZJTPWe0BarXDBR4PO15BC+a0V1g8LwexedtDjJeFRcGPaJ5NN4d3jDSusCzt5Jf4U0Wa1gDRMVTU3jT+KYkm5eoV4wOZMySobjh6VpQH/LyL0QTDy5apRPAxw+wO+tc91P+nkJmnlr3pN8abtMZ6NciZizUBYQRgR/m2Ir0stvtbZxBQOATuPtBgNDKiDgVdSYcRJzSqYEMFOn35AvsDZ9aUsyC8k29P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