Skip to content

Second commit - Updating same README and release note changes as on 2… #164

Second commit - Updating same README and release note changes as on 2…

Second commit - Updating same README and release note changes as on 2… #164

Workflow file for this run

name: Build and Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
# if workflow for PR or push is already running stop it, and start new one
group: build-and-test-${{ github.ref }}
cancel-in-progress: true
permissions: read-all
jobs:
BuildAndTest:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- name: "Set up Go"
uses: actions/setup-go@v4
with:
go-version: 1.20.5
- name: "Build"
run: make dpdk
- name: Change Permissions
run: |
sudo mkdir -p /var/lib/cni/inframanager
sudo chmod 777 -R /var/lib/cni/inframanager
ls -ltr /var/lib/cni
- name: "Test"
run: |
#make test
echo "skipping unit test"
DockerBuildAndPush:
needs: BuildAndTest
timeout-minutes: 30
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- uses: actions/checkout@v3
- name: "Set up Go"
uses: actions/setup-go@v4
with:
go-version: 1.20.5
- name: "Create k8s Kind Cluster"
uses: helm/kind-action@v1.5.0
- name: "kustomize test"
run: |
# https://github.com/kubernetes-sigs/kustomize/issues/2867
kustomize version
- name: "docker build"
run: make docker-build IMAGE_REGISTRY=ghcr.io/${{ github.repository_owner }}/k8s-infra-offload/ IMAGE_VERSION=sha-${GITHUB_SHA::7}
- name: "Docker build for branch"
if: github.event_name == 'push'
run: make docker-build IMAGE_REGISTRY=ghcr.io/${{ github.repository_owner }}/k8s-infra-offload/ IMAGE_VERSION=${GITHUB_REF##*/}
- name: "docker deploy"
run: |
cp -f deploy/dpdk/infraagent-configmap.yaml deploy/.
make deploy IMAGE_REGISTRY=ghcr.io//${{ github.repository_owner }}k8s-infra-offload/ IMAGE_VERSION=sha-${GITHUB_SHA::7}
# getnodes using kubectl
kubectl get nodes -o wide
docker images | grep "k8s-infra-offload"
- name: "Login to GitHub Container Registry"
if: github.event_name == 'push'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: "push docker images to registry"
if: github.event_name == 'push'
run: |
make docker-push IMAGE_REGISTRY=ghcr.io/${{ github.repository_owner }}/k8s-infra-offload/ IMAGE_VERSION=sha-${GITHUB_SHA::7}
make docker-push IMAGE_REGISTRY=ghcr.io/${{ github.repository_owner }}/k8s-infra-offload/ IMAGE_VERSION=${GITHUB_REF##*/}