Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
799a2159
Commit
799a2159
authored
Jul 29, 2020
by
Suzanne Selhorn
Committed by
Marcel Amirault
Jul 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docs: Updated monorepo example
Related to:
https://gitlab.com/gitlab-org/gitlab/-/issues/227381
parent
3d51a0b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
25 deletions
+20
-25
doc/user/packages/workflows/monorepo.md
doc/user/packages/workflows/monorepo.md
+20
-25
No files found.
doc/user/packages/workflows/monorepo.md
View file @
799a2159
...
...
@@ -82,44 +82,39 @@ Using the example project above, this `gitlab-ci.yml` file will publish
and publish
`MyPackage`
anytime changes are made to anywhere _except_ the
`Foo`
directory on the
`master`
branch.
```
shell
```
yaml
image
:
node:latest
stages
:
-
build
.default-rule: &default-rule
if
:
'$CI_MERGE_REQUEST_IID || $CI_COMMIT_REF_SLUG == "master"'
.foo-package:
build-foo-package
:
stage
:
build
variables
:
PACKAGE
:
"
Foo"
before_
script:
script
:
-
cd src/components/Foo
-
echo "Building $PACKAGE"
-
npm publish
only
:
refs
:
-
master
-
merge_requests
changes
:
-
"
src/components/Foo/**/*"
.parent-package:
build-my-project-package
:
stage
:
build
variables
:
PACKAGE
:
"
MyPackage"
except:
changes:
-
"src/components/Foo/**/*"
.build-package:
stage: build
script
:
-
echo "Building $PACKAGE"
-
npm publish
rules:
- <<:
*
default-rule
build-foo-package:
extends:
- .build-package
- .foo-package
build-my-project-package:
extends:
- .build-package
- .parent-package
only
:
refs
:
-
master
-
merge_requests
except
:
changes
:
-
"
src/components/Foo/**/*"
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment