This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = (robot) -> | |
| robot.catchAll (msg) -> | |
| matches = msg.message.text.match(/@vasilybot\s*(.*)/) | |
| if matches == null or matches.length == 0 | |
| return | |
| runArn = matches[1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| aws = require 'aws-sdk' | |
| robot.catchAll (msg) -> | |
| matches = msg.message.text.match(/@vasilybot\s*(.*)/) | |
| if matches == null or matches.length == 0 | |
| return | |
| runArn = matches[1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| aws = require 'aws-sdk' | |
| module.exports = (robot) -> | |
| robot.catchAll (msg) -> | |
| matches = msg.message.text.match(/@vasilybot\s*(.*)/) | |
| if matches == null or matches.length == 0 | |
| return |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| uri = URI.parse("SLACK_WEB_HOOK_URL") | |
| data = {"text" => "@vasilybot " + schedule_run_resp.run.arn} | |
| Net::HTTP.post_form(uri, {"payload" => data.to_json}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| ./gradlew assembleDebug | |
| zip -r features.zip features | |
| ruby scripts/devicefarm.rb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| general: | |
| branches: | |
| only: | |
| - master | |
| machine: | |
| java: | |
| version: openjdk7 | |
| ruby: | |
| version: 2.2.0 | |
| environment: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 10.times do | |
| resp_apk = devicefarm.get_upload({ | |
| arn: apk_arn | |
| }) | |
| resp_test_package = devicefarm.get_upload({ | |
| arn: calabash_package_arn | |
| }) | |
| if resp_apk.upload.status == "SUCCEEDED" && |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| devicefarm.schedule_run({ | |
| project_arn: "プロジェクトのARN", | |
| app_arn: apk_arn, | |
| device_pool_arn: device_pool_arn, | |
| test: { | |
| type: 'CALABASH', | |
| test_package_arn: calabash_package_arn | |
| } | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resp = devicefarm.create_upload({ | |
| project_arn: "プロジェクトのARN", | |
| name: "features.zip", | |
| type: "CALABASH_TEST_PACKAGE", | |
| content_type: "application/octet-stream" | |
| }) | |
| # Pre-Signed URLの取得 | |
| pre_signed_url = resp.upload.url |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| url = URI.parse(pre_signed_url) | |
| apk = File.open("YOUR_APK_PATH", "rb").read | |
| Net::HTTP.start(url.host) do |http| | |
| http.send_request("PUT", url.request_uri, apk, {"content-type" => "application/octet-stream"}) | |
| end |