GitHub Action Migration for SD-RAN

Design

Reorganize Makefile for each repo

Previously, SD-RAN Makefile imported the Makefile in onos/build-tools.

Now, we are trying to decouple it from the tool repo.

Most of repos have Makefile organized like below:

  • Essential Makefile targets in repos which should tag code, publish and push Docker images
    • build - build the binaries and run all validation
    • test - run the unit tests and source code validation
    • docker-build - build all Docker images in the repo
    • docker-push - push all Docker images to the registry
    • lint - examine Go source code and reports coding problems
    • license - run license check
    • check-version - check version if it is valid and duplicated
    • clean - remove all build artifacts
    • help - show help message
  • Essential Makefile targets in repos which should tag code only
    • build - build the binaries and run all validation
    • test - run the unit tests and source code validation
    • lint - examine Go source code and reports coding problems
    • license - run license check
    • check-version - check version if it is valid and duplicated
    • clean - remove all build artifacts
    • help - 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 problems
    • license - run license check
    • check-version - check version if it is valid and duplicated
    • clean - remove all build artifacts
    • help - show help message
    • deps - 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 
    • Workflow 2: Test and build
      • Build job: build code with Makefile target - make build 
      • Test job: run tests with Makefile target - make test 

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 
    • Workflow 2: Test and build
      • Build job: build code with Makefile target - make build 
      • Test job: run tests with Makefile target - make test 
    • 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 in VERSION 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
      • Bump-up version job: if version is valid and not including -dev suffix, update VERSION file to increase the patch version and add -dev suffix and then create a PR for this VERSION file change

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

TypeRepositoryCode ScanTest and BuildReleasePublishDone?Note
xApponos-pciYYYY (Docker image)Y

onos-kpimonYYYY (Docker image)Y

onos-mhoYYYY (Docker image)Y

onos-mlbYYYY (Docker image)Y

onos-rsmYYYY (Docker image)Y

rimedo-tsYYYY (Docker image)Y
RANopenairinterface5gYYYY (Docker image)Y

ran-simulatorYYYY (Docker image)Y

scalable-ran-simulatorN/AN/AN/AN/AN/ACode not merged; still in local
Coreonos-e2tYYYY (Docker image)Y

onos-a1tYYYY (Docker image)Y

onos-o1tYYYY (Docker image)Y

onos-exporterYYYY (Docker image)Y

onos-uenibYYYY (Docker image)Y

onos-cliYYYY (Docker image)Y

onos-configYYYY (Docker image)

Test failed sometimes randomly; need to investigate later - temporally disabled two of test cases;

--- FAIL: TestProposalStore (5.08s)
FAIL 
FAIL github.com/onosproject/onos-config/pkg/store/v2/proposal 5.102s

No issue at this time.


onos-topoYYYY (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
github.com/onosproject/onos-topo/pkg/tools/topo-generator/generator.WriteFile
/home/runner/work/onos-topo/onos-topo/pkg/tools/topo-generator/generator/writer.go:31 
github.com/onosproject/onos-topo/pkg/tools/topo-generator/generator.TestWriter
/home/runner/work/onos-topo/onos-topo/pkg/tools/topo-generator/generator/writer_test.go:20 
testing.tRunner 
/opt/hostedtoolcache/go/1.19.13/x64/src/testing/testing.go:1446 
FAIL github.com/onosproject/onos-topo/pkg/tools/topo-generator/generator 0.071s

No issue at this time.

Libonos-a1-dmYYYN/AY

onos-apiYYYN/AY

auto-generated code by proto causes linters - disabled some code

No issue at this time.


onos-e2-smYYYY (Docker image)Y

onos-lib-goYYYN/AY

onos-ric-sdk-goYYYN/AY

rrm-son-libYYYN/AY
Chartsdran-helm-chartsYYYY (Helm charts)YDone - need more tests

onos-helm-chartsYYYY (Helm charts)Y

Done - need more tests

Toolsdran-in-a-boxN/AN/AN/AN/AN/ACI unnecessary
Misconos-operatorYYYY (Docker image)Y

onos-proxyYYYY (Docker image)Y



Related pages