Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

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.


  • 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
    • build - build the binaries and run all validation
    • test - run the unit tests and source code validation
    • helm-package - package all Helm charts
    • helm-push - push all Helm charts 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

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?
xApponos-pci (link)YYYY (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
RANopenairinterface5g





ran-simulator





scalable-ran-simulator




Coreonos-e2tYYYY (Docker image)Y

onos-a1tYYYY (Docker image)Y

onos-o1t





onos-exporter





onos-uenib





onos-cli





onos-config





onos-topo




Libonos-a1-dm





onos-api





onos-e2-sm





onos-lib-go





onos-ric-sdk-go





rrm-son-lib




Chartsdran-helm-charts





onos-helm-charts




Toolsdran-in-a-box




Misconos-operator





onos-proxy






  • No labels