Skip to content

Commit 37c39f0

Browse files
committed
WIP: e2e-dlb: try save and restore image as artifact
1 parent 0d2575a commit 37c39f0

11 files changed

+67
-649
lines changed

.github/workflows/build-push.yml

-82
This file was deleted.

.github/workflows/ci.yaml

-180
This file was deleted.

.github/workflows/e2e-dlb.yml

+67-2
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,77 @@ permissions:
1919
contents: read
2020

2121
jobs:
22+
image:
23+
name: Build image
24+
runs-on: ubuntu-20.04
25+
strategy:
26+
matrix:
27+
image:
28+
- intel-dlb-plugin
29+
- intel-dlb-initcontainer
30+
- dlb-libdlb-demo
31+
builder: [docker]
32+
steps:
33+
- uses: actions/checkout@v3
34+
- uses: actions/cache@v3
35+
with:
36+
path: |
37+
~/.cache/go-build
38+
~/go/pkg/mod
39+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
40+
restore-keys: |
41+
${{ runner.os }}-go-
42+
- uses: actions/setup-go@v3
43+
- run: make -e vendor
44+
- name: Build image
45+
env:
46+
IMAGE_NAME: ${{ matrix.image }}
47+
BUILDER_NAME: ${{ matrix.builder }}
48+
run: |
49+
make ${IMAGE_NAME} BUILDER=${BUILDER_NAME}
50+
mkdir -p artifacts-${{ github.sha }}
51+
docker tag intel/${IMAGE_NAME}:devel intel/${IMAGE_NAME}:${{ github.sha }}
52+
docker save intel/${IMAGE_NAME}:devel > artifacts-${{ github.sha }}/${IMAGE_NAME}.tar
53+
54+
- name: Temporarily save Docker image
55+
uses: actions/upload-artifact@v2
56+
with:
57+
name: artifacts-${{ github.sha }}
58+
path: artifacts-${{ github.sha }}
59+
retention-days: 1
60+
61+
transfer-images:
62+
name: transfer-images
63+
# runs-on: self-hosted
64+
runs-on: simics-gnr
65+
needs: image
66+
steps:
67+
- name: Wait for ready state
68+
run: ../../../../bmetal/actions-bmetal-runstage.sh waitready
69+
- name: Describe environment
70+
run: |
71+
env |sort
72+
date
73+
- name: Retrieve saved artifacts
74+
uses: actions/download-artifact@v2
75+
with:
76+
name: artifacts-${{ github.sha }}
77+
path: artifacts-${{ github.sha }}
78+
- name: Show the artifacts
79+
run: |
80+
date
81+
ls -la artifacts-${{ github.sha }}
82+
- name: Push images to local registry
83+
run: ../../../../bmetal/actions-bmetal-runstage.sh push
84+
2285
e2e-dlb:
2386
name: e2e-dlb
2487
strategy:
2588
fail-fast: false
2689
matrix:
2790
runner: [simics-spr, simics-gnr]
2891
runs-on: ${{ matrix.runner }}
92+
needs: transfer-images
2993
steps:
3094
- uses: actions/checkout@v3
3195
with:
@@ -37,9 +101,10 @@ jobs:
37101
echo "Ref: ${{ github.ref }}"
38102
echo "SHA: ${{ github.sha }}"
39103
echo "Images: $IMAGES"
104+
40105
- name: Wait for ready state
41106
run: ../../../../bmetal/actions-bmetal-runstage.sh waitready
42107
- name: Prepare test environment
43-
run: ../../../../bmetal/actions-bmetal-runstage.sh prepare
108+
run: ../../../../bmetal/actions-bmetal-runstage.sh prepare2
44109
- name: Run tests
45-
run: ../../../../bmetal/actions-bmetal-runstage.sh test
110+
run: ../../../../bmetal/actions-bmetal-runstage.sh test2

0 commit comments

Comments
 (0)