-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add script to skip CircleCI on guides #2955
Add script to skip CircleCI on guides #2955
Conversation
🤔 but you can skip CI builds by adding |
@aitbw Yes, that is correct, but this is automated. Not all who wish to contribute to the docs will know to use |
Not to mention that I'd just like to hear opinions on this idea. There may be a very good reason to run CI on doc changes. 🤷♂️ |
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.
I really like that! Thanks for saving precious resources 🌳
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.
I think it's a great idea, but I'd prefer to have this into the CircleCi config directly without another script in the root of the project
.circleci/config.yml
Outdated
@@ -16,6 +16,7 @@ jobs: | |||
POSTGRES_USER: root | |||
parallelism: ¶llelism 3 | |||
steps: &steps | |||
- run: skip-ci.sh && circleci step halt || true # skip Circle for guides |
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.
Is it possible to have the script inline without the need to add another script file? I personally prefer a less readable line than a new file in the project that is used in a single point.
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.
A good place for the script could be bin/circleci-halt-for-doc-only-changes
or .circleci/halt-for-doc-only-changes
and move everything inside it. That way what it does should be self-evident and well contained.
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.
I like that suggestion @elia do you agree with this @kennyadsl?
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.
Yeah, .circleci/bin/halt-for-doc-only-changes.sh
would be my preference
Unfortunately this isn't a CircleCI feature, though I wish it was... It requires some creative thinking to solve. I think I could probably figure out a way to do this inside of the CircleCI config, but I'm not sure I see the benefit of doing it that way. I will see if I can find a way to do that, but it might be simpler to stick with this implementation. Would it help if we created a |
@kennyadsl Done! |
@jacobherrington 👍 can we please rebase? |
@jacobherrington sorry, I meant squash commits 😬 |
01299a0
to
7e2cc05
Compare
Done @kennyadsl 👍 |
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.
great!
I think it would make sense at this point to keep everything inside the script vs. circleci config which would have just:
- run: .circleci/bin/halt-for-doc-only-changes.sh
The name is pretty explicit and it already says it will halt on a condition 👍
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.
Approved, I'm also fine with what @elia proposed, up to you if you want to change that.
This is based on the discussion here: Moya/Moya#1286
I'm not super familiar with Circle, but if this doesn't work for some obvious reason feel free to close.