Skip to content

Commit

Permalink
aligh with libbpf integration test
Browse files Browse the repository at this point in the history
Signed-off-by: Jie Ren <jie.ren@intel.com>
  • Loading branch information
jiere committed Jul 19, 2023
1 parent 19ee6e9 commit 2e1a3fe
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions .github/workflows/platform-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ on:
env:
GO_VERSION: "1.18"
OUTPUT_DIR: "_output/"
FILE_NAME: "kepler.tar.gz"
FILE_NAME: "kepler_libbpf.tar.gz"

jobs:
build-kepler:
build-kepler_with_libbpf:
runs-on: [self-hosted, linux, x64]
strategy:
matrix:
cluster_provider: [kind]
steps:
- name: checkout source
uses: actions/checkout@v3
Expand All @@ -22,28 +25,34 @@ jobs:

- name: build manifest
run: make build-manifest OPTS="CI_DEPLOY"
env:
CLUSTER_PROVIDER: ${{matrix.cluster_provider}}
IMAGE_REPO: "localhost:5001"
IMAGE_TAG: "devel"
CTR_CMD: docker

- name: build and export Kepler image
run: |
make build_containerized
make save-image
env:
ATTACHER_TAG: libbpf
IMAGE_REPO: "localhost:5001"
IMAGE_TAG: "devel"
CTR_CMD: docker
IMAGE_OUTPUT_PATH: ${{env.OUTPUT_DIR}}${{env.FILE_NAME}}
IMAGE_OUTPUT_PATH: ${{env.OUTPUT_DIR}}${{matrix.cluster_provider}}_${{env.FILE_NAME}}

- name: save Kepler image as artifact
uses: actions/upload-artifact@v3
with:
name: kepler
path: ${{env.OUTPUT_DIR}}${{env.FILE_NAME}}
path: ${{env.OUTPUT_DIR}}${{matrix.cluster_provider}}_${{env.FILE_NAME}}
retention-days: 1
# ref https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
# as PR or Push event, we don't keep artifact in 90 days hence use 1 day here to save resources.

integration_test:
needs: [build-kepler]
integration_test_with_libbpf:
needs: [build-kepler_with_libbpf]
runs-on: [self-hosted, linux, x64]
strategy:
matrix:
Expand All @@ -59,14 +68,19 @@ jobs:

- name: build manifest
run: make build-manifest OPTS="CI_DEPLOY"
env:
CLUSTER_PROVIDER: ${{matrix.cluster_provider}}
IMAGE_REPO: "localhost:5001"
IMAGE_TAG: "devel"
CTR_CMD: docker

- name: import Kepler image
run: make load-image
env:
IMAGE_REPO: "localhost:5001"
IMAGE_TAG: "devel"
CTR_CMD: docker
INPUT_PATH: ${{env.FILE_NAME}}
INPUT_PATH: ${{matrix.cluster_provider}}_${{env.FILE_NAME}}

- name: use Kepler action to deploy cluster
uses: sustainable-computing-io/kepler-action@v0.0.1
Expand Down Expand Up @@ -94,6 +108,7 @@ jobs:
- name: run e2e tests
run: make e2e
env:
ATTACHER_TAG: libbpf
CLUSTER_PROVIDER: ${{matrix.cluster_provider}}
kepler_address: localhost:9102

Expand Down

0 comments on commit 2e1a3fe

Please sign in to comment.