Skip to end of metadata
Go to start of metadata

Tool used for CI

GitHub Actions


Introduction

GitHub Action workflows are added to the ODIM repository. These workflows called as checks gets triggered whenever a Pull Request(PR) is raised against the master branch.

The result from the workflow execution is then updated to the PR.

PRs are allowed to review and merge, only if the checks are passed.


Following checks are added as part of CI process:


Sl No.

Workflow Name

Description

1

build_unittest.yml

Builds and run Unit Tests with code coverage enabled

2

build_deploy_test.yml

Builds, Deploys, run sanity tests and upload build artifacts (like odimra logs)


These checks run in parallel and takes approximately 9 mins to complete.


GitHub Action Workflows details

  1.  build_unittest.yml
    1. Brings up a Ubuntu 18.04 VM hosted on GitHub infrastructure with preinstalled packages mentioned in link https://github.com/actions/virtual-environments/blob/master/images/linux/Ubuntu1804-README.md
    2. Installs Go 1.13.8 package
    3. Installs and configures Redis 5.0.8 with two instances running on port 6379 and 6380.
    4. Checks out the PR code into the Go module directory
    5. Builds the code
    6. Runs the unit tests
  2.  build_deploy_test.yml
    1. Brings up a Ubuntu 18.04 VM hosted on GitHub infrastructure with preinstalled packages mentioned in link https://github.com/actions/virtual-environments/blob/master/images/linux/Ubuntu1804-README.md
    2. Checks out the PR code
    3. Build and deploys the following docker containers
      1. Odimra
      2. Generic redfish plugin
      3. Kakfa
      4. Zookeeper
      5. Consul
      6. Redisdb
    4. Runs the sanity tests
    5. Uploads the build artifacts

         Note: Build status notifications with the link to the GitHub Actions build job page will be sent to the developer’s email.


Screen shots of the checks after they are executed







  • No labels

3 Comments

  1. Kubernetes has  build a quite good workflow for Github incl. there CI/CD system called Prow https://github.com/kubernetes/test-infra/tree/master/prow and it is also adopted by other open source projects e.g.  https://github.com/kubeflow/kubeflow or https://github.com/istio/istio/wiki/Working-with-Prow


    Could be worth to look into and potentially copy over some ideas or tools.

  2. Thanks Sebastian!

  3. For Go programs optimization - https://blog.filippo.io/shrink-your-go-binaries-with-this-one-weird-trick/. But before applying these in ODIM, optimized system must be tested in all flows as optimization will introduce many other side-effects when the Golang doesn't safe-guard memory by default like Rust. If all working OK, it can be integrated into Build process itself during binary or library generation for all the modules & plugins, those use golang.