Skip to content
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

basic Circle-CI build #57

Merged
merged 2 commits into from
Oct 7, 2019
Merged

basic Circle-CI build #57

merged 2 commits into from
Oct 7, 2019

Conversation

casperdcl
Copy link
Member

@casperdcl casperdcl commented Sep 25, 2019

Add CI tests

Currently only tests that mkdocs build succeeds without errors.

References:


@casperdcl casperdcl requested a review from cheelee September 25, 2019 20:48
@casperdcl casperdcl self-assigned this Sep 25, 2019
@casperdcl casperdcl changed the title inital .circleci/config.yml initial .circleci/config.yml Sep 25, 2019
@casperdcl casperdcl mentioned this pull request Sep 25, 2019
@casperdcl casperdcl requested a review from balicea September 25, 2019 20:49
@casperdcl casperdcl changed the title initial .circleci/config.yml basic Circle-CI build Sep 25, 2019
@casperdcl casperdcl requested a review from mwatts15 September 25, 2019 21:14
Copy link
Contributor

@mwatts15 mwatts15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not certain why the rtd status is unknown - for me it's green if I get it directly from the readthedocs.org. It's conditional on a cookie I have, so github's caching causes it to show as "unknown" even for me here.

General question: why Circle-CI vs Travis-CI? AFAIK, this would be the first OW project using Circle-CI, so this would introduce additional maintenance overhead to deal with two CI environments.

@@ -0,0 +1,46 @@
version: 2.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle-CI translates this config into a different format: resolves the &defaults reference and apparently inlines the "install" command. Is there an expectation that "defaults" or "install" objects will be reused to justify breaking them out?

https://circleci.com/gh/openworm/openworm_docs/4#config/containers/0
Is there

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not for this PR, but potentially for addressing #55. Could remove this for now if you prefer.

@casperdcl
Copy link
Member Author

casperdcl commented Sep 26, 2019

General question: why Circle-CI vs Travis-CI?

After discussing with @cheelee the conclusion was that any CI which integrates well with GitHub would be fine. I also have much more experience with Travis but recently started using Circle and it seems much quicker and easier to use. For example, these builds all complete about 30s after a commit is pushed. From my experience Travis takes much longer.

I don't really have a strong preference though.

http://docs.openworm.org/en/latest/community#contributing-to-the-openworm-documentation
[![CircleCI][CI-badge]][CI]

Simply modifying the markdown files in this repository should automatically
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created dev_openworm_docs because I didn't (and still don't) have maintainer-level access to https://readthedocs.org/projects/openworm/

@slarson or @travs - could you give @casperdcl and myself access?

@mwatts15
Copy link
Contributor

OK. I think the write permissions requested by Circle-CI are excessive, which is part of my initial negative reaction, but since we're limiting it to this "bot", I'm OK with that as long as OpenWorm org admins get access credentials for the bot.

I'll go ahead and merge in a couple hours.

@casperdcl
Copy link
Member Author

ah but the permissions (for managing e.g. webhooks) are a GitHub access level thing - the same would be required for a bot account on Travis. Unless I've misunderstood something.

Of course in both cases, org admins should get credentials.

@mwatts15
Copy link
Contributor

ah but the permissions (for managing e.g. webhooks) are a GitHub access level thing - the same would be required for a bot account on Travis. Unless I've misunderstood something.

Of course in both cases, org admins should get credentials.

You are somewhat mistaken. At least by default, Circle-CI requests a broader set of permissions for writing to public repositories than Travis-CI for open source projects. This is a more recent change though (I only looked into it the other day), so you may have missed it if you set up Travis-CI access a while ago.

@mwatts15
Copy link
Contributor

I just realized, @casperdcl should have all of the permissions you need to merge. So, fire when ready.

@casperdcl
Copy link
Member Author

At least by default, Circle-CI requests a broader set of permissions

Ah @mwatts15 I didn't know. Are there any particular permissions we need to be concerned about?

should have all of the permissions you need to merge

Yes I know but still wanted some approval first :)

@mwatts15
Copy link
Contributor

The public repo permission is the one that most bothers me: image

The concern, of course, isn't that Circle-CI intentionally abuses the permission, but that Circle-CI is compromised or they make an accident. Obviously, it's only relatively more risky to use Circle-CI -- we're already using a Github which none of us really controls -- but my reasoning is that limiting permissions means a smaller chance we have to waste time fixing stuff we didn't break ourselves. 🤷‍♂️

should have all of the permissions you need to merge

Yes I know but still wanted some approval first :)

Quite right. Code review is a good thing :)

@casperdcl
Copy link
Member Author

hmm.

  • as an org admin, can you disable some of the Circle CI permissions? I can't actually recall giving it any of those permissions. For my personal (@casperdcl) account, I have:
    image which is indeed a little deceptive as it's not explicit that "access public repositories" includes full write access. I don't think either my account or @openworm-bot had permissions to grant circle-ci access to openworm, though - think it was already that way?
  • Travis can only do daily automated builds (https://docs.travis-ci.com/user/cron-jobs/) whereas we can get circle CI to run every minute if we wanted (this PR is hourly)
  • contexts (sharing secure env vars, https://circleci.com/circleci-versus-travisci/) might be useful in future when dealing with other repos in the organisation (e.g. https://github.com/openworm/openworm)

@mwatts15
Copy link
Contributor

I did a quick review of application access in the org and enabled some additional restrictions, but again, I think the access granted is OK in this case. My concern was more for granting access through my Github user for the sake of maintaining Circle-CI builds, but you've addressed that concern: thank you!

I think we can have Circle-CI for this, especially if it's easier to achieve what you have planned with it than with Travis-CI. We can debate which one is preferred generally elsewhere/at a later time.

@casperdcl casperdcl merged commit 025face into master Oct 7, 2019
@casperdcl casperdcl deleted the ci branch October 7, 2019 17:50
@casperdcl
Copy link
Member Author

casperdcl commented Oct 9, 2019

fyi travis cron jobs can only be daily at most (https://docs.travis-ci.com/user/cron-jobs/) wheras with Circle-CI we can do even every minute.

This was referenced Oct 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add CI
3 participants