-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
add build artifact to CI build #3136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This would be awesome from the plotly.py side. I've been wanting to figure out a way to build plotly.py against plotly.js master, and this would help a lot. Would the plot schema be available as an artifact as well? (plotly.py uses this during the build process for code generation) |
@jonmmease We should be able to add anything you like! Just let me know exactly what you need. I can confirm that this is working properly. The Now all we need is a webpage with a dropdown to select any version from any branch for fast easy comparison! |
In terms of artifacts, all we need is |
It should be possible to automate using CircleCI API! I think I should store the artifacts as the last build step. This way, we would get the URLs to the artifacts using one API call which lists the artifacts of the latest build:
|
Ok so the following API call returns exactly what we want! $ BRANCH=circle-build-artifact
$ curl https://circleci.com/api/v1.1/project/github/plotly/plotly.js/latest/artifacts?branch=$BRANCH\&filter=successful
[ {
"path" : "plot-schema.json",
"pretty_path" : "plot-schema.json",
"node_index" : 0,
"url" : "https://16381-45646037-gh.circle-artifacts.com/0/plot-schema.json"
}, {
"path" : "plotly.js",
"pretty_path" : "plotly.js",
"node_index" : 0,
"url" : "https://16381-45646037-gh.circle-artifacts.com/0/plotly.js"
}, {
"path" : "plotly.min.js",
"pretty_path" : "plotly.min.js",
"node_index" : 0,
"url" : "https://16381-45646037-gh.circle-artifacts.com/0/plotly.min.js"
} ] I was wondering if I should simply add the whole |
@antoinerg cool feature!
I don't see what that would gain us... and there's a lot in there, do we even update all of them during the test run? I'd leave it at just these items for now, as long as the naming matches While you're in this code, does this same feature let us give the image test artifacts a simpler location? I would love it if we could get at these without diving so deep into the directory tree Can you change it so it just looks like: (I would also love it if there were a directory like |
@alexcjohnson With commit 82b640b, it now looks like this for both |
Looks great to me! 💃 |
I love my new Linux laptop. Having a functional bash shell is awesome! Here are one-liners printing the URLs to
Same thing but for a given branch:
I can't wait to merge this in |
In #3136 (comment), I show how to get the list of artifacts of the latest job built (which may or may not be In #3136 (comment), I show how to retrieve the build number of the most recent
Good night and thank you all for your help :) |
@@ -107,6 +108,7 @@ jobs: | |||
command: ./.circleci/test.sh image2 | |||
- store_artifacts: | |||
path: build | |||
destination: / |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice touch here 🎨
Testing the artifacts features of circleCI.
The idea is to store the
plotly.js
that gets built for each commit/branch. This way, it would be extremely easy to test a particular branch without having to checkout, build and serve over HTTP locally. Moreover, if the artifacts are served by circleCI over HTTPS, it will be easy to test them out in Codepen and quickly swap between versions to check whether it correctly fixes a given issue.