Skip to content

Commit f364ab6

Browse files
Merge pull request #1426 from dprince/crd-sync-check
Add CRD sync check
2 parents 912099a + 787a896 commit f364ab6

File tree

3 files changed

+37
-2
lines changed

3 files changed

+37
-2
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# a simple boolean to check of a CRD sync check is needed
2+
name: CRD sync check
3+
4+
on:
5+
schedule:
6+
- cron: '0 */2 * * *' # every 2 hours
7+
workflow_dispatch:
8+
9+
jobs:
10+
11+
crd-sync-check:
12+
if: github.repository_owner == 'openstack-k8s-operators'
13+
name: CRD sync check
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
ref: ${{ github.ref_name }}
21+
22+
- name: run make force-bump
23+
shell: bash
24+
run: |
25+
BRANCH='${{ github.ref_name }}' make force-bump
26+
27+
- name: run make bindata
28+
shell: bash
29+
run: |
30+
make bindata
31+
32+
- name: Fail if there are local CRD changes requiring a CRD sync
33+
run: |
34+
git diff --quiet bindata/crds

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# openstack-operator
22

33
[![CodeQL](https://github.com/openstack-k8s-operators/openstack-operator/actions/workflows/codeql.yml/badge.svg)](https://github.com/openstack-k8s-operators/openstack-operator/actions/workflows/codeql.yml)
4+
[![CRD sync check](https://github.com/openstack-k8s-operators/openstack-operator/actions/workflows/crd-sync-check.yaml/badge.svg)](https://github.com/openstack-k8s-operators/openstack-operator/actions/workflows/crd-sync-check.yaml)
45

56
This is the primary operator for OpenStack. It is a "meta" operator, meaning it
67
serves to coordinate the other operators for OpenStack by watching and configuring

hack/fake_minor_update.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# A quick way to test a fake minor update. Run this script, and then once the
22
# openstackversion reconciles (the CSV will redeploy the controller-manager)
33
# you can set targetVersion == 0.0.2 for a quick test
4-
oc get csv openstack-operator.v0.0.1 -o yaml -n openstack-operators > csv.yaml
4+
oc get csv openstack-operator.v0.3.0 -o yaml -n openstack-operators > csv.yaml
55
# bump them to current-podified
66
sed -i csv.yaml -e "s|value: .*quay.io/podified-antelope-centos9/\(.*\)@.*|value: quay.io/podified-antelope-centos9/\1:current-podified|g"
77
# also bump the OPENSTACK_RELEASE_VERSION value (it is the only field set like this)
8-
sed -i csv.yaml -e "s|value: 0.0.1|value: 0.0.2|"
8+
sed -i csv.yaml -e "s|value: 0.3.0|value: 0.3.1|"
99
oc apply -n openstack-operators -f csv.yaml

0 commit comments

Comments
 (0)