-
Notifications
You must be signed in to change notification settings - Fork 0
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
Support for monorepos #30
Comments
+1 |
Any news on how can we use |
Hi @gjsduarte! Sorry, I forgot to update the issue, this is currently in progress and will be available for beta testing soon. |
Looking forward to test that 😊 |
🚀 Monorepo support is now in public betaOnce you have an existing organization/project:
Let me know if you encounter any issues or if you need assistance setting up the CI. Setup steps:Step 1. Navigate to the organization page and click 'Add project'Step 2. Click on "Check available GitHub installations"Step 3. Select the repositoryThe list will show all the repositories with RelativeCI GitHub app installations no matter if they correspond to a RelativeCI project. Step 4. Enter project detailsCI configurationThe CI configuration is the same as for a single project, except that you need to add and pass secrets for each project in case you run the build process for multiple projects on the same CI workflow:
Depending on your configuration method, you will need to pass corresponding keys to each task: // .github/workflows/build.yaml
....
- name: Build project 1
run: npm run build --if-present
env:
RELATIVE_CI_KEY: ${{ secrets.PROJECT_1_RELATIVE_CI_KEY }}
...
- name: Build project 2
run: npm run build --if-present
env:
RELATIVE_CI_KEY: ${{ secrets.PROJECT_2_RELATIVE_CI_KEY }}
Example repository: https://github.com/relative-ci/example-webpack-plugin-github-action-monorepo |
If we are not using github actions, how can we pass separate relativeci.config.js locations? Looking at https://relative-ci.com/documentation/setup/agent/cli/#step-3-configure-relative-ciagent Is there a flag/value we can pass to the relative-ci-agent to use specific config files? Or is the only way to use config files to run the agent from the relative directive? |
Hi @neilsoult, thanks for reaching out!
Yes, atm The agent uses cosmiconfig and only searches for the config file in the current directory or up the tree. Also, loading the webpack stats JSON file is done relative to the current working directory and fails when the value is relative to relativeci.config.js (like in the example). I will add an example for the CLI monorepo setup. On a monorepo setup, are you expecting to be able to run from the root directory |
yes, that would be ideal - we use Nx, and our build commands are run from the root directory of the monorepo - so while we could do something like |
I think that's a valid case. I created a new issue on the agent: relative-ci/agent#670. We will look to implement a Thanks for reporting it! |
@neilsoult custom config directory is now available on
Let me know how it goes if you get the chance to try it ;) |
Allow to setup multiple RelativeCI projects on one repository
The text was updated successfully, but these errors were encountered: