Monitor Upstream Feature Flags
JH team will figure out a way to monitor feature flag changes from upstream.
discuss issue with upstream: https://gitlab.com/gitlab-jh/gitlab-jh-enablement/-/issues/179.
demo project https://jihulab.com/maochao-free-group/test-project/-/blob/main/.gitlab-ci.yml
use CI job to check whether feature flags changes, pseudo code:
- only run on main-jh branch, allow_failure: true
- get
upstream_latest_commit
fromconfig/feature_flags
- get
JH_know_latest_commit
from CI cache - check
JH_know_latest_commit
equalupstream_latest_commit
or not - if equal, do nothing
- if not equal
- send slack message to notify dev, https://api.slack.com/apps/A03G9B75PSS/incoming-webhooks
- create jihulab issue for tracking, https://docs.gitlab.com/ee/api/issues.html#new-issue
- save
upstream_latest_commit
asJH_know_latest_commit
in CI cache
由 毛超 编辑于