-
Notifications
You must be signed in to change notification settings - Fork 10
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
Monorepo example #1
Comments
Hi, sorry for non-direct link, the example is in the monorepo branch in this repo. |
Thats awesome. Thank you. Is there a way to define pipelines on a specific folder? For example, our monorepo is structured like: /root We don't want to build/trigger tests for service2 when someone commits a change that only impacts files in service1. |
Yes, information about what has changed is in the git log.
We’ll provide some tips on doing this soon and I’ll make sure to let you
know.
…On Fri, Jun 28, 2019 at 8:29 PM jdinard ***@***.***> wrote:
Thats awesome. Thank you.
Is there a way to define pipelines on a specific folder?
For example, our monorepo is structured like:
/root
/service1
/service2
/service3
We don't want to build/trigger tests for service2 when someone commits a
change that only impacts files in service1.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1?email_source=notifications&email_token=AAACDS7YJWAACJBDBRSRQJDP4ZKANA5CNFSM4H3XW2A2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY224FY#issuecomment-506834455>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAACDSYT3WB4HJTOZQWZM23P4ZKANANCNFSM4H3XW2AQ>
.
|
Any news or hint about this @markoa? we've exactly the same use case:
|
Not yet. We've looked into this but found that Semaphore is currently
missing some information in job context for the recipe to be feasible.
We're addressing that at the moment. I'll post when we have some news.
…On Fri, Jul 12, 2019 at 10:43 AM Philipp ***@***.***> wrote:
Any news or hint about this @markoa <https://github.com/markoa>? we've
exactly the same use case:
We don't want to build/trigger tests for service2 when someone commits a
change that only impacts files in service1.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1?email_source=notifications&email_token=AAACDSY5PKVIVYF3DVS6KL3P7A74TA5CNFSM4H3XW2A2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZZEGIA#issuecomment-510804768>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAACDS2DLIPNQJDTKT2PKPLP7A74TANCNFSM4H3XW2AQ>
.
|
@markoa that would be great - I'm looking to move a complex monorepo from github actions (too slow) to semaphore |
I'm on this as well. On CircleCI I could comfortably set the working directory. Should I just |
Update: we’re getting very close to shipping a condition for defining
workflows in monorepo context.
…On Thu, 25 Jul 2019 at 12:09, Steffen Müller ***@***.***> wrote:
@markoa <https://github.com/markoa> that would be great - I'm looking to
move a complex monorepo from github actions (too slow) to semaphore
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1?email_source=notifications&email_token=AAACDS7R6WM5IDZKKDSSTH3QBF3VDA5CNFSM4H3XW2A2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2ZAVGA#issuecomment-514984600>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAACDSYV5MZ2NVGTN3UGGM3QBF3VDANCNFSM4H3XW2AQ>
.
|
Josua, can you share some more context?
…On Fri, 18 Oct 2019 at 13:58, Josua Schmid ***@***.***> wrote:
I'm on this as well. On CircleCI I could comfortably set the working
directory. Should I just cd here all the time?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1?email_source=notifications&email_token=AAACDS5P2LDQKSMF7SFUAMDQPGQHBA5CNFSM4H3XW2A2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBUDOAA#issuecomment-543700736>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAACDSYQUUPFT6MMDOVZUILQPGQHBANCNFSM4H3XW2AQ>
.
|
In a monorepo I need to change to subdirectories by myself (compared to CircleCI where the working directory is configurable). I think my previous concern is a non-issue. |
Folks, I'm happy to let you know that we have shipped monorepo support on Semaphore. Please see this documentation page to get started, and let me know your impressions when you get a chance. |
Very cool how you keep listening to your customers!
I started with setups like these because I accidentally started overwriting |
@schmijos Thank you for providing feedback about caching in monorepo contexts. We are designing improvements for monorepo caching. One solution that we are investigating is to introduce namespaces into the cache, where each service could define its own namespace. For example: Would this be a good solution to your project? |
@shiroyasha This would be exactly what we need ❤️ |
Hello, I am having trouble with the documentation, as it states that we can change the agent per block defined in a monorepo. I have one defined in my project consisting of a python backend and iOS app. Whenever I try to set the iOS subfolder to use a different agent, I get the following error in my pipeline: Error: [{"Schema does not allow additional properties.", "#/blocks/1/agent"}] The documentation shows that this should be possible, is this actually available right now in the platform or do I need to activate something to enable the beta features? I saw that I can enable the agent per task, but that's not really ideal, since the iOS block will have more tasks added (building and shipping). Please let me know if I can provide you with more information, and thank you for adding this! |
@LaloLoop Thanks for reporting. It's a mistake in our documentation. Agent can be defined on the task level, not on the block level. Instead of: - name: Test iOS client
dependencies: []
run:
when: "change_in('/ios/')"
agent:
machine:
type: a1-standard-4
os_image: macos-mojave-xcode11
task:
jobs:
- commands:
- checkout
- cd ios
- make test It should be: - name: Test iOS client
dependencies: []
run:
when: "change_in('/ios/')"
task:
agent:
machine:
type: a1-standard-4
os_image: macos-mojave-xcode11
jobs:
- commands:
- checkout
- cd ios
- make test |
A block can have only one task, but a task can have multiple jobs. When you define an agent on the task level, it will define the agent for all jobs. @LaloLoop thanks for this input. If I understand correctly, you would like to have multiple sequential tasks on the block level? |
Thank you, @shiroyasha for the quick reply. I ended up configuring it as in the second snippet you provided. |
Now that I have been using this configuration more, I came up with the following issue. The run:
when: "change_in('/ios/')" part, is not working, the builds are always executed for all the defined blocks in the configuration, I was wondering if I am specifying the path wrong or if I need to quote the value for Thank you! |
@LaloLoop I've checked it with the rest of the team. By default, when a Semaphore Yaml file is changed in the branches/PRs history, every block is rerun. We introduced this because changes in the YAML file can significantly impact the behavior of the pipeline. To ignore changes in the YAML file, you can use:
Thanks for bringing up this issue! Based on your input we have opened a conversation topic about this behavior. We can either be more explicit why was the block executed, or change the defaults of for the change_in syntax. |
Hello! |
Also adding in here that the information in this comment: #1 (comment) should be surfaced within the semaphoreci documentation as it will save engineers countless hours of debugging. |
Is the |
Hello,
Just trying to evaluate semaphore for a project with about 40 containerized microservices in a monorepo. The docs state that this is where monorepo examples live, but there don't seem to be any.
https://docs.semaphoreci.com/article/50-pipeline-yaml
The text was updated successfully, but these errors were encountered: