This PR moves fission CLI as closer as possible to kubectl command behaviour. We have improved namespace handling behaviour across CLI. * add namespace param for fn and env * use common fn for ns check * update validation * default namespace for httpTrigger, env and package, config and triggers * use default ns * add namespace filter to spec * add forceNamespace flag * set current namespace * add default namespace in config * add namespace specific destroy * add all namespace in the list of resources * add namespace as global tag * use %s instead of %v * add test cases for namespace * use ns in get all functions
117 lines
2.9 KiB
YAML
117 lines
2.9 KiB
YAML
name: Fission CI upgrade
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "**.go"
|
|
- "charts/**"
|
|
- "test/**"
|
|
- go.mod
|
|
- go.sum
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "**.go"
|
|
- "charts/**"
|
|
- "test/**"
|
|
- go.mod
|
|
- go.sum
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
HELM_VERSION: v3.9.0
|
|
KIND_VERSION: v0.14.0
|
|
|
|
jobs:
|
|
upgrade-test:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
kindimage: ["kindest/node:v1.19.16"]
|
|
os: [ubuntu-latest]
|
|
steps:
|
|
- name: Checkout action sources
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version-file: "go.mod"
|
|
cache: true
|
|
|
|
- name: Setup Helm
|
|
uses: Azure/setup-helm@v3
|
|
with:
|
|
version: ${{ env.HELM_VERSION }}
|
|
|
|
- name: Setup Kind Clutser
|
|
uses: engineerd/setup-kind@v0.5.0
|
|
with:
|
|
image: ${{ matrix.kindimage }}
|
|
version: ${{ env.KIND_VERSION }}
|
|
|
|
- name: Install GoReleaser
|
|
uses: goreleaser/goreleaser-action@v2
|
|
with:
|
|
install-only: true
|
|
|
|
- name: Setup kubectl & fetch node information
|
|
run: |
|
|
kubectl cluster-info --context kind-kind
|
|
kubectl get nodes
|
|
kubectl get storageclasses.storage.k8s.io
|
|
kubectl config use-context kind-kind
|
|
kubectl config set-context --current --namespace=default
|
|
kubectl config view
|
|
|
|
- name: Dump system info
|
|
run: |
|
|
source ./test/upgrade_test/fission_objects.sh dump_system_info
|
|
|
|
- name: Install and configure previous stable fission
|
|
run: |
|
|
source ./test/upgrade_test/fission_objects.sh install_stable_release \
|
|
&& create_fission_objects \
|
|
&& test_fission_objects
|
|
|
|
- name: Upgrade fission to latest
|
|
run: |
|
|
source ./test/upgrade_test/fission_objects.sh build_docker_images \
|
|
&& kind_image_load \
|
|
&& install_current_release \
|
|
&& install_fission_cli
|
|
|
|
- name: Test previously created fission objects with new release
|
|
run: |
|
|
source ./test/upgrade_test/fission_objects.sh test_fission_objects
|
|
|
|
- name: Collect Fission Dump
|
|
if: ${{ always() }}
|
|
run: |
|
|
command -v fission && fission support dump
|
|
|
|
- name: Kind export logs
|
|
if: ${{ always() }}
|
|
run: |
|
|
kind export logs --name kind kind-logs
|
|
|
|
- name: Archive fission dump
|
|
if: ${{ failure() }}
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: fission-dump
|
|
path: fission-dump/*.zip
|
|
retention-days: 5
|
|
|
|
- name: Archive kind logs
|
|
if: ${{ always() }}
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: kind-logs-${{ github.run_id }}-${{ matrix.kindversion }}
|
|
path: kind-logs/*
|
|
retention-days: 5
|