From cc64f93e2bc872e85d976510cd41024ff474dd5b Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Sun, 28 Jan 2024 14:40:20 -0600 Subject: [PATCH] Add test for kustomize This change will ensure all of our kustomize targets build and will only gate a target when a change is made to that specific location. Signed-off-by: Kevin Carter --- .github/workflows/kustomize-ingress.yaml | 37 +++++++++++++++++++ .../workflows/kustomize-k8s-dashboard.yaml | 26 +++++++++++++ .github/workflows/kustomize-libvirt.yaml | 31 ++++++++++++++++ .../workflows/kustomize-mariadb-cluster.yaml | 32 ++++++++++++++++ .../workflows/kustomize-mariadb-operator.yaml | 31 ++++++++++++++++ .github/workflows/kustomize-memcached.yaml | 37 +++++++++++++++++++ .github/workflows/kustomize-openstack.yaml | 26 +++++++++++++ .github/workflows/kustomize-ovn.yaml | 26 +++++++++++++ .../workflows/kustomize-rabbitmq-cluster.yaml | 32 ++++++++++++++++ .../kustomize-rabbitmq-operator.yaml | 26 +++++++++++++ .../kustomize-rabbitmq-topology-operator.yaml | 26 +++++++++++++ .github/workflows/kustomize-rook-cluster.yaml | 26 +++++++++++++ .../workflows/kustomize-rook-defaults.yaml | 26 +++++++++++++ .../workflows/kustomize-rook-operator.yaml | 26 +++++++++++++ .github/workflows/kustomize-skyline.yaml | 33 +++++++++++++++++ .github/workflows/kustomize-toplvm.yaml | 36 ++++++++++++++++++ 16 files changed, 477 insertions(+) create mode 100644 .github/workflows/kustomize-ingress.yaml create mode 100644 .github/workflows/kustomize-k8s-dashboard.yaml create mode 100644 .github/workflows/kustomize-libvirt.yaml create mode 100644 .github/workflows/kustomize-mariadb-cluster.yaml create mode 100644 .github/workflows/kustomize-mariadb-operator.yaml create mode 100644 .github/workflows/kustomize-memcached.yaml create mode 100644 .github/workflows/kustomize-openstack.yaml create mode 100644 .github/workflows/kustomize-ovn.yaml create mode 100644 .github/workflows/kustomize-rabbitmq-cluster.yaml create mode 100644 .github/workflows/kustomize-rabbitmq-operator.yaml create mode 100644 .github/workflows/kustomize-rabbitmq-topology-operator.yaml create mode 100644 .github/workflows/kustomize-rook-cluster.yaml create mode 100644 .github/workflows/kustomize-rook-defaults.yaml create mode 100644 .github/workflows/kustomize-rook-operator.yaml create mode 100644 .github/workflows/kustomize-skyline.yaml create mode 100644 .github/workflows/kustomize-toplvm.yaml diff --git a/.github/workflows/kustomize-ingress.yaml b/.github/workflows/kustomize-ingress.yaml new file mode 100644 index 00000000..738fccd4 --- /dev/null +++ b/.github/workflows/kustomize-ingress.yaml @@ -0,0 +1,37 @@ +name: Kustomize GitHub Actions for ingress + +on: + pull_request: + paths: + - kustomize/ingress/** + - .github/workflows/kustomize-ingress.yaml +jobs: + kustomize: + strategy: + matrix: + overlays: + - external + - internal + + name: Kustomize + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: azure/setup-helm@v3 + with: + version: latest + token: "${{ secrets.GITHUB_TOKEN }}" + id: helm + - name: Kustomize Install + working-directory: /usr/local/bin/ + run: | + curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash + - name: Run Kustomize Build + run: | + kustomize build kustomize/ingress/${{ matrix.overlays }} --enable-helm --helm-command ${{ steps.helm.outputs.helm-path }} > /tmp/rendered.yaml + - name: Return Kustomize Build + uses: actions/upload-artifact@v2 + with: + name: kustomize-ingress-artifact-${{ matrix.overlays }} + path: /tmp/rendered.yaml diff --git a/.github/workflows/kustomize-k8s-dashboard.yaml b/.github/workflows/kustomize-k8s-dashboard.yaml new file mode 100644 index 00000000..d3a176fc --- /dev/null +++ b/.github/workflows/kustomize-k8s-dashboard.yaml @@ -0,0 +1,26 @@ +name: Kustomize GitHub Actions for k8s-dashboard + +on: + pull_request: + paths: + - kustomize/k8s-dashboard/** + - .github/workflows/kustomize-k8s-dashboard.yaml +jobs: + kustomize: + name: Kustomize + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Kustomize Install + working-directory: /usr/local/bin/ + run: | + curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash + - name: Run Kustomize Build + run: | + kustomize build kustomize/k8s-dashboard > /tmp/rendered.yaml + - name: Return Kustomize Build + uses: actions/upload-artifact@v2 + with: + name: kustomize-k8s-dashboard-artifact + path: /tmp/rendered.yaml diff --git a/.github/workflows/kustomize-libvirt.yaml b/.github/workflows/kustomize-libvirt.yaml new file mode 100644 index 00000000..4adf0e82 --- /dev/null +++ b/.github/workflows/kustomize-libvirt.yaml @@ -0,0 +1,31 @@ +name: Kustomize GitHub Actions for libvirt + +on: + pull_request: + paths: + - kustomize/libvirt/** + - .github/workflows/kustomize-libvirt.yaml +jobs: + kustomize: + name: Kustomize + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: azure/setup-helm@v3 + with: + version: latest + token: "${{ secrets.GITHUB_TOKEN }}" + id: helm + - name: Kustomize Install + working-directory: /usr/local/bin/ + run: | + curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash + - name: Run Kustomize Build + run: | + kustomize build kustomize/libvirt --enable-helm --helm-command ${{ steps.helm.outputs.helm-path }} > /tmp/rendered.yaml + - name: Return Kustomize Build + uses: actions/upload-artifact@v2 + with: + name: kustomize-libvirt-artifact + path: /tmp/rendered.yaml diff --git a/.github/workflows/kustomize-mariadb-cluster.yaml b/.github/workflows/kustomize-mariadb-cluster.yaml new file mode 100644 index 00000000..17c401c4 --- /dev/null +++ b/.github/workflows/kustomize-mariadb-cluster.yaml @@ -0,0 +1,32 @@ +name: Kustomize GitHub Actions for mariadb-cluster + +on: + pull_request: + paths: + - kustomize/mariadb-cluster/** + - .github/workflows/kustomize-mariadb-cluster.yaml +jobs: + kustomize: + strategy: + matrix: + overlays: + - base + - aio + + name: Kustomize + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Kustomize Install + working-directory: /usr/local/bin/ + run: | + curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash + - name: Run Kustomize Build + run: | + kustomize build kustomize/mariadb-cluster > /tmp/rendered.yaml + - name: Return Kustomize Build + uses: actions/upload-artifact@v2 + with: + name: kustomize-mariadb-cluster-artifact + path: /tmp/rendered.yaml diff --git a/.github/workflows/kustomize-mariadb-operator.yaml b/.github/workflows/kustomize-mariadb-operator.yaml new file mode 100644 index 00000000..68b5d48f --- /dev/null +++ b/.github/workflows/kustomize-mariadb-operator.yaml @@ -0,0 +1,31 @@ +name: Kustomize GitHub Actions for mariadb-operator + +on: + pull_request: + paths: + - kustomize/mariadb-operator/** + - .github/workflows/kustomize-mariadb-operator.yaml +jobs: + kustomize: + name: Kustomize + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: azure/setup-helm@v3 + with: + version: latest + token: "${{ secrets.GITHUB_TOKEN }}" + id: helm + - name: Kustomize Install + working-directory: /usr/local/bin/ + run: | + curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash + - name: Run Kustomize Build + run: | + kustomize build kustomize/mariadb-operator --enable-helm --helm-command ${{ steps.helm.outputs.helm-path }} > /tmp/rendered.yaml + - name: Return Kustomize Build + uses: actions/upload-artifact@v2 + with: + name: kustomize-mariadb-operator-artifact + path: /tmp/rendered.yaml diff --git a/.github/workflows/kustomize-memcached.yaml b/.github/workflows/kustomize-memcached.yaml new file mode 100644 index 00000000..6ff254c3 --- /dev/null +++ b/.github/workflows/kustomize-memcached.yaml @@ -0,0 +1,37 @@ +name: Kustomize GitHub Actions for memcached + +on: + pull_request: + paths: + - kustomize/memcached/** + - .github/workflows/kustomize-memcached.yaml +jobs: + kustomize: + strategy: + matrix: + overlays: + - base + - aio + + name: Kustomize + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: azure/setup-helm@v3 + with: + version: latest + token: "${{ secrets.GITHUB_TOKEN }}" + id: helm + - name: Kustomize Install + working-directory: /usr/local/bin/ + run: | + curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash + - name: Run Kustomize Build + run: | + kustomize build kustomize/memcached/${{ matrix.overlays }} --enable-helm --helm-command ${{ steps.helm.outputs.helm-path }} > /tmp/rendered.yaml + - name: Return Kustomize Build + uses: actions/upload-artifact@v2 + with: + name: kustomize-memcached-artifact-${{ matrix.overlays }} + path: /tmp/rendered.yaml diff --git a/.github/workflows/kustomize-openstack.yaml b/.github/workflows/kustomize-openstack.yaml new file mode 100644 index 00000000..7dc00f05 --- /dev/null +++ b/.github/workflows/kustomize-openstack.yaml @@ -0,0 +1,26 @@ +name: Kustomize GitHub Actions for openstack + +on: + pull_request: + paths: + - kustomize/openstack/** + - .github/workflows/kustomize-openstack.yaml +jobs: + kustomize: + name: Kustomize + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Kustomize Install + working-directory: /usr/local/bin/ + run: | + curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash + - name: Run Kustomize Build + run: | + kustomize build kustomize/openstack > /tmp/rendered.yaml + - name: Return Kustomize Build + uses: actions/upload-artifact@v2 + with: + name: kustomize-openstack-artifact + path: /tmp/rendered.yaml diff --git a/.github/workflows/kustomize-ovn.yaml b/.github/workflows/kustomize-ovn.yaml new file mode 100644 index 00000000..79384b6e --- /dev/null +++ b/.github/workflows/kustomize-ovn.yaml @@ -0,0 +1,26 @@ +name: Kustomize GitHub Actions for ovn + +on: + pull_request: + paths: + - kustomize/ovn/** + - .github/workflows/kustomize-ovn.yaml +jobs: + kustomize: + name: Kustomize + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Kustomize Install + working-directory: /usr/local/bin/ + run: | + curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash + - name: Run Kustomize Build + run: | + kustomize build kustomize/ovn > /tmp/rendered.yaml + - name: Return Kustomize Build + uses: actions/upload-artifact@v2 + with: + name: kustomize-ovn-artifact + path: /tmp/rendered.yaml diff --git a/.github/workflows/kustomize-rabbitmq-cluster.yaml b/.github/workflows/kustomize-rabbitmq-cluster.yaml new file mode 100644 index 00000000..fe16a1c8 --- /dev/null +++ b/.github/workflows/kustomize-rabbitmq-cluster.yaml @@ -0,0 +1,32 @@ +name: Kustomize GitHub Actions for rabbitmq-cluster + +on: + pull_request: + paths: + - kustomize/rabbitmq-cluster/** + - .github/workflows/kustomize-rabbitmq-cluster.yaml +jobs: + kustomize: + strategy: + matrix: + overlays: + - base + - aio + + name: Kustomize + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Kustomize Install + working-directory: /usr/local/bin/ + run: | + curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash + - name: Run Kustomize Build + run: | + kustomize build kustomize/rabbitmq-cluster > /tmp/rendered.yaml + - name: Return Kustomize Build + uses: actions/upload-artifact@v2 + with: + name: kustomize-rabbitmq-cluster-artifact + path: /tmp/rendered.yaml diff --git a/.github/workflows/kustomize-rabbitmq-operator.yaml b/.github/workflows/kustomize-rabbitmq-operator.yaml new file mode 100644 index 00000000..d8c8f25c --- /dev/null +++ b/.github/workflows/kustomize-rabbitmq-operator.yaml @@ -0,0 +1,26 @@ +name: Kustomize GitHub Actions for rabbitmq-operator + +on: + pull_request: + paths: + - kustomize/rabbitmq-operator/** + - .github/workflows/kustomize-rabbitmq-operator.yaml +jobs: + kustomize: + name: Kustomize + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Kustomize Install + working-directory: /usr/local/bin/ + run: | + curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash + - name: Run Kustomize Build + run: | + kustomize build kustomize/rabbitmq-operator > /tmp/rendered.yaml + - name: Return Kustomize Build + uses: actions/upload-artifact@v2 + with: + name: kustomize-rabbitmq-operator-artifact + path: /tmp/rendered.yaml diff --git a/.github/workflows/kustomize-rabbitmq-topology-operator.yaml b/.github/workflows/kustomize-rabbitmq-topology-operator.yaml new file mode 100644 index 00000000..3f325e81 --- /dev/null +++ b/.github/workflows/kustomize-rabbitmq-topology-operator.yaml @@ -0,0 +1,26 @@ +name: Kustomize GitHub Actions for rabbitmq-topology-operator + +on: + pull_request: + paths: + - kustomize/rabbitmq-topology-operator/** + - .github/workflows/kustomize-rabbitmq-topology-operator.yaml +jobs: + kustomize: + name: Kustomize + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Kustomize Install + working-directory: /usr/local/bin/ + run: | + curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash + - name: Run Kustomize Build + run: | + kustomize build kustomize/rabbitmq-topology-operator > /tmp/rendered.yaml + - name: Return Kustomize Build + uses: actions/upload-artifact@v2 + with: + name: kustomize-rabbitmq-topology-operator-artifact + path: /tmp/rendered.yaml diff --git a/.github/workflows/kustomize-rook-cluster.yaml b/.github/workflows/kustomize-rook-cluster.yaml new file mode 100644 index 00000000..eaadb80a --- /dev/null +++ b/.github/workflows/kustomize-rook-cluster.yaml @@ -0,0 +1,26 @@ +name: Kustomize GitHub Actions for rook-cluster + +on: + pull_request: + paths: + - kustomize/rook-cluster/** + - .github/workflows/kustomize-rook-cluster.yaml +jobs: + kustomize: + name: Kustomize + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Kustomize Install + working-directory: /usr/local/bin/ + run: | + curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash + - name: Run Kustomize Build + run: | + kustomize build kustomize/rook-cluster > /tmp/rendered.yaml + - name: Return Kustomize Build + uses: actions/upload-artifact@v2 + with: + name: kustomize-rook-cluster-artifact + path: /tmp/rendered.yaml diff --git a/.github/workflows/kustomize-rook-defaults.yaml b/.github/workflows/kustomize-rook-defaults.yaml new file mode 100644 index 00000000..95c29f6d --- /dev/null +++ b/.github/workflows/kustomize-rook-defaults.yaml @@ -0,0 +1,26 @@ +name: Kustomize GitHub Actions for rook-defaults + +on: + pull_request: + paths: + - kustomize/rook-defaults/** + - .github/workflows/kustomize-rook-defaults.yaml +jobs: + kustomize: + name: Kustomize + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Kustomize Install + working-directory: /usr/local/bin/ + run: | + curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash + - name: Run Kustomize Build + run: | + kustomize build kustomize/rook-defaults > /tmp/rendered.yaml + - name: Return Kustomize Build + uses: actions/upload-artifact@v2 + with: + name: kustomize-rook-defaults-artifact + path: /tmp/rendered.yaml diff --git a/.github/workflows/kustomize-rook-operator.yaml b/.github/workflows/kustomize-rook-operator.yaml new file mode 100644 index 00000000..6f356b99 --- /dev/null +++ b/.github/workflows/kustomize-rook-operator.yaml @@ -0,0 +1,26 @@ +name: Kustomize GitHub Actions for rook-operator + +on: + pull_request: + paths: + - kustomize/rook-operator/** + - .github/workflows/kustomize-rook-operator.yaml +jobs: + kustomize: + name: Kustomize + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Kustomize Install + working-directory: /usr/local/bin/ + run: | + curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash + - name: Run Kustomize Build + run: | + kustomize build kustomize/rook-operator > /tmp/rendered.yaml + - name: Return Kustomize Build + uses: actions/upload-artifact@v2 + with: + name: kustomize-rook-operator-artifact + path: /tmp/rendered.yaml diff --git a/.github/workflows/kustomize-skyline.yaml b/.github/workflows/kustomize-skyline.yaml new file mode 100644 index 00000000..56b8fa4a --- /dev/null +++ b/.github/workflows/kustomize-skyline.yaml @@ -0,0 +1,33 @@ +name: Kustomize GitHub Actions for skyline + +on: + pull_request: + paths: + - kustomize/skyline/** + - .github/workflows/kustomize-skyline.yaml +jobs: + kustomize: + strategy: + matrix: + overlays: + - base + - aio + - fqdn + + name: Kustomize + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Kustomize Install + working-directory: /usr/local/bin/ + run: | + curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash + - name: Run Kustomize Build + run: | + kustomize build kustomize/skyline > /tmp/rendered.yaml + - name: Return Kustomize Build + uses: actions/upload-artifact@v2 + with: + name: kustomize-skyline-artifact + path: /tmp/rendered.yaml diff --git a/.github/workflows/kustomize-toplvm.yaml b/.github/workflows/kustomize-toplvm.yaml new file mode 100644 index 00000000..a6fd5122 --- /dev/null +++ b/.github/workflows/kustomize-toplvm.yaml @@ -0,0 +1,36 @@ +name: Kustomize GitHub Actions for topolvm + +on: + pull_request: + paths: + - kustomize/topolvm/** + - .github/workflows/kustomize-toplvm.yaml +jobs: + kustomize: + strategy: + matrix: + overlays: + - general + + name: Kustomize + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: azure/setup-helm@v3 + with: + version: latest + token: "${{ secrets.GITHUB_TOKEN }}" + id: helm + - name: Kustomize Install + working-directory: /usr/local/bin/ + run: | + curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash + - name: Run Kustomize Build + run: | + kustomize build kustomize/toplvm/${{ matrix.overlays }} --enable-helm --helm-command ${{ steps.helm.outputs.helm-path }} > /tmp/rendered.yaml + - name: Return Kustomize Build + uses: actions/upload-artifact@v2 + with: + name: kustomize-toplvm-artifact-${{ matrix.overlays }} + path: /tmp/rendered.yaml