Skip to content

Commit

Permalink
Resolved comments
Browse files Browse the repository at this point in the history
  • Loading branch information
shimritproj committed Oct 19, 2023
1 parent 7471453 commit 503d8f5
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 59 deletions.
83 changes: 40 additions & 43 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@ jobs:
args: --timeout=15m0s --verbose
unit:
runs-on: ubuntu-20.04
strategy:
matrix:
go: [ '1.18.3' ]
name: Unit and Integration tests
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup
uses: ./.github/workflows/composite/setup
- name: Verify manifests
Expand All @@ -49,39 +48,21 @@ jobs:
run: |
export KUBECONFIG=${HOME}/.kube/config
METALLB_BGP_TYPE=native make test
METALLB_BGP_TYPE=frr DEPLOY_KUBE_RBAC_PROXIES=true make test
verify_branch:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Verify Version Bump
run: |
make bump_versions
make check_generated
main:
METALLB_BGP_TYPE=frr DEPLOY_KUBE_RBAC_PROXIES=true make test
e2e:
runs-on: ubuntu-20.04
env:
built_image: "metallb-operator:ci" # Arbitrary name
strategy:
matrix:
go: [ '1.19.5' ]
name: Go ${{ matrix.go }}
needs:
- lint
- verify_branch
- unit
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup
uses: ./.github/workflows/composite/setup

- name: Verify manifests
run: |
make manifests
git diff --exit-code
- name: Build image
run: |
IMG=${built_image} make docker-build
Expand All @@ -94,20 +75,24 @@ jobs:
- name: Deploy Metal LB Operator
run: |
IMG=${built_image} KUSTOMIZE_DEPLOY_DIR="config/kind-ci/" make deploy
- name: Collectlogs
- name: E2E Tests
shell: bash
run: |
export KUBECONFIG=${HOME}/.kube/config
make test-validation
make test-e2e
- name: Collect Logs
uses: ./.github/workflows/composite/collectlogs
mainolm:
runs-on: ubuntu-20.04
strategy:
matrix:
go: [ '1.19.5' ]
name: Go ${{ matrix.go }}
needs:
- lint
- verify_branch
- unit
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup
uses: ./.github/workflows/composite/setup

Expand All @@ -128,10 +113,15 @@ jobs:
- name: Deploy Metal LB Operator with OLM
run: |
make deploy-with-olm REPO=localhost:5000
- name: Collectlogs
- name: E2E Tests
shell: bash
run: |
export KUBECONFIG=${HOME}/.kube/config
make test-validation
make test-e2e
- name: Collect Logs
uses: ./.github/workflows/composite/collectlogs
mainupgrade:
upgrade:
runs-on: ubuntu-20.04
env:
built_image_prev_release: "metallb-operator-prev-rel:ci" # Arbitrary name
Expand Down Expand Up @@ -168,7 +158,13 @@ jobs:
run: |
make deploy-cert-manager
IMG=${built_image_prev_release} KUSTOMIZE_DEPLOY_DIR="config/kind-ci/" ENABLE_OPERATOR_WEBHOOK="true" make deploy
- name: Collectlogs
- name: E2E Tests
shell: bash
run: |
export KUBECONFIG=${HOME}/.kube/config
make test-validation
make test-e2e
- name: Collect Logs
uses: ./.github/workflows/composite/collectlogs

- name: Checkout Latest Metal LB Operator
Expand Down Expand Up @@ -197,27 +193,28 @@ jobs:
sleep 5
echo "Waiting for operator pod to be ready."
done
- name: Collectlogs
- name: E2E Tests
shell: bash
run: |
export KUBECONFIG=${HOME}/.kube/config
make test-validation
make test-e2e
- name: Collect Logs
uses: ./.github/workflows/composite/collectlogs
maine2e:
metallb_e2e:
runs-on: ubuntu-20.04
env:
built_image: "metallb-operator:ci" # Arbitrary name
strategy:
matrix:
go: ["1.19.5"]
name: Go ${{ matrix.go }}
needs:
- lint
- verify_branch
- unit
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup
uses: ./.github/workflows/composite/setup
- name: Verify manifests
run: |
make manifests
git diff --exit-code
- name: Read metallb ref
id: metallb_ref
run: echo "content=$(cat ./hack/metallb_ref.txt)" >> $GITHUB_OUTPUT
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/composite/collectlogs/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@ inputs:
runs:
using: "composite"
steps:
- name: E2E Tests
shell: bash
run: |
export KUBECONFIG=${HOME}/.kube/config
make test-validation
make test-e2e
- name: Archive E2E Tests logs
if: ${{ failure() }}
uses: actions/upload-artifact@v2
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/composite/setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ runs:
with:
path: metallboperator
fetch-depth: 0 # Fetch all history for all tags and branches

- uses: actions/setup-go@v2
id: go

- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}

go-version-file: "go.mod"
cache: true
- name: Verify modules
shell: bash
run: go mod verify
Expand All @@ -27,7 +26,4 @@ runs:
shell: bash
run: |
make fmt
git diff --exit-code

git diff --exit-code
22 changes: 22 additions & 0 deletions .github/workflows/verify_version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Verify Release
on:
pull_request:
branches:
- main
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+"
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+"
jobs:
verify_branch:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Verify Version Bump
run: |
make bump_versions
make check_generated

0 comments on commit 503d8f5

Please sign in to comment.