You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/DEVELOPING.md
+3-67Lines changed: 3 additions & 67 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@
13
13
What's GitHub? It's where you're looking right now! (Joking!).
14
14
15
15
We are using GitHub for hosting our Git repositories. GitHub is being used for creating issues and creating Pull
16
-
Requests to review / merge each others code.
16
+
Requests to review / merge each other's code.
17
17
18
18
### LFX Security Tool
19
19
For checking potential security issues, we use the [LFX Security Tool](https://security.lfx.linuxfoundation.org/#/e8b6fdf9-2686-44c5-bbaa-6965d04ad3e1/licenses).
@@ -33,7 +33,7 @@ Every GIT repository can build its artifacts and publish these to GitHub Package
33
33
Other GIT repositories can then add GitHub Packages as Maven repository to their build tool.
34
34
See below how to do both action for the specific tools.
35
35
36
-
To use GitHub Packages a username and token is needed. The username is your GitHub username. The token can be generate
36
+
To use GitHub Packages a username and token is needed. The username is your GitHub username. The token can be generated
37
37
in GitHub by going to your settings, Developer settings, Personal access tokens.
38
38
Generate a new token here and make sure that the scope "read:packages" is enabled. Use this token below to configure the build tools.
After importing the projects with either method, install SonarLint for quicker feedback on potential sonar issues.
107
107
108
-
## GitHub Actions
109
-
110
-
### Settings.xml during GitHub Action for GitHub Packages
111
-
During multiple GitHub Actions (like building and SonarCloud analysis), the custom `settings.xml` file is needed because it needs access to the GitHub Packages
112
-
to download certain artifacts. We can do this by adding the following step **before** the GitHub Packages repository is needed.
This basically creates a custom `settings.xml` at location `custom_maven_settings.xml`. This file can be passed to maven in the next step
123
-
by using `mvn -s custom_maven_settings.xml` and perhaps some extra parameters you wish for.
124
-
125
-
For the `servers` part, we again have the `github-packages-compas` ID that needs to be the same. We have an `OWNER` username (this is the default, because
126
-
it needs to have a username) and a password which is the GITHUB_TOKEN that's always available.
127
-
128
-
## Releasing software
129
-
130
-
### Create a release
131
-
132
-
To create a release of the software we are using the release functionality of GitHub. Under the tab 'code' there is a section
133
-
'Releases'. When selected all current releases will be displayed, and a new release can be created (draft release).
134
-
The standard branch to create a release from should be the "main" branch, so the code changes have been reviewed.
135
-
136
-
For every repository that creates a software product (artifacts or docker images) a GitHub Action ('release-project.yml')
137
-
is defined. This action runs when a release is created.
138
-
```yaml
139
-
on:
140
-
release:
141
-
types: [released]
142
-
```
143
-
144
-
Depending on the type of project different steps will be executed.
145
-
Common steps are:
146
-
- Checking out the source code,
147
-
- Extracting the entered version from the Git Tag.
148
-
- Set version using Maven
149
-
- Setup Maven settings.xml file
150
-
151
-
Depending on the type of project other steps will be executed. Some examples are:
152
-
- Build and publish the software to GitHub Packages using Maven
153
-
- Build and publish the docker image to DockerHub using Maven
154
-
- Build and publish the docker image to DockerHub using NPM and Docker
155
-
156
-
### Publish artifacts using Maven
157
-
158
-
To publish artifacts to GiHub Packages a distribution section needs to be added to pom.xml of the root.
The ID is the same as the ID used for the repository section [above](#github-packages-in-maven).
169
-
This way the same credentials will be used to connect to GitHub Packages as described [above](#maven-local-settingsxml-for-github-packages).
170
-
Replace "[repo-name]" with the name of the repository from CoMPAS.
171
-
172
108
## Others
173
109
174
110
### Adding custom badges to your README
@@ -183,4 +119,4 @@ In case of the LFX Security Tool, we used the following:
183
119
- Insert 'LFX Security Tool' as the label.
184
120
- Insert the API to use, in case of our LFX Security tool projects we use [this API](https://api.security.lfx.linuxfoundation.org/v1/project/e8b6fdf9-2686-44c5-bbaa-6965d04ad3e1/issues).
185
121
- Now you can query using JsonPath. To get all open high issues from the 'CoMPAS Core' project, use `issues[?(@['repository-name'] == 'compas-core')]['high-open-issues']`.
Copy file name to clipboardExpand all lines: docs/GITHUB_ACTIONS.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,24 @@ More to follow.
12
12
13
13
Github Actions are configured using YAML files. These files are stored in the `.github/workflows` directory of a specific repository.
14
14
15
+
## Maven settings.xml during GitHub Action for GitHub Packages
16
+
During multiple GitHub Actions (like building and SonarCloud analysis), the custom `settings.xml` file is needed because it needs access to the GitHub Packages
17
+
to download certain artifacts. We can do this by adding the following step **before** the GitHub Packages repository is needed.
This basically creates a custom `settings.xml` at location `custom_maven_settings.xml`. This file can be passed to maven in the next step
28
+
by using `mvn -s custom_maven_settings.xml` and perhaps some extra parameters you wish for.
29
+
30
+
For the `servers` part, we again have the `github-packages-compas` ID that needs to be the same. We have an `OWNER` username (this is the default, because
31
+
it needs to have a username) and a password which is the GITHUB_TOKEN that's always available.
32
+
15
33
## Building
16
34
All source code repositories need some kind of building step.
17
35
By default, all source code repositories use Maven as the build tool.
The ID is the same as the ID used for the repository section in [Maven Build](DEVELOPING.md#github-packages-in-maven).
51
+
This way the same credentials will be used to connect to GitHub Packages as described [Maven Build](DEVELOPING.md#maven-local-settingsxml-for-github-packages).
52
+
Replace ``[repo-name]`` with the name of the repository from CoMPAS.
53
+
54
+
## Configure release notes generation
55
+
56
+
During creating of a release we will use the GitHub feature to automatically generate the release notes using the pull requests.
57
+
The way these release notes are created can be configured by adding/updating the file ``release.yml`` to the directory ``.github``.
58
+
59
+
The content of the file ``release.yml`` is currently:
60
+
```yaml
61
+
changelog:
62
+
exclude:
63
+
labels:
64
+
- wontfix
65
+
- duplicate
66
+
- invalid
67
+
categories:
68
+
- title: New Features
69
+
labels:
70
+
- enhancement
71
+
- title: Bugfixes
72
+
labels:
73
+
- bug
74
+
- title: Tooling changes
75
+
labels:
76
+
- tooling
77
+
- title: Dependency updates
78
+
labels:
79
+
- dependencies
80
+
- title: Other Changes
81
+
labels:
82
+
- "*"
83
+
```
84
+
85
+
This will group different pull request using the different labels.
0 commit comments