Skip to content

BGPBackend: make frr-k8s the default backend in openshift #135

BGPBackend: make frr-k8s the default backend in openshift

BGPBackend: make frr-k8s the default backend in openshift #135

Workflow file for this run

name: Release
on:
push:
# Sequence of patterns matched against refs/tags
branches:
- "main"
- "v[0-9]+.[0-9]+"
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+"
jobs:
main:
runs-on: ubuntu-20.04
strategy:
matrix:
go: ["1.21"]
name: Go ${{ matrix.go }}
steps:
- name: Checkout Metal LB Operator
uses: actions/checkout@v2
with:
fetch-depth: 0 # Fetch all history for all tags and branches
- uses: actions/setup-go@v2
id: go
with:
go-version: ${{ matrix.go }}
- name: Verify modules
run: go mod verify
- name: Verify format
run: |
make fmt
git diff --exit-code
- name: Verify release bundle manifests
run: |
make bundle-release
git diff --exit-code -I'^ createdAt: ' bundle
- name: Deploy Metal LB Operator with OLM
run: |
make deploy-with-olm REPO=localhost:5000
- name: E2E Tests
run: |
export KUBECONFIG=${HOME}/.kube/config
make test-validation
SKIP="frr-k8s" make test-e2e
- name: Archive E2E Tests logs
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: test_e2e_logs
path: /tmp/test_e2e_logs/
- name: Export kind logs
if: ${{ failure() }}
run: |
kind export logs /tmp/kind_logs
- name: Archive kind logs
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: kind_logs
path: /tmp/kind_logs
publish-image:
needs: [main]
runs-on: ubuntu-20.04
permissions:
contents: read
id-token: write # needed for signing the images with GitHub OIDC Token
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Install Cosign
uses: sigstore/cosign-installer@main
with:
cosign-release: "v2.2.4"
- name: Code checkout
uses: actions/checkout@v3
- name: Setup docker buildx
uses: docker/setup-buildx-action@v2
- name: Log into Quay
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
quay.io/metallb/metallb-operator
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
type=semver,pattern={{raw}}
labels: |
org.opencontainers.image.title=metallboperator
org.opencontainers.image.description=operator for metallb, a network load-balancer implementation for Kubernetes using standard routing protocols
- name: Build and push metallboperator
uses: docker/build-push-action@v3
id: build-and-push
with:
context: .
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le,linux/arm/v7
cache-from: type=gha
cache-to: type=gha,mode=max
push: true
build-args: |
GIT_BRANCH: ${{ github.ref_name }}
GIT_COMMIT: ${{ github.sha }}
- name: Cosign sign tags
run: cosign sign --yes ${TAGS}
env:
TAGS: ${{ steps.meta.outputs.tags }}@${{ steps.build-and-push.outputs.digest }}
release:
needs: [publish-image]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v') # we craft releases only for tags
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build changelog
id: build_changelog
uses: mikepenz/release-changelog-builder-action@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: ${{steps.build_changelog.outputs.changelog}}
draft: false
prerelease: false