Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,24 @@ All secrets (GPG, Sonatype, Sonar, Release App) are managed at the https://githu
https://github.com/cuioss/cuioss-organization/blob/main/.github/project.yml[`.github/project.yml`],
so every org workflow release opens the pin-bump PR here. Apply repository settings and branch
protection (merge queue) with the org's `repo-settings` and `branch-protection` scripts.
* *SonarCloud*: create the project `cuioss_<key>`. New projects start with a main branch called
`master`; rename it to `main` (Administration -> Branches and Pull Requests) *before* the first
analysis. Otherwise `main` is analysed as a short-lived branch and the overview stays empty. If it
already happened: delete the short-lived `main`, then rename `master`. Set New Code to "Previous
version". The first analysis of the renamed branch reports quality gate `NONE` (no baseline yet),
which fails `sonar.qualitygate.wait`; the next analysis is green.
* *SonarCloud*, *before the first CI run of the new repository*, that is before the first push or pull
request (CI creates a missing project itself, with the main branch `master`, as soon as the first
analysis runs, pull request analysis included):
** Create the project `cuioss_<key>` in the organization `cuioss-github`, where all cuioss projects live.
A project in another organization (for example `cuioss`) is not the one CI analyses.
** New projects start with a main branch called `master`; rename it to `main` (Administration ->
Branches and Pull Requests) *before* the first analysis. Otherwise `main` is analysed as a short-lived
branch and the overview stays empty. If it already happened: delete the short-lived `main`, then
rename `master`.
** Set New Code to "Previous version".
** The first analysis of the renamed branch reports quality gate `NONE` (no baseline yet), which fails
`sonar.qualitygate.wait`; re-run the failed job, the next analysis is green.
** Verify (public projects need no token): the branch named `main` must be listed with `"isMain":true`:
+
[source,bash]
----
curl -s "https://sonarcloud.io/api/project_branches/list?project=cuioss_<key>"
----
* *Release*: leave `release.current-version` alone, see <<releasing>>.

=== Further Steps
Expand Down
4 changes: 3 additions & 1 deletion customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ echo "Customization completed successfully!"
echo ""
echo "Next steps (see README.adoc, 'After creating the repository'):"
echo " - Do NOT change release.current-version in .github/project.yml: merging that change IS a release."
echo " - SonarCloud: create ${PROJECT_SONAR_ID} and rename its main branch 'master' to 'main' before the first analysis."
echo " - SonarCloud, BEFORE the first push or pull request (any CI run creates the project itself with main branch 'master'):"
echo " create ${PROJECT_SONAR_ID} in organization cuioss-github and rename its main branch 'master' to 'main'."
echo " Verify: curl -s \"https://sonarcloud.io/api/project_branches/list?project=${PROJECT_SONAR_ID}\" (the branch named main must have isMain true)"
echo " - Add ${PROJECT_KEY} to 'consumers:' in cuioss-organization/.github/project.yml."
echo " - Apply branch protection / merge queue with cuioss-organization/branch-protection."
echo ""
Expand Down