Skip to content

Commit

Permalink
WIP: e2e-dlb: try save and restore image as artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
okartau committed Dec 8, 2022
1 parent 0d2575a commit bd3ef99
Show file tree
Hide file tree
Showing 11 changed files with 67 additions and 649 deletions.
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@v2
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@v2
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

0 comments on commit bd3ef99

Please sign in to comment.