chore:Updated Dockerfile to include k8s crd manpulation scripts #1315
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sanity-CI-Ubuntu-22 | |
on: | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
inputs: | |
testName: | |
description: 'Test Run-Name' | |
required: true | |
default: 'Sanity-BuildCI-u22' | |
workflow_run: | |
workflows: ["Build-CI"] | |
types: | |
- completed | |
jobs: | |
build: | |
name: basic-sanity-ubuntu-22 | |
runs-on: ubuntu-22.04 | |
permissions: | |
packages: write | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/setup-python@v2 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: '>=1.18.0' | |
- run: sudo apt-get update | |
- run: sudo apt-get -y install clang llvm libelf-dev gcc-multilib libpcap-dev linux-tools-$(uname -r) elfutils dwarves git libbsd-dev bridge-utils unzip build-essential bison flex iproute2 | |
- run: | | |
sudo ip netns add test | |
sudo ip netns del test | |
- run: loxilb-ebpf/utils/mkllb_bpffs.sh | |
- run: sudo -E env "PATH=$PATH" make | |
- run: sudo -E env "PATH=$PATH" make test | |
- run: docker pull ghcr.io/loxilb-io/loxilb:latest | |
- run: docker run -u root --cap-add SYS_ADMIN --restart unless-stopped --privileged -dit -v /dev/log:/dev/log --name loxilb ghcr.io/loxilb-io/loxilb:latest-amd64 | |
- run: pwd && ls && sudo -E env "PATH=$PATH" make docker-cp-ebpf | |
- run: docker exec -dit loxilb mkllb_bpffs | |
- run: id=`docker ps -f name=loxilb | cut -d " " -f 1 | grep -iv "CONTAINER"` && docker commit $id ghcr.io/loxilb-io/loxilb:latest | |
- run: docker stop loxilb && docker rm loxilb && docker image tag ghcr.io/loxilb-io/loxilb:latest ghcr.io/loxilb-io/loxilb:latestu22 | |
- run: | | |
cd cicd/sconnect/ | |
./config.sh | |
./validation.sh | |
./rmconfig.sh | |
cd - | |
- run: | | |
cd cicd/tcplb/ | |
./config.sh | |
./validation.sh | |
./rmconfig.sh | |
cd - | |
- name: Publish the latest loxilb Docker image | |
if: | | |
github.repository == 'loxilb-io/loxilb' && (github.event_name == 'workflow_run' || github.event_name == 'workflow_dispatch') | |
run: docker push ghcr.io/loxilb-io/loxilb:latestu22 |