sparkbox / mina-circle

🚀 A deployment wrapper for mina based, artifact deployment.
MIT License
9 stars 0 forks source link

feat: add support for circle ci 2.0 #42

Closed patricksimpson closed 6 years ago

patricksimpson commented 6 years ago

Add support for circle ci 2.0 workflows by obtaining the latest build number from the circle api. This is backwards compatible as long as the API version is 1.1 (v1.1)

This will resolve #41

cromwellryan commented 6 years ago

We're close! But something appears off in two places:

1. Wrong build being chosen for artifact Even though master is the branch specified, we're seeing an artifact pull from a different branch:

Branch builds request and subsequent artifact request for sparkbox/preschool-promise-application:

image

CircleCI Showing that build 1695 is from a non-master branch:

image

2. NoMethodError when artifact is not present image

cromwellryan commented 6 years ago

Looking at the docs, it appears that branch is specified in the URL scheme:

https://circleci.com/api/v1.1/project/:vcs-type/:username/:project/tree/:branch

bryanbraun commented 6 years ago

@patricksimpson walked me through the code here, and it makes sense to me. 👍