ovn-ci-periodic #13
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: ovn-ci-periodic | |
on: | |
schedule: | |
- cron: '0 6 * * *' | |
workflow_dispatch: | |
permissions: | |
contents: read | |
env: | |
GO_VERSION: "1.19.6" | |
K8S_VERSION: v1.24.0 | |
KIND_CLUSTER_NAME: ovn | |
KIND_INSTALL_INGRESS: true | |
KIND_ALLOW_SYSTEM_WRITES: true | |
# This skips tests tagged as Serial | |
# Current Serial tests are not relevant for OVN | |
PARALLEL: true | |
jobs: | |
build: | |
if: github.repository == 'ovn-org/ovn-kubernetes' || github.event_name == 'workflow_dispatch' | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
with: | |
ref: master | |
- name: Build | |
run: | | |
set -x | |
pushd go-controller | |
make | |
make windows | |
popd | |
- name: Build docker image | |
run: | | |
pushd dist/images | |
sudo cp -f ../../go-controller/_output/go/bin/ovn* . | |
echo "ref: $(git rev-parse --symbolic-full-name HEAD) commit: $(git rev-parse HEAD)" > git_info | |
docker build -t ovn-daemonset-f:dev -f Dockerfile.fedora . | |
mkdir _output | |
docker save ovn-daemonset-f:dev > _output/image.tar | |
popd | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: test-image | |
path: dist/images/_output/image.tar | |
k8s: | |
if: github.repository == 'ovn-org/ovn-kubernetes' || github.event_name == 'workflow_dispatch' | |
name: Build k8s | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up environment | |
run: | | |
export GOPATH=$(go env GOPATH) | |
echo "GOPATH=$GOPATH" >> $GITHUB_ENV | |
echo "$GOPATH/bin" >> $GITHUB_PATH | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Install KIND | |
run: | | |
sudo curl -Lo /usr/local/bin/kind https://github.com/aojea/kind/releases/download/dualstack/kind | |
sudo chmod +x /usr/local/bin/kind | |
e2e-dual: | |
if: github.repository == 'ovn-org/ovn-kubernetes' || github.event_name == 'workflow_dispatch' | |
name: e2e-dual | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- "shard-conformance" | |
- "control-plane" | |
ha: [ "HA", "noHA" ] | |
ipfamily: [ "dualstack" ] | |
exclude: | |
# Not currently supported but needs to be. | |
# See e2e in test.yml | |
- {"ipfamily": "dualstack", "target": "control-plane"} | |
needs: [build, k8s] | |
env: | |
JOB_NAME: "${{ matrix.target }}-${{ matrix.ha }}-${{ matrix.ipfamily }}" | |
OVN_HA: "${{ matrix.ha == 'HA' }}" | |
# Deploy dual stack cluster | |
KIND_IPV4_SUPPORT: "${{ matrix.ipfamily == 'IPv4' || matrix.ipfamily == 'dualstack' }}" | |
KIND_IPV6_SUPPORT: "${{ matrix.ipfamily == 'IPv6' || matrix.ipfamily == 'dualstack' }}" | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Set up environment | |
run: | | |
export GOPATH=$(go env GOPATH) | |
echo "GOPATH=$GOPATH" >> $GITHUB_ENV | |
echo "$GOPATH/bin" >> $GITHUB_PATH | |
- name: Install KIND | |
run: | | |
sudo curl -Lo /usr/local/bin/kind https://github.com/aojea/kind/releases/download/dualstack/kind | |
sudo chmod +x /usr/local/bin/kind | |
- uses: actions/download-artifact@v3 | |
with: | |
name: test-image | |
- name: Load docker image | |
run: | | |
docker load --input image.tar | |
- name: kind setup | |
run: | | |
export OVN_IMAGE="ovn-daemonset-f:dev" | |
make -C test install-kind | |
- name: Run Tests | |
run: | | |
make -C test ${{ matrix.target }} | |
- name: Export logs | |
if: always() | |
run: | | |
mkdir -p /tmp/kind/logs | |
kind export logs --name ${KIND_CLUSTER_NAME} --loglevel=debug /tmp/kind/logs | |
- name: Upload logs | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: kind-logs-${{ env.JOB_NAME }}-${{ github.run_id }} | |
path: /tmp/kind/logs |