Collect fission dump if CI tests fails & enable manual trigger (#2058)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -1,82 +1,98 @@
|
|||||||
name: Fission CI
|
name: Fission CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches:
|
||||||
|
- master
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches:
|
||||||
|
- master
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Job to run change detection
|
# Job to run change detection
|
||||||
integration-test:
|
integration-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v2.3.4
|
uses: actions/checkout@v2.3.4
|
||||||
|
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v2.3.4
|
uses: actions/checkout@v2.3.4
|
||||||
with:
|
with:
|
||||||
repository: fission/examples
|
repository: fission/examples
|
||||||
path: examples
|
path: examples
|
||||||
|
|
||||||
- name: setup go
|
- name: setup go
|
||||||
uses: actions/setup-go@v2.1.3
|
uses: actions/setup-go@v2.1.3
|
||||||
with:
|
with:
|
||||||
go-version: '1.15.12'
|
go-version: "1.15.12"
|
||||||
|
|
||||||
- name: Helm installation
|
- name: Helm installation
|
||||||
uses: Azure/setup-helm@v1
|
uses: Azure/setup-helm@v1
|
||||||
with:
|
with:
|
||||||
version: v3.3.4
|
version: v3.3.4
|
||||||
|
|
||||||
- name: Kind Clutser
|
|
||||||
uses: engineerd/setup-kind@v0.5.0
|
|
||||||
with:
|
|
||||||
config: kind.yaml
|
|
||||||
|
|
||||||
- name: Configuring and testing the Installation
|
|
||||||
run: |
|
|
||||||
kubectl cluster-info --context kind-kind
|
|
||||||
kind get kubeconfig --internal >$HOME/.kube/config
|
|
||||||
kubectl get nodes
|
|
||||||
sudo apt-get install -y apache2-utils
|
|
||||||
|
|
||||||
- name: Static code analysis
|
|
||||||
run: |
|
|
||||||
./hack/verify-gofmt.sh
|
|
||||||
./hack/verify-govet.sh
|
|
||||||
helm lint charts/fission-all/ charts/fission-core/
|
|
||||||
|
|
||||||
- name: Run unit tests
|
|
||||||
run: ./hack/runtests.sh
|
|
||||||
|
|
||||||
- name: Helm update
|
|
||||||
run: helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
|
|
||||||
|
|
||||||
- name: Install Skaffold
|
|
||||||
run: |
|
|
||||||
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64
|
|
||||||
sudo install skaffold /usr/local/bin/
|
|
||||||
skaffold version
|
|
||||||
|
|
||||||
- name: Build and Install Fission
|
|
||||||
run: |
|
|
||||||
kubectl create ns fission
|
|
||||||
kubectl create -k crds/v1
|
|
||||||
skaffold run -p kind-ci
|
|
||||||
|
|
||||||
- name: Build and Install Fission CLI
|
|
||||||
run: |
|
|
||||||
go build -o fission cmd/fission-cli/main.go
|
|
||||||
sudo mv fission /usr/local/bin
|
|
||||||
fission version
|
|
||||||
|
|
||||||
- name: Port-forward fission components
|
- name: Kind Clutser
|
||||||
run: |
|
uses: engineerd/setup-kind@v0.5.0
|
||||||
kubectl port-forward svc/router 8888:80 -nfission &
|
with:
|
||||||
kubectl port-forward svc/controller 8889:80 -nfission &
|
config: kind.yaml
|
||||||
kubectl port-forward svc/nats-streaming 8890:4222 -nfission &
|
|
||||||
|
|
||||||
- name: Integration tests
|
- name: Configuring and testing the Installation
|
||||||
run: ./test/kind_CI.sh
|
run: |
|
||||||
|
kubectl cluster-info --context kind-kind
|
||||||
|
kind get kubeconfig --internal >$HOME/.kube/config
|
||||||
|
kubectl get nodes
|
||||||
|
sudo apt-get install -y apache2-utils
|
||||||
|
|
||||||
|
- name: Static code analysis
|
||||||
|
run: |
|
||||||
|
./hack/verify-gofmt.sh
|
||||||
|
./hack/verify-govet.sh
|
||||||
|
helm lint charts/fission-all/ charts/fission-core/
|
||||||
|
|
||||||
|
- name: Run unit tests
|
||||||
|
run: ./hack/runtests.sh
|
||||||
|
|
||||||
|
- name: Helm update
|
||||||
|
run: helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
|
||||||
|
|
||||||
|
- name: Install Skaffold
|
||||||
|
run: |
|
||||||
|
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64
|
||||||
|
sudo install skaffold /usr/local/bin/
|
||||||
|
skaffold version
|
||||||
|
|
||||||
|
- name: Build and Install Fission
|
||||||
|
run: |
|
||||||
|
kubectl create ns fission
|
||||||
|
kubectl create -k crds/v1
|
||||||
|
skaffold run -p kind-ci
|
||||||
|
|
||||||
|
- name: Build and Install Fission CLI
|
||||||
|
run: |
|
||||||
|
go build -o fission cmd/fission-cli/main.go
|
||||||
|
sudo mv fission /usr/local/bin
|
||||||
|
fission version
|
||||||
|
|
||||||
|
- name: Port-forward fission components
|
||||||
|
run: |
|
||||||
|
kubectl port-forward svc/router 8888:80 -nfission &
|
||||||
|
kubectl port-forward svc/controller 8889:80 -nfission &
|
||||||
|
kubectl port-forward svc/nats-streaming 8890:4222 -nfission &
|
||||||
|
|
||||||
|
- name: Integration tests
|
||||||
|
run: ./test/kind_CI.sh
|
||||||
|
|
||||||
|
- name: Collect Fission Dump
|
||||||
|
if: ${{ failure() }}
|
||||||
|
run: |
|
||||||
|
fission support dump
|
||||||
|
|
||||||
|
- name: Archive fission dump
|
||||||
|
if: ${{ failure() }}
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: fission-support-dump
|
||||||
|
path: fission-dump/*.zip
|
||||||
|
retention-days: 5
|
||||||
|
|||||||
@@ -23,25 +23,27 @@ TAG ?= dev
|
|||||||
|
|
||||||
check: test-run build clean
|
check: test-run build clean
|
||||||
|
|
||||||
# run basic check scripts
|
code-checks:
|
||||||
test-run:
|
|
||||||
hack/verify-gofmt.sh
|
hack/verify-gofmt.sh
|
||||||
hack/verify-govet.sh
|
hack/verify-govet.sh
|
||||||
hack/verify-staticcheck.sh
|
hack/verify-staticcheck.sh
|
||||||
|
|
||||||
|
# run basic check scripts
|
||||||
|
test-run: code-checks
|
||||||
hack/runtests.sh
|
hack/runtests.sh
|
||||||
@rm -f coverage.txt
|
@rm -f coverage.txt
|
||||||
|
|
||||||
# ensure the changes are buildable
|
# ensure the changes are buildable
|
||||||
build:
|
build: build-cli
|
||||||
go build -o cmd/fission-bundle/fission-bundle ./cmd/fission-bundle/
|
|
||||||
go build -o cmd/fission-cli/fission ./cmd/fission-cli/
|
|
||||||
go build -o cmd/fetcher/fetcher ./cmd/fetcher/
|
go build -o cmd/fetcher/fetcher ./cmd/fetcher/
|
||||||
go build -o cmd/fetcher/builder ./cmd/builder/
|
go build -o cmd/fetcher/builder ./cmd/builder/
|
||||||
go build -o cmd/reporter/reporter ./cmd/reporter/
|
go build -o cmd/reporter/reporter ./cmd/reporter/
|
||||||
|
|
||||||
# install CLI binary to $PATH
|
build-cli:
|
||||||
install-cli: build
|
go build -o cmd/fission-cli/fission ./cmd/fission-cli/
|
||||||
mv cmd/fission-cli/fission $(GOPATH)/bin
|
|
||||||
|
install-cli: build-cli
|
||||||
|
mv cmd/fission-cli/fission /usr/local/bin
|
||||||
|
|
||||||
verify-builder:
|
verify-builder:
|
||||||
@./hack/buildx.sh
|
@./hack/buildx.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user