Skip to content

Commit 7b072ab

Browse files
committed
Merge commit '2a02c3acf5cb4245970f77fc66d38f2b5badb2c3'
2 parents 632dd65 + 2a02c3a commit 7b072ab

File tree

12 files changed

+37
-2642
lines changed

12 files changed

+37
-2642
lines changed

redhat/rhdocs/.gitlab-ci.yml

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ stages:
66
- container prep
77
- sanity check
88
- build
9-
- check
9+
- deploy
1010

1111
# https://docs.gitlab.com/ee/ci/yaml/README.html#switch-between-branch-pipelines-and-merge-request-pipelines
1212
# if a MR is opened: run a detached MR pipeline
@@ -81,13 +81,13 @@ build:
8181
- .fdo.distribution-image@alpine
8282
- .common_variables
8383
script:
84-
- cd scripts
84+
# call make at root directory to do a 'fullbuild'
8585
- make
8686
artifacts:
8787
paths:
88-
- scripts/RHMAINTAINERS_parser
89-
- scripts/yaml2CODEOWNERS
90-
- scripts/yaml2RHMAINTAINERS
88+
- info/RHMAINTAINERS
89+
- info/CODEOWNERS
90+
- info/owners.yaml
9191

9292
.pages:
9393
stage: build
@@ -114,6 +114,8 @@ build:
114114
- public
115115

116116
pages CI check:
117+
# This stage, while still "deploying" a gitlab pages instance, does *not* run
118+
# on the `main` branch.
117119
extends:
118120
- .pages
119121
before_script:
@@ -127,40 +129,33 @@ pages CI check:
127129
when: never
128130
- when: on_success
129131

130-
check:
131-
stage: check
132+
deploy:
133+
stage: deploy
134+
dependencies:
135+
- build
132136
extends:
133137
- .fdo.distribution-image@alpine
134138
- .common_variables
135139
script:
136-
# rebuild the current files
137-
- make
138-
139-
# clean up cache
140-
- rm -f .failed
140+
# we've already run 'make' and the artifacts are available.
141+
# so just deploy code to main
142+
- git config user.name "Gitlab Runner"
143+
- git config user.email ""
144+
- git fetch origin
145+
- git add info/owners.yaml info/RHMAINTAINERS info/CODEOWNERS
146+
# make it so that job will not fail if there is nothing to commit
147+
- git diff-index --quiet HEAD || git commit -m "[Gitlab CI/CD] Automated rebuild of info/*"
148+
- git push https://gitlab-ci-token:$MAKE_MAINT@gitlab.com/redhat/centos-stream/src/kernel/documentation.git HEAD:main
141149

142-
# check that the committed files matched
143-
- git diff --exit-code || touch .failed
144-
- |
145-
if [[ -e .failed ]]
146-
then
147-
echo '-----------------------------------------------------------------'
148-
echo ''
149-
echo ' Looks like the files scripts/CODEOWNERS or scripts/RHMAINTAINERS'
150-
echo ' have not been regenerated and checked in this commit.'
151-
echo ''
152-
echo ' Please run the following command before committing:'
153-
echo ' ./scripts/yaml2CODEOWNERS info/owners.yaml > info/CODEOWNERS'
154-
echo ' ./scripts/yaml2RHMAINTAINERS info/owners.yaml > info/RHMAINTAINERS'
155-
echo ''
156-
echo '-----------------------------------------------------------------'
157-
exit 1
158-
fi
150+
rules:
151+
- if: '$CI_PROJECT_NAMESPACE == "redhat/centos-stream/src/kernel" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
152+
- changes:
153+
- info/owners.yaml
159154

160155
pages:
161156
extends:
162157
- .pages
163-
stage: check
158+
stage: deploy
164159
rules:
165-
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
166-
- when: never
160+
- if: '$CI_PROJECT_NAMESPACE == "redhat/centos-stream/src/kernel" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
161+

redhat/rhdocs/README.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,8 @@ accompanied by a description of the modifications. In most cases, a simple
4343
explanation will do (for example, "Update x86 maintainers"), however the
4444
maintainers may ask for a more detailed write-up.
4545

46-
Standalone changes are NOT accepted for the RHMAINTAINERS or CODEOWNERS files,
47-
and changes are only accepted for the owners.yaml file. Merge requests that
48-
modify owners.yaml changes must include associated changes to RHMAINTAINERS &
49-
CODEOWNERS. These secondary files can be generated using these commands
50-
executed from the top level of documentation:
51-
52-
```
53-
make # requires minimum golang version 1.14
54-
```
46+
Changes are only accepted for the owners.yaml file, as the RHMAINTAINERS and
47+
CODEOWNERS files are generated automatically on-merge.
5548

5649
Users making changes must include a "Signed-off-by:" tag on all commits that
5750
acknowledges the DCO, https://developercertificate.org.

redhat/rhdocs/info/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
RHMAINTAINERS_parser
21
yaml2RHMAINTAINERS
32
yaml2CODEOWNERS
43
*.patch

redhat/rhdocs/info/CODEOWNERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -672,8 +672,8 @@ include/linux/hte.h ahalaney@redhat.com bmasney@redhat.com echanude@redhat.com
672672
drivers/hwmon/ darcari@redhat.com
673673

674674
^[HWPOISON MEMORY FAILURE HANDLING]
675-
mm/memory-failure.c dnelson@redhat.com
676-
mm/hwpoison-inject.c dnelson@redhat.com
675+
mm/memory-failure.c arozansk@redhat.com
676+
mm/hwpoison-inject.c arozansk@redhat.com
677677

678678
^[Hyper-V CORE AND DRIVERS]
679679
Documentation/networking/device_drivers/microsoft/netvsc.txt cavery@redhat.com vkuznets@redhat.com

redhat/rhdocs/info/RHMAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,7 @@ S: Supported
12131213
F: drivers/hwmon/
12141214

12151215
HWPOISON MEMORY FAILURE HANDLING
1216-
M: Dean Nelson <dnelson@redhat.com>
1216+
M: Aristeu Rozanski <arozansk@redhat.com>
12171217
S: Supported
12181218
F: mm/memory-failure.c
12191219
F: mm/hwpoison-inject.c

redhat/rhdocs/info/owners.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3256,9 +3256,9 @@ subsystems:
32563256
- rhel-sst-arch-hw
32573257
requiredApproval: false
32583258
maintainers:
3259-
- name: Dean Nelson
3260-
email: dnelson@redhat.com
3261-
gluser: dnlsn
3259+
- name: Aristeu Rozanski
3260+
email: arozansk@redhat.com
3261+
gluser: arozansk
32623262
paths:
32633263
includes:
32643264
- mm/memory-failure.c

redhat/rhdocs/scripts/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
RHMAINTAINERS_parser
21
yaml2RHMAINTAINERS
32
yaml2CODEOWNERS
43
verifySubsystems

redhat/rhdocs/scripts/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
fullbuild:
2-
go build RHMAINTAINERS_parser.go
32
go build yaml2RHMAINTAINERS.go
43
go build yaml2CODEOWNERS.go
54
go build verifySubsystems.go validSSTNames.go
65
go build searchowners.go
76

87
clean:
9-
rm -f RHMAINTAINERS_parser yaml2RHMAINTAINERS yaml2CODEOWNERS verifySubsystems searchowners
8+
rm -f yaml2RHMAINTAINERS yaml2CODEOWNERS verifySubsystems searchowners
109

0 commit comments

Comments
 (0)