Skip to content

Latest commit

 

History

History
74 lines (49 loc) · 3.43 KB

cicd.md

File metadata and controls

74 lines (49 loc) · 3.43 KB

CI/CD

Continuous Integration in Neco is served by CircleCI workflow.

neco-updater service works as Continuous Delivery to update components in the boot server automatically.

Architecture

architecture

CI flow

After main merge

  1. Check out main branch then merge changes into release branch.
  2. Run dctest but fewer test cases from regular dctest.
  3. If dctest is passed, cybozu-neco pushes changes to release branch to remote branch in github.com/cybozu-go/neco.
  4. Also, cybozu-neco also applies and pushes a tag test-YYYY.MM.DD-UNIQUE_ID to the remote.

Regular test cases of dctest are also run in parallel.

Nightly workflow

Same workflow process but it works on release branch. This is run as stability aspects.

Are you ready to deploy for the staging data center?

  1. Choose a tag in release page which starts with test- of what you want.
  2. Create a new tag which has release- prefix. Note that date and UNIQUE_ID are same as before.
    $ git tag release-YYYY.MM.DD-UNIQUE_ID test-YYYY.MM.DD-UNIQUE_ID
    $ git push origin --tags
  3. CI workflow builds a debian package neco-YYYY.MM.DD-UNIQUE_ID.deb and uploads it to GitHub Release.
  4. neco-updater on staging starts CD flow described below.

Are you ready to deploy for production data center?

  1. Choose a pre-release tag in release page which starts with release- of what you want.
  2. Uncheck This is a pre-release, then click Publish release.
  3. neco-updater on production starts CD flow described below.

CD flow

  1. A service neco-updater detects a new release of GitHub Release on neco repository.
  2. If new release exists, neco-updater add information to the etcd key <prefix>/current.
  3. neco-worker to update neco package, then restart neco-worker service.
  4. neco-worker installs/updates container images, and sabakan contents.

Glossary

  • tag: test-YYYY.MM.DD-UNIQUE_ID

    It is a candidate release version which is passed dctest.

  • tag: release-YYYY.MM.DD-UNIQUE_ID

    It is an already released version with neco Debian package.

    • neco-updater on staging finds a new pre-release of them.
    • neco-updater on production finds a new release of them.
  • cybozu-neco 🐈

    A bot GitHub Account for handling CI jobs using GitHub.