Skip to content

Commit

Permalink
docker: save SPDK target arch as label
Browse files Browse the repository at this point in the history
Signed-off-by: Ernesto Puerta <[email protected]>
  • Loading branch information
epuertat committed Jan 23, 2024
1 parent ce271ff commit 010a045
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 20 deletions.
42 changes: 22 additions & 20 deletions .github/workflows/build-container.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
# yamllint disable rule:line-length
name: "CI"
on:
on: # yamllint disable rule:truthy
push:
tags:
- 'v*'
Expand Down Expand Up @@ -47,7 +49,7 @@ jobs:
. .env
docker save $QUAY_NVMEOF:$NVMEOF_VERSION > nvmeof.tar
docker save $QUAY_NVMEOFCLI:$NVMEOF_VERSION > nvmeof-cli.tar
docker save $QUAY_CEPH:$CEPH_VERSION > vstart-cluster.tar
docker save $QUAY_CEPH:$CEPH_VERSION > ceph.tar
docker save bdevperf > bdevperf.tar
- name: Upload container images
Expand All @@ -57,18 +59,18 @@ jobs:
path: |
nvmeof.tar
nvmeof-cli.tar
vstart-cluster.tar
ceph.tar
bdevperf.tar
pytest:
needs: build
strategy:
fail-fast: false
matrix:
test: ["cli", "state", "multi_gateway", "server", "grpc", "omap_lock", "old_omap", "log_files"]
test: ["cli", "state", "multi_gateway", "server", "grpc", "omap_lock", "old_omap", "log_files"]
runs-on: ubuntu-latest
env:
HUGEPAGES: 512 # for multi gateway test, approx 256 per gateway instance
HUGEPAGES: 512 # for multi gateway test, approx 256 per gateway instance
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -84,8 +86,8 @@ jobs:

- name: Load container images
run: |
docker load < nvmeof.tar
docker load < vstart-cluster.tar
docker load < nvmeof-devel.tar
docker load < ceph.tar
- name: Clear space on disk
run: |
Expand Down Expand Up @@ -149,7 +151,7 @@ jobs:
- name: Check coredump existence
if: success() || failure()
id: check_coredumps
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2, pinned to SHA for security reasons
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2, pinned to SHA for security reasons
with:
files: "/tmp/coredump/core.*"

Expand Down Expand Up @@ -193,7 +195,7 @@ jobs:
run: |
docker load < nvmeof.tar
docker load < nvmeof-cli.tar
docker load < vstart-cluster.tar
docker load < ceph.tar
docker load < bdevperf.tar
- name: Start containers
Expand Down Expand Up @@ -272,9 +274,9 @@ jobs:
- name: Check coredump existence
if: success() || failure()
id: check_coredumps
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2, pinned to SHA for security reasons
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2, pinned to SHA for security reasons
with:
files: "/tmp/coredump/core.*"
files: "/tmp/coredump/core.*"

- name: Upload demo core dumps
if: steps.check_coredumps.outputs.files_exists == 'true'
Expand All @@ -285,10 +287,10 @@ jobs:
/tmp/coredump/core.*
# For debugging purposes (provides an SSH connection to the runner)
#- name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# with:
# limit-access-to-actor: true
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# with:
# limit-access-to-actor: true

- name: Display logs
if: success() || failure()
Expand All @@ -305,10 +307,10 @@ jobs:
strategy:
fail-fast: false
matrix:
integration: ["container", "embedded"]
integration: ["container", "embedded"]
runs-on: ubuntu-latest
env:
HUGEPAGES: 768 # 3 spdk instances
HUGEPAGES: 768 # 3 spdk instances

steps:
- name: Checkout code
Expand All @@ -326,7 +328,7 @@ jobs:
run: |
docker load < nvmeof.tar
docker load < nvmeof-cli.tar
docker load < vstart-cluster.tar
docker load < ceph.tar
docker load < bdevperf.tar
- name: Start discovery controller
Expand Down Expand Up @@ -463,9 +465,9 @@ jobs:
- name: Check coredump existence
if: success() || failure()
id: check_coredumps
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2, pinned to SHA for security reasons
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2, pinned to SHA for security reasons
with:
files: "/tmp/coredump/core.*"
files: "/tmp/coredump/core.*"

- name: Upload demo core dumps
if: steps.check_coredumps.outputs.files_exists == 'true'
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.spdk
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ LABEL io.spdk.version="$SPDK_VERSION" \
io.spdk.build.pkgdep-args="$SPDK_PKGDEP_ARGS" \
io.spdk.build.configure-args="$SPDK_CONFIGURE_ARGS" \
io.spdk.build.makeflags="$SPDK_MAKEFLAGS" \
io.spdk.build.target-arch="$SPDK_TARGET_ARCH" \
io.spdk.build.ceph-release="$SPDK_CEPH_VERSION" \
io.spdk.git.repo="$SPDK_GIT_REPO" \
io.spdk.git.branch="$SPDK_GIT_BRANCH" \
Expand Down
4 changes: 4 additions & 0 deletions mk/containerized.mk
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ down: override OPTS += --volumes --remove-orphans

events: ## Receive real-time events from containers

.PHONY:
image_name:
@$(DOCKER_COMPOSE) config --format=json | jq '.services."$(SVC)".image'

.PHONY:
docker_compose_clean: down
$(DOCKER) system prune --all --force --volumes --filter label="io.ceph.nvmeof"
Expand Down

0 comments on commit 010a045

Please sign in to comment.