Skip to content

WIP: e2e-dlb: try save and restore image as artifact #92

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 0 additions & 82 deletions .github/workflows/build-push.yml

This file was deleted.

180 changes: 0 additions & 180 deletions .github/workflows/ci.yaml

This file was deleted.

69 changes: 67 additions & 2 deletions .github/workflows/e2e-dlb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,77 @@ permissions:
contents: read

jobs:
image:
name: Build image
runs-on: ubuntu-20.04
strategy:
matrix:
image:
- intel-dlb-plugin
- intel-dlb-initcontainer
- dlb-libdlb-demo
builder: [docker]
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: actions/setup-go@v3
- run: make -e vendor
- name: Build image
env:
IMAGE_NAME: ${{ matrix.image }}
BUILDER_NAME: ${{ matrix.builder }}
run: |
make ${IMAGE_NAME} BUILDER=${BUILDER_NAME}
mkdir -p artifacts-${{ github.sha }}
docker tag intel/${IMAGE_NAME}:devel intel/${IMAGE_NAME}:${{ github.sha }}
docker save intel/${IMAGE_NAME}:devel > artifacts-${{ github.sha }}/${IMAGE_NAME}.tar

- name: Temporarily save Docker image
uses: actions/upload-artifact@v3
with:
name: artifacts-${{ github.sha }}
path: artifacts-${{ github.sha }}
retention-days: 1

transfer-images:
name: transfer-images
runs-on: self-hosted
# runs-on: simics-gnr
needs: image
steps:
- name: Wait for ready state
run: ../../../../bmetal/actions-bmetal-runstage.sh waitready
- name: Describe environment
run: |
env |sort
date
- name: Retrieve saved artifacts
uses: actions/download-artifact@v3
with:
name: artifacts-${{ github.sha }}
path: artifacts-${{ github.sha }}
- name: Show the artifacts
run: |
date
ls -la artifacts-${{ github.sha }}
- name: Push images to local registry
run: ../../../../bmetal/actions-bmetal-runstage.sh push

e2e-dlb:
name: e2e-dlb
strategy:
fail-fast: false
matrix:
runner: [simics-spr, simics-gnr]
runs-on: ${{ matrix.runner }}
needs: transfer-images
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -37,9 +101,10 @@ jobs:
echo "Ref: ${{ github.ref }}"
echo "SHA: ${{ github.sha }}"
echo "Images: $IMAGES"

- name: Wait for ready state
run: ../../../../bmetal/actions-bmetal-runstage.sh waitready
- name: Prepare test environment
run: ../../../../bmetal/actions-bmetal-runstage.sh prepare
run: ../../../../bmetal/actions-bmetal-runstage.sh prepare2
- name: Run tests
run: ../../../../bmetal/actions-bmetal-runstage.sh test
run: ../../../../bmetal/actions-bmetal-runstage.sh test2
Loading