|
1 | 1 | language: java |
2 | | -notifications: |
3 | | - slack: |
4 | | - 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= |
5 | | -env: |
6 | | - global: |
7 | | - - MODULE_ID=swagger-sdk |
8 | | - matrix: |
9 | | - - ENGINE=lucee@5 |
10 | | - |
11 | | - - ENGINE=adobe@2018 |
12 | | - - ENGINE=adobe@2016 |
13 | | - - ENGINE=adobe@11 |
14 | | - - ENGINE=adobe@10 |
15 | | -branches: |
16 | | - only: |
17 | | - - development |
18 | | - - master |
| 2 | + |
| 3 | +notifications: |
| 4 | + slack: |
| 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 | + # Fill out these global variables for build process |
| 9 | + global: |
| 10 | + - MODULE_ID=swagger-sdk |
| 11 | + matrix: |
| 12 | + - ENGINE=lucee@5 |
| 13 | + - ENGINE=adobe@2016 |
| 14 | + - ENGINE=adobe@2018 |
| 15 | + |
| 16 | +branches: |
| 17 | + only: |
| 18 | + - development |
| 19 | + - master |
| 20 | + |
19 | 21 | dist: trusty |
| 22 | + |
20 | 23 | sudo: required |
21 | | -before_install: |
22 | | -- curl -fsSl https://downloads.ortussolutions.com/debs/gpg | sudo apt-key add - |
23 | | -- sudo echo "deb http://downloads.ortussolutions.com/debs/noarch /" | sudo tee -a /etc/apt/sources.list.d/commandbox.list |
24 | | -install: |
25 | | -- sudo apt-get update && sudo apt-get --assume-yes install git haveged rsync commandbox |
26 | | -- box version |
27 | | -- box config set endpoints.forgebox.APIToken=$FORGEBOX_API_TOKEN > /dev/null |
28 | | -- mkdir tests/results |
29 | | -- sudo chmod -R 775 tests/results |
30 | | -script: |
31 | | -- box install |
32 | | -- printf "\nmodule.name=$MODULE_ID" >> workbench/build.properties |
33 | | -- printf "\ncfengine=$ENGINE" >> workbench/build.properties |
34 | | -- printf "\ncfengine=$ENGINE" >> workbench/build.properties |
35 | | -- ant -DisTravis=true -Dbuild.number=$TRAVIS_BUILD_NUMBER -Dbuild.branch=$TRAVIS_BRANCH -f workbench/build.xml |
36 | | -after_failure: |
37 | | -- cd $TRAVIS_BUILD_DIR |
38 | | -- box server log name=$ENGINE |
39 | | -- cat `box system-log` |
40 | | -before_deploy: |
41 | | -- cd $TRAVIS_BUILD_DIR |
42 | | -- mkdir -p s3deploy |
43 | | -- rsync -av ./artifacts/$MODULE_ID/ ./s3deploy/ |
44 | | -- rm -f ./s3deploy/box-repo.json |
45 | | -deploy: |
46 | | -- provider: s3 |
47 | | - on: |
48 | | - branch: |
49 | | - - master |
50 | | - - development |
51 | | - condition: $ENGINE = [email protected] |
52 | | - skip_cleanup: true |
53 | | - access_key_id: $AWS_ACCESS_KEY |
54 | | - secret_access_key: $AWS_ACCESS_SECRET |
55 | | - bucket: downloads.ortussolutions.com |
56 | | - local-dir: s3deploy |
57 | | - upload-dir: ortussolutions/coldbox-modules/$MODULE_ID |
58 | | - acl: public_read |
59 | | -- provider: s3 |
60 | | - on: |
61 | | - branch: |
62 | | - - master |
63 | | - condition: $ENGINE = [email protected] |
64 | | - skip_cleanup: true |
65 | | - access_key_id: $AWS_ACCESS_KEY |
66 | | - secret_access_key: $AWS_ACCESS_SECRET |
67 | | - bucket: apidocs.ortussolutions.com |
68 | | - local-dir: build/apidocs |
69 | | - upload-dir: coldbox-modules/$MODULE_ID |
70 | | - acl: public_read |
71 | | -after_deploy: |
72 | | -- cd $TRAVIS_BUILD_DIR/build && box forgebox publish |
| 24 | + |
| 25 | +before_install: |
| 26 | + # CommandBox Keys |
| 27 | + - curl -fsSl https://downloads.ortussolutions.com/debs/gpg | sudo apt-key add - |
| 28 | + - sudo echo "deb https://downloads.ortussolutions.com/debs/noarch /" | sudo tee -a |
| 29 | + /etc/apt/sources.list.d/commandbox.list |
| 30 | + |
| 31 | +install: |
| 32 | + # Install Commandbox |
| 33 | + - sudo apt-get update && sudo apt-get --assume-yes install rsync jq commandbox |
| 34 | + # Install CommandBox Supporting Librarires |
| 35 | + - box install commandbox-cfconfig,commandbox-dotenv,commandbox-docbox |
| 36 | + # If using auto-publish, you will need to provide your API token with this line: |
| 37 | + - box config set endpoints.forgebox.APIToken=$FORGEBOX_API_TOKEN > /dev/null |
| 38 | + |
| 39 | +script: |
| 40 | + # Set Current Version |
| 41 | + - TARGET_VERSION=`cat $TRAVIS_BUILD_DIR/box.json | jq '.version' -r` |
| 42 | + - echo "Starting build for ${MODULE_ID} v${TARGET_VERSION}" |
| 43 | + # Replace version so builder can issue it |
| 44 | + |
| 45 | + # Startup the harness |
| 46 | + - cd test-harness |
| 47 | + # run our dependency install to ensure the workbench is in place |
| 48 | + - box install |
| 49 | + # run our matrix server |
| 50 | + - box server start serverConfigFile="server-${ENGINE}.json" |
| 51 | + # Startup the app |
| 52 | + - curl http://localhost:60299 |
| 53 | + # Debugging of tests |
| 54 | + #- curl http://localhost:60299/tests/runner.cfm?reporter=json -o testresults.json && cat testresults.json |
| 55 | + # move back to build dir to build it |
| 56 | + - cd $TRAVIS_BUILD_DIR |
| 57 | + # Build Project |
| 58 | + - box task run taskfile=build/Build target=run :version=${TARGET_VERSION} :projectName=${MODULE_ID} :buildID=${TRAVIS_BUILD_NUMBER} :branch=${TRAVIS_BRANCH} |
| 59 | + # Cat results for debugging |
| 60 | + - cat build/results.json |
| 61 | + |
| 62 | +after_failure: |
| 63 | + - cd $TRAVIS_BUILD_DIR/test-harness |
| 64 | + # Display the contents of our root directory |
| 65 | + # Spit out our Commandbox log in case we need to debug |
| 66 | + - box server log server-${ENGINE}.json |
| 67 | + - cat `box system-log` |
| 68 | + |
| 69 | +deploy: |
| 70 | + # Module Deployment |
| 71 | + - provider: s3 |
| 72 | + on: |
| 73 | + branch: |
| 74 | + - master |
| 75 | + - development |
| 76 | + condition: "$ENGINE = lucee@5" |
| 77 | + skip_cleanup: true |
| 78 | + #AWS Credentials need to be set in Travis |
| 79 | + access_key_id: $AWS_ACCESS_KEY |
| 80 | + secret_access_key: $AWS_ACCESS_SECRET |
| 81 | + # Destination |
| 82 | + bucket: "downloads.ortussolutions.com" |
| 83 | + local-dir: $TRAVIS_BUILD_DIR/.artifacts/$MODULE_ID |
| 84 | + upload-dir: ortussolutions/coldbox-modules/$MODULE_ID |
| 85 | + acl: public_read |
| 86 | + |
| 87 | + # API Docs Deployment |
| 88 | + - provider: s3 |
| 89 | + on: |
| 90 | + branch: |
| 91 | + - master |
| 92 | + - development |
| 93 | + condition: "$ENGINE = lucee@5" |
| 94 | + skip_cleanup: true |
| 95 | + #AWS Credentials need to be set in Travis |
| 96 | + access_key_id: $AWS_ACCESS_KEY |
| 97 | + secret_access_key: $AWS_ACCESS_SECRET |
| 98 | + bucket: "apidocs.ortussolutions.com" |
| 99 | + local-dir: $TRAVIS_BUILD_DIR/.tmp/apidocs |
| 100 | + upload-dir: coldbox-modules/$MODULE_ID/$TARGET_VERSION |
| 101 | + acl: public_read |
| 102 | + |
| 103 | +after_deploy: |
| 104 | + # Move to build out artifact |
| 105 | + - cd ${TRAVIS_BUILD_DIR}/.tmp/${MODULE_ID} |
| 106 | + - cat box.json |
| 107 | + # Only publish once |
| 108 | + - if [ ${ENGINE} = 'lucee@5' ]; then box forgebox publish; fi |
0 commit comments