feat(helm): add list of container images #152
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: K8s CI | |
on: | |
pull_request: | |
types: ['opened', 'edited', 'reopened', 'synchronize'] | |
jobs: | |
k8s-ci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@v11 | |
with: | |
kvm: true | |
- uses: DeterminateSystems/magic-nix-cache-action@v6 | |
- name: Pre-populate nix-shell | |
run: | | |
export NIX_PATH=nixpkgs=$(jq '.nixpkgs.url' nix/sources.json -r) | |
echo "NIX_PATH=$NIX_PATH" >> $GITHUB_ENV | |
nix-shell ./scripts/k8s/shell.nix --run "echo" | |
- name: BootStrap k8s cluster | |
run: | | |
nix-shell ./scripts/k8s/shell.nix --run "./scripts/k8s/deployer.sh start --label --dump-kind-images" | |
- name: Install Helm Chart | |
run: | | |
nix-shell ./scripts/k8s/shell.nix --run "./scripts/helm/install.sh --dep-update --wait" | |
- name: Container Image List | |
run: | | |
# Verifies if the list of images is accurate | |
nix-shell ./scripts/k8s/shell.nix --run "./scripts/helm/verify-kind-images.sh" | |
- name: The job has failed | |
if: ${{ failure() }} | |
run: | | |
nix-shell ./scripts/k8s/shell.nix --run "kubectl get pods -A -o wide" | |
nix-shell ./scripts/k8s/shell.nix --run "kubectl -n mayastor logs -lopenebs.io/release=mayastor --all-containers=true" | |
k8s-ci-vm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@v11 | |
with: | |
kvm: true | |
- uses: DeterminateSystems/magic-nix-cache-action@v6 | |
- name: Pre-populate nix-shell | |
run: | | |
export NIX_PATH=nixpkgs=$(jq '.nixpkgs.url' nix/sources.json -r) | |
echo "NIX_PATH=$NIX_PATH" >> $GITHUB_ENV | |
nix-shell ./scripts/k8s/shell.nix --run "echo" | |
- name: Test on VM | |
run: | | |
nix-shell ./scripts/k8s/shell.nix --run "cd chart; helm dependency update" | |
nix-build ./tests/helm/test.nix --option sandbox false |