|
1 | 1 | language: java
|
| 2 | + |
2 | 3 | notifications:
|
3 | 4 | slack:
|
4 | 5 | secure: FIHlTn/YO7Wgumm1uIqmoEsqjQA7fV0AE94Rjc5yKzM3AquQa8HicgDVVk0d2GrKRnl0xt3j4ZJV//VJyIjlCd/QVKuj48R2ChjEY2im3+99HFPafCUI5/S2uyowKU6mJTFonH9v6p41eqxdbiAxJdDGOT0V2Gpt3UBSNuHz8ED9/aIHqv+P7M+VD6Xd2XYwctPniWlaSWx57sWcnG/VkFG45qFQAyha64uxOOe4M3ZmG/n5FfauZ8cBVLiRKEIr+CyNhh1ujfzi7+4uzMlSNL5t/BbZamAQuZzqGzGQ9RVvIlyPgUGNJtDEE/hWS09aagXF5T6EMj00szizErh4J1/x4qZwml5+TcBN31E0QmAhCtZe85sr3tYgic+hEz9XX1yymQzf/C7n4to2yNvq0r4g51xDk8IuP95WEh7zaqLlvFZvBFgxpHZBMYlRvhytjOYDeIFRMcGwHZcXosaG2ejqDwcGq/LC4oeG4sSwmg9sdRrtcmcanrNqrBka86WYO6LntI3JdZ86/1ACEUHzhCCwvrKELc9Ji1xxGAgS7QKH+s2/hnJuiMyv73gOVLKYC+wPMLt+fvOmPLSEl+PJiAIlToBq1KUBg03RSQLfPOLD7OrJ8VvDZsEPwejqlGDyc4wRglS9OTi7SnN5LYHSDNDdGdREegWqq9qDHEYEVLI=
|
| 6 | + |
| 7 | +env: |
| 8 | + global: |
| 9 | + - PROJECT_NAME=cbdebugger |
| 10 | + - MODULE_ID=cbdebugger |
| 11 | + - MODULE_VERSION=1.5.0 |
| 12 | + matrix: |
| 13 | + |
| 14 | + - ENGINE=lucee@5 |
| 15 | + - ENGINE=adobe@10 |
| 16 | + - ENGINE=adobe@11 |
| 17 | + - ENGINE=adobe@2016 |
| 18 | + |
5 | 19 | branches:
|
6 | 20 | only:
|
7 | 21 | - development
|
8 |
| -sudo: required |
| 22 | + - master |
| 23 | + |
9 | 24 | dist: trusty
|
| 25 | + |
| 26 | +sudo: required |
| 27 | + |
10 | 28 | before_install:
|
11 |
| -- sudo apt-key adv --keyserver keys.gnupg.net --recv 6DA70622 |
12 |
| -- sudo echo "deb http://downloads.ortussolutions.com/debs/noarch /" | sudo tee -a |
13 |
| - /etc/apt/sources.list.d/commandbox.list |
| 29 | + # CommandBox Keys |
| 30 | + - sudo apt-key adv --keyserver keys.gnupg.net --recv 6DA70622 |
| 31 | + - sudo echo "deb http://downloads.ortussolutions.com/debs/noarch /" | sudo tee -a |
| 32 | + /etc/apt/sources.list.d/commandbox.list |
| 33 | + |
14 | 34 | install:
|
15 |
| -- sudo apt-get update && sudo apt-get --assume-yes install commandbox |
16 |
| -- box install |
17 |
| -- box server start |
18 |
| -before_script: |
19 |
| -# Startup the app |
20 |
| -- curl http://localhost:49616/ |
| 35 | + # Install Commandbox |
| 36 | + - sudo apt-get update && sudo apt-get --assume-yes install git haveged rsync commandbox |
| 37 | + # Test that the box binary is available and ready for our tests |
| 38 | + - box version |
| 39 | + # If using auto-publish, you will need to provide your API token with this line: |
| 40 | + - box config set endpoints.forgebox.APIToken=$FORGEBOX_API_TOKEN > /dev/null |
| 41 | + # Setup for our tests |
| 42 | + - mkdir tests/results |
| 43 | + - sudo chmod -R 775 tests/results |
| 44 | + |
| 45 | +# Build script - note module versioning is passed to ANT |
21 | 46 | script:
|
22 |
| - - ant -f workbench/build.xml |
| 47 | + # run our dependency install to ensure the workbench is in place |
| 48 | + - box install |
| 49 | + # add our module-specific build properties |
| 50 | + - printf "\nproject.version=$MODULE_VERSION" >> workbench/build.properties |
| 51 | + - printf "\nproject.name=$PROJECT_NAME" >> workbench/build.properties |
| 52 | + - printf "\nmodule.name=$MODULE_ID" >> workbench/build.properties |
| 53 | + - printf "\ncfengine=$ENGINE" >> workbench/build.properties |
| 54 | + # execute our build |
| 55 | + - ant -DisTravis=true -Dbuild.number=$TRAVIS_BUILD_NUMBER -Dbuild.branch=$TRAVIS_BRANCH -f workbench/build.xml |
| 56 | + |
| 57 | +after_failure: |
| 58 | + - cd $TRAVIS_BUILD_DIR |
| 59 | + # Display the contents of our root directory |
| 60 | + # Spit out our Commandbox log in case we need to debug |
| 61 | + - box server log name=$ENGINE |
| 62 | + - cat `box system-log` |
| 63 | + |
| 64 | +before_deploy: |
| 65 | + - cd $TRAVIS_BUILD_DIR |
| 66 | + - mkdir -p s3deploy |
| 67 | + - rsync -av ./artifacts/$PROJECT_NAME/ ./s3deploy/ |
| 68 | + - rm -f ./s3deploy/box-repo.json |
| 69 | + |
| 70 | +deploy: |
| 71 | + #Module Deployment |
| 72 | + - provider: s3 |
| 73 | + on: |
| 74 | + branch: |
| 75 | + - master |
| 76 | + - development |
| 77 | + condition: "$ENGINE = [email protected]" |
| 78 | + skip_cleanup: true |
| 79 | + #AWS Credentials need to be set in Travis |
| 80 | + access_key_id: $AWS_ACCESS_KEY |
| 81 | + secret_access_key: $AWS_ACCESS_SECRET |
| 82 | + bucket: "downloads.ortussolutions.com" |
| 83 | + local-dir: s3deploy |
| 84 | + upload-dir: ortussolutions/coldbox-modules/$MODULE_ID |
| 85 | + acl: public_read |
| 86 | + #API Docs Deployment |
| 87 | + - provider: s3 |
| 88 | + on: |
| 89 | + branch: |
| 90 | + - master |
| 91 | + condition: "$ENGINE = [email protected]" |
| 92 | + skip_cleanup: true |
| 93 | + #AWS Credentials need to be set in Travis |
| 94 | + access_key_id: $AWS_ACCESS_KEY |
| 95 | + secret_access_key: $AWS_ACCESS_SECRET |
| 96 | + bucket: "apidocs.ortussolutions.com" |
| 97 | + local-dir: build/apidocs |
| 98 | + upload-dir: coldbox-modules/$MODULE_ID |
| 99 | + acl: public_read |
| 100 | + |
| 101 | + |
| 102 | +after_deploy: |
| 103 | + - cd $TRAVIS_BUILD_DIR/build && box forgebox publish |
0 commit comments