Skip to content

Commit

Permalink
runner: migrate all hard-coded urls to travis-ci.com
Browse files Browse the repository at this point in the history
  • Loading branch information
darwin committed May 29, 2021
1 parent 1945ae6 commit 9f11ecc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions runner/src/canary/runner/travis.clj
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
; https://docs.travis-ci.com/user/triggering-builds/
; https://developer.travis-ci.com/resource/requests#Requests
(let [api-slug (utils/url-encode slug)
api-endpoint (str "https://api.travis-ci.org/repo/" api-slug "/requests")
api-endpoint (str "https://api.travis-ci.com/repo/" api-slug "/requests")
build-result (:build-result options)
config {:merge_mode "deep_merge"
:env {:global (prepare-build-env options)}} ; https://docs.travis-ci.com/user/environment-variables/#Global-Variables
Expand Down Expand Up @@ -125,7 +125,7 @@
(get-in request ["repository" "slug"]))

(defn travis-build-url [slug build-id]
(str "https://travis-ci.org/" slug "/builds/" build-id))
(str "https://travis-ci.com/" slug "/builds/" build-id))

(defn determine-builds-state [builds]
; https://developer.travis-ci.com/resource/builds#Builds
Expand All @@ -151,7 +151,7 @@
; https://developer.travis-ci.com/resource/request#find
(announce (i18n/polling-travis-api-for-request-info-msg slug request-id) 2 options)
(let [api-slug (utils/url-encode slug)
api-endpoint (str "https://api.travis-ci.org/repo/" api-slug "/request/" request-id)]
api-endpoint (str "https://api.travis-ci.com/repo/" api-slug "/request/" request-id)]
(get-from-travis-api! api-endpoint token options)))

(defn transit-to-running-state! [report-data request-response options]
Expand Down
4 changes: 2 additions & 2 deletions runner/src/canary/runner/travis_mocks.clj
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@
(defn mock-travis-response [cmd args]
(let [api-endpoint (last args)]
(cond
(re-matches #"^https://api.travis-ci.org/repo/.*/requests$" api-endpoint) (mock-travis-requests-response args)
(re-matches #"^https://api.travis-ci.org/repo/.*/request/0$" api-endpoint) (mock-travis-request-info-response args)
(re-matches #"^https://api.travis-ci.com/repo/.*/requests$" api-endpoint) (mock-travis-requests-response args)
(re-matches #"^https://api.travis-ci.com/repo/.*/request/0$" api-endpoint) (mock-travis-request-info-response args)
:else (throw (utils/ex (i18n/unable-to-mock-travis-api-msg cmd args))))))

; ---------------------------------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 9f11ecc

Please sign in to comment.