Files
fission-src/.github/workflows/push_pr.yaml
T
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
e7dc87843a Bump Github Actions versions (#3118)
Bumps the global group with 9 updates:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `4.1.1` | `4.2.2` |
| [actions/setup-go](https://github.com/actions/setup-go) | `5.1.0` | `5.2.0` |
| [github/codeql-action](https://github.com/github/codeql-action) | `3.26.9` | `3.28.0` |
| [codecov/codecov-action](https://github.com/codecov/codecov-action) | `5.1.1` | `5.1.2` |
| [helm/kind-action](https://github.com/helm/kind-action) | `1.10.0` | `1.11.0` |
| [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) | `6.0.0` | `6.1.0` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `4.4.3` | `4.5.0` |
| [anchore/sbom-action](https://github.com/anchore/sbom-action) | `0.17.8` | `0.17.9` |
| [ossf/scorecard-action](https://github.com/ossf/scorecard-action) | `2.3.1` | `2.4.0` |


Updates `actions/checkout` from 4.1.1 to 4.2.2
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.1.1...11bd71901bbe5b1630ceea73d27597364c9af683)

Updates `actions/setup-go` from 5.1.0 to 5.2.0
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed...3041bf56c941b39c61721a86cd11f3bb1338122a)

Updates `github/codeql-action` from 3.26.9 to 3.28.0
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v3.26.9...48ab28a6f5dbc2a99bf1e0131198dd8f1df78169)

Updates `codecov/codecov-action` from 5.1.1 to 5.1.2
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/7f8b4b4bde536c465e797be725718b88c5d95e0e...1e68e06f1dbfde0e4cefc87efeba9e4643565303)

Updates `helm/kind-action` from 1.10.0 to 1.11.0
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](https://github.com/helm/kind-action/compare/0025e74a8c7512023d06dc019c617aa3cf561fde...ae94020eaf628e9b9b9f341a10cc0cdcf5c018fb)

Updates `goreleaser/goreleaser-action` from 6.0.0 to 6.1.0
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](https://github.com/goreleaser/goreleaser-action/compare/286f3b13b1b49da4ac219696163fb8c1c93e1200...9ed2f89a662bf1735a48bc8557fd212fa902bebf)

Updates `actions/upload-artifact` from 4.4.3 to 4.5.0
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882...6f51ac03b9356f520e9adb1b1b7802705f340c2b)

Updates `anchore/sbom-action` from 0.17.8 to 0.17.9
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Changelog](https://github.com/anchore/sbom-action/blob/main/RELEASE.md)
- [Commits](https://github.com/anchore/sbom-action/compare/v0.17.8...v0.17.9)

Updates `ossf/scorecard-action` from 2.3.1 to 2.4.0
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/0864cf19026789058feabb7e87baa5f140aac736...62b2cac7ed8198b15735ed49ab1e5cf35480ba46)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: global
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: global
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: global
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: global
- dependency-name: helm/kind-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: global
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: global
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: global
- dependency-name: anchore/sbom-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: global
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: global
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-23 17:21:14 +05:30

329 lines
10 KiB
YAML

name: Fission CI
on:
push:
branches:
- main
- '!dependabot/**'
paths:
- "**.go"
- "charts/**"
- "test/**"
- go.mod
- go.sum
pull_request:
branches:
- main
paths:
- "**.go"
- "charts/**"
- "test/**"
- go.mod
- go.sum
env:
HELM_VERSION: v3.13.0
KIND_VERSION: v0.23.0
KIND_CLUSTER_NAME: kind
permissions:
contents: read
jobs:
# Job to run change detection
integration-test:
runs-on: ${{ matrix.os }}
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
strategy:
fail-fast: false
matrix:
kindversion: ["v1.25.16", "v1.27.13", "v1.30.0"]
os: [ubuntu-latest]
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit
- name: Checkout sources
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: setup go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version-file: "go.mod"
cache: true
- name: Checkout sources
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: fission/examples
path: examples
- name: Helm installation
uses: Azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
with:
version: ${{ env.HELM_VERSION }}
- name: Kind Cluster
uses: helm/kind-action@ae94020eaf628e9b9b9f341a10cc0cdcf5c018fb # v1.11.0
with:
node_image: kindest/node:${{ matrix.kindversion }}
version: ${{ env.KIND_VERSION }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: kind.yaml
- name: Configuring and testing the Installation
run: |
kubectl cluster-info --context kind-${{ env.KIND_CLUSTER_NAME }}
kubectl get nodes
sudo apt-get install -y apache2-utils
kubectl config use-context kind-${{ env.KIND_CLUSTER_NAME }}
kubectl config view
- name: Helm chart lint
run: |
helm lint charts/fission-all/
- name: Install Skaffold
run: |
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.13.2/skaffold-linux-amd64
sudo install skaffold /usr/local/bin/
skaffold version
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf # v6.1.0
with:
install-only: true
version: "~> v2"
- name: Setup Prometheus Stack
run: |
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
kubectl create ns monitoring
helm install prometheus prometheus-community/kube-prometheus-stack -n monitoring \
--version 45.28.0 --set grafana.enabled=false --set alertmanager.enabled=false
- name: Build and Install Fission CLI
run: |
make debug-vars
make build-fission-cli
sudo make install-fission-cli
sudo chmod +x /usr/local/bin/fission
- name: Build and Install Fission
timeout-minutes: 10
run: |
kubectl create ns fission
make create-crds
SKAFFOLD_PROFILE=kind-ci make skaffold-deploy
- name: Port-forward fission components
run: |
kubectl port-forward svc/router 8888:80 -nfission &
- name: Get fission version
timeout-minutes: 10
run: |
fission version
- name: Integration tests
timeout-minutes: 90
run: ./test/kind_CI.sh
- name: Collect Fission Dump
timeout-minutes: 5
if: ${{ always() }}
run: |
command -v fission && fission support dump
- name: Kind export logs
timeout-minutes: 10
if: ${{ always() }}
run: |
kind export logs --name ${{ env.KIND_CLUSTER_NAME }} kind-logs
- name: Backup prometheus data
timeout-minutes: 10
if: ${{ always() }}
run: |
TRACE=1 ./hack/backup-prometheus.sh
- name: Archive fission dump
timeout-minutes: 10
if: ${{ failure() || cancelled() }}
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: fission-dump-${{ github.run_id }}-${{ matrix.kindversion }}
path: fission-dump/*.zip
retention-days: 5
- name: Archive prometheus dump
timeout-minutes: 10
if: ${{ always() }}
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: prom-dump-${{ github.run_id }}-${{ matrix.kindversion }}
path: /tmp/prometheus/*
retention-days: 5
- name: Archive kind logs
timeout-minutes: 10
if: ${{ always() }}
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: kind-logs-${{ github.run_id }}-${{ matrix.kindversion }}
path: kind-logs/*
retention-days: 5
# Job to ensure backward compatibility if function and builder pods are created
# inside functionNamespace and builderNamespace
integration-test-old:
runs-on: ${{ matrix.os }}
if: ${{ contains(github.event.pull_request.labels.*.name, 'run-old-ci') }}
strategy:
fail-fast: false
matrix:
kindversion: ["v1.19.16"]
os: [ubuntu-latest]
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit
- name: Checkout sources
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: setup go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version-file: "go.mod"
cache: true
- name: Checkout sources
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: fission/examples
path: examples
- name: Helm installation
uses: Azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
with:
version: ${{ env.HELM_VERSION }}
- name: Kind Cluster
uses: helm/kind-action@ae94020eaf628e9b9b9f341a10cc0cdcf5c018fb # v1.11.0
with:
node_image: kindest/node:${{ matrix.kindversion }}
version: ${{ env.KIND_VERSION }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: kind.yaml
- name: Configuring and testing the Installation
run: |
kubectl cluster-info --context kind-${{ env.KIND_CLUSTER_NAME }}
kubectl get nodes
sudo apt-get install -y apache2-utils
kubectl config use-context kind-${{ env.KIND_CLUSTER_NAME }}
kubectl config view
- name: Helm chart lint
run: |
helm lint charts/fission-all/
- name: Install Skaffold
run: |
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.13.2/skaffold-linux-amd64
sudo install skaffold /usr/local/bin/
skaffold version
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf # v6.1.0
with:
install-only: true
version: "~> v2"
- name: Setup Prometheus Stack
run: |
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
kubectl create ns monitoring
helm install prometheus prometheus-community/kube-prometheus-stack -n monitoring \
--version 45.28.0 --set grafana.enabled=false --set alertmanager.enabled=false
- name: Build and Install Fission CLI
run: |
make debug-vars
make build-fission-cli
sudo make install-fission-cli
sudo chmod +x /usr/local/bin/fission
- name: Build and Install Fission
timeout-minutes: 10
run: |
kubectl create ns fission
make create-crds
SKAFFOLD_PROFILE=kind-ci-old make skaffold-deploy
- name: Port-forward fission components
run: |
kubectl port-forward svc/router 8888:80 -nfission &
- name: Get fission version
timeout-minutes: 10
run: |
fission version
- name: Integration tests
timeout-minutes: 90
run: |
export FUNCTION_NAMESPACE=fission-function
export BUILDER_NAMESPACE=fission-builder
./test/kind_CI.sh
- name: Collect Fission Dump
timeout-minutes: 5
if: ${{ always() }}
run: |
command -v fission && fission support dump
- name: Kind export logs
timeout-minutes: 10
if: ${{ always() }}
run: |
kind export logs --name kind kind-logs
- name: Backup prometheus data
timeout-minutes: 10
if: ${{ always() }}
run: |
TRACE=1 ./hack/backup-prometheus.sh
- name: Archive fission dump
timeout-minutes: 10
if: ${{ failure() || cancelled() }}
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: fission-dump-${{ github.run_id }}-${{ matrix.kindversion }}
path: fission-dump/*.zip
retention-days: 5
- name: Archive prometheus dump
timeout-minutes: 10
if: ${{ always() }}
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: prom-dump-${{ github.run_id }}-${{ matrix.kindversion }}
path: /tmp/prometheus/*
retention-days: 5
- name: Archive kind logs
timeout-minutes: 10
if: ${{ always() }}
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: kind-logs-${{ github.run_id }}-${{ matrix.kindversion }}
path: kind-logs/*
retention-days: 5