Design
Reorganize Makefile for each repo
Previously, SD-RAN Makefile imported the Makefile in onos/build-tools.
...
- Essential Makefile targets in repos which should tag code, publish and push Docker images
build
- build the binaries and run all validationtest
- run the unit tests and source code validationdocker-build
- build all Docker images in the repodocker-push
- push all Docker images to the registrylint
- examine Go source code and reports coding problemslicense
- run license checkcheck-version
- check version if it is valid and duplicatedclean
- remove all build artifactshelp
- show help message
- Essential Makefile targets in repos which should tag code only
build
- build the binaries and run all validationtest
- run the unit tests and source code validationlint
- examine Go source code and reports coding problemslicense
- run license checkcheck-version
- check version if it is valid and duplicatedclean
- remove all build artifactshelp
- show help message
- Essential Makefile targets in repos which should tag code, publish and push Helm charts
lint
- examine Go source code and reports coding problemslicense
- run license checkcheck-version
- check version if it is valid and duplicatedclean
- remove all build artifactshelp
- show help messagedeps
- run helm dependency update for all umbrella charts
Create a PR
- Run two workflows in parallel
- Workflow 1: Code scanning
- Version check job: validate version in VERSION file with Makefile target -
make check-version
- Lint job: check linters with Makefile target -
make lint
- License job: check license with Makefile target -
make license
- Fossa check job: run Fossa check with
fossa-action
- Version check job: validate version in VERSION file with Makefile target -
- Workflow 2: Test and build
- Build job: build code with Makefile target -
make build
- Test job: run tests with Makefile target -
make test
- Build job: build code with Makefile target -
- Workflow 1: Code scanning
Merge a PR
- Run three workflows in parallel
- Workflow 1: Code scanning
- Version check job: validate version in VERSION file with Makefile target -
make check-version
- Lint job: check linters with Makefile target -
make lint
- License job: check license with Makefile target -
make license
- Fossa check job: run Fossa check with
fossa-action
- Version check job: validate version in VERSION file with Makefile target -
- Workflow 2: Test and build
- Build job: build code with Makefile target -
make build
- Test job: run tests with Makefile target -
make test
- Build job: build code with Makefile target -
- Workflow 3: Publish image/chart and tag/release code
- Version check job: validate version again right before publish image/chart and tag/release code
- Tag version job: if version is valid and not including
-dev
suffix, create a tag with version inVERSION
file - Publish image job:
- Step 1: build and push Docker image with tag
latest
if version is valid - Step 2: build and push Docker image with a specific version in
VERSION
file, if version is valid and not including-dev
suffix
- Step 1: build and push Docker image with tag
- Bump-up version job: if version is valid and not including
-dev
suffix, update VERSION file to increase thepatch
version and add-dev
suffix and then create a PR for this VERSION file change
- Workflow 1: Code scanning
How to check version?
Sample: https://raw.githubusercontent.com/onosproject/onos-pci/master/build/bin/version_check.sh
Repository configuration
- Github repo settings > General tab > Pull Requests section
- Github repo settings > branches > main rule
Target repositories
Type | Repository | Code Scan | Test and Build | Release | Publish | Done? | Note | |
---|---|---|---|---|---|---|---|---|
xApp | onos-pci | Y | Y | Y | Y (Docker image) | Y | ||
onos-kpimon | Y | Y | Y | Y (Docker image) | Y | |||
onos-mho | Y | Y | Y | Y (Docker image) | Y | |||
onos-mlb | Y | Y | Y | Y (Docker image) | Y | |||
onos-rsm | Y | Y | Y | Y (Docker image) | Y | |||
rimedo-ts | Y | Y | Y | Y (Docker image) | Y | |||
RAN | openairinterface5g | Y | Y | Y | Y (Docker image) | Y | ||
ran-simulator | Y | Y | Y | Y (Docker image) | Y | |||
scalable-ran-simulator | N/A | N/A | N/A | N/A | N/A | Code not merged; still in local | ||
Core | onos-e2t | Y | Y | Y | Y (Docker image) | Y | ||
onos-a1t | Y | Y | Y | Y (Docker image) | Y | |||
onos-o1t | Y | Y | Y | Y (Docker image) | Y | |||
onos-exporter | Y | Y | Y | Y (Docker image) | Y | |||
onos-uenib | Y | Y | Y | Y (Docker image) | Y | |||
onos-cli | Y | Y | Y | Y (Docker image) | Y | |||
onos-config | Y | Y | Y | Y (Docker image) | Test failed sometimes randomly; need to investigate later - temporally disabled two of test cases; --- FAIL: TestProposalStore (5.08s) No issue at this time. | |||
onos-topo | Y | Y | Y | Y (Docker image) | Y | Test failed due to hardcoded path link - temporally disabled one of test cases; need to fix it later 2024-06-30T02:45:37.484Z FATAL github.com/onosproject/onos-topo/pkg/tools/topo-generator/generator generator/writer.go:31 open /home/runner/work/onos-topo/pkg/tools/topo-generator/generator/templates/template.yaml: no such file or directory No issue at this time. | ||
Lib | onos-a1-dm | Y | Y | Y | N/A | Y | ||
onos-api | Y | Y | Y | N/A | Y | auto-generated code by proto causes linters - disabled some code No issue at this time. | ||
onos-e2-sm | N/A | As it includes multiple go modules, which is the special case also, need to investigate how to use github action for thisY | Y | Y | Y (Docker image) | Y | ||
onos-lib-go | Y | Y | Y | N/A | Y | |||
onos-ric-sdk-go | Y | Y | Y | N/A | Y | |||
rrm-son-lib | Y | Y | Y | N/A | Y | |||
Chart | sdran-helm-charts | Y | Y | Y | Y (Helm charts) | Y | Done - need more tests | |
onos-helm-charts | Y | Y | Y | Y (Helm charts) | Y | Done - need more tests | ||
Tool | sdran-in-a-box | N/A | N/A | N/A | N/A | N/A | CI unnecessary | |
Misc | onos-operator | Y | Y | Y | Y (Docker image) | Y | ||
onos-proxy | Y | Y | Y | Y (Docker image) | Y |
...