Skip to content

Commit

Permalink
Add test for kustomize
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
cloudnull committed Jan 28, 2024
1 parent 942574b commit ee2f6bd
Show file tree
Hide file tree
Showing 16 changed files with 518 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/kustomize-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
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: |
if [ ! -f /usr/local/bin/kustomize ]; then
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash
fi
- name: Pull OSH infra submodule
run: |
git submodule update --init submodules/openstack-helm-infra
- name: Make OSH infra submodule
run: |
cd submodules/openstack-helm-infra
make ingress
- 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
28 changes: 28 additions & 0 deletions .github/workflows/kustomize-k8s-dashboard.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
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: |
if [ ! -f /usr/local/bin/kustomize ]; then
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash
fi
- 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
40 changes: 40 additions & 0 deletions .github/workflows/kustomize-libvirt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
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: |
if [ ! -f /usr/local/bin/kustomize ]; then
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash
fi
- name: Pull OSH infra submodule
run: |
git submodule update --init submodules/openstack-helm-infra
- name: Make OSH infra submodule
run: |
cd submodules/openstack-helm-infra
make libvirt
- 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
33 changes: 33 additions & 0 deletions .github/workflows/kustomize-mariadb-cluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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: |
if [ ! -f /usr/local/bin/kustomize ]; then
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash
fi
- name: Run Kustomize Build
run: |
kustomize build kustomize/mariadb-cluster/${{ matrix.overlays }} > /tmp/rendered.yaml
- name: Return Kustomize Build
uses: actions/upload-artifact@v2
with:
name: kustomize-mariadb-cluster-artifact-${{ matrix.overlays }}
path: /tmp/rendered.yaml
33 changes: 33 additions & 0 deletions .github/workflows/kustomize-mariadb-operator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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: |
if [ ! -f /usr/local/bin/kustomize ]; then
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash
fi
- 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
38 changes: 38 additions & 0 deletions .github/workflows/kustomize-memcached.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
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: |
if [ ! -f /usr/local/bin/kustomize ]; then
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash
fi
- 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
28 changes: 28 additions & 0 deletions .github/workflows/kustomize-openstack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
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: |
if [ ! -f /usr/local/bin/kustomize ]; then
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash
fi
- 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
28 changes: 28 additions & 0 deletions .github/workflows/kustomize-ovn.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
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: |
if [ ! -f /usr/local/bin/kustomize ]; then
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash
fi
- 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
33 changes: 33 additions & 0 deletions .github/workflows/kustomize-rabbitmq-cluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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: |
if [ ! -f /usr/local/bin/kustomize ]; then
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash
fi
- name: Run Kustomize Build
run: |
kustomize build kustomize/rabbitmq-cluster/${{ matrix.overlays }} > /tmp/rendered.yaml
- name: Return Kustomize Build
uses: actions/upload-artifact@v2
with:
name: kustomize-rabbitmq-cluster-artifact-${{ matrix.overlays }}
path: /tmp/rendered.yaml
28 changes: 28 additions & 0 deletions .github/workflows/kustomize-rabbitmq-operator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
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: |
if [ ! -f /usr/local/bin/kustomize ]; then
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash
fi
- 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
28 changes: 28 additions & 0 deletions .github/workflows/kustomize-rabbitmq-topology-operator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
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: |
if [ ! -f /usr/local/bin/kustomize ]; then
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash
fi
- 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
Loading

0 comments on commit ee2f6bd

Please sign in to comment.