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 f28d751
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 34 deletions.
58 changes: 24 additions & 34 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 @@ -45,20 +47,16 @@ jobs:
- name: Save container images
run: |
. .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 bdevperf > bdevperf.tar
docker save $QUAY_NVMEOF:$NVMEOF_VERSION -o nvmeof.tar.xz
docker save $QUAY_NVMEOFCLI:$NVMEOF_VERSION -o nvmeof-cli.tar.xz
docker save $QUAY_CEPH:$CEPH_VERSION -o ceph.tar.xz
docker save bdevperf -o bdevperf.tar.xz
- name: Upload container images
uses: actions/upload-artifact@v3
with:
name: ceph_nvmeof_container_images-${{ github.run_number }}
path: |
nvmeof.tar
nvmeof-cli.tar
vstart-cluster.tar
bdevperf.tar
path: "*.tar.xz"

pytest:
needs: build
Expand All @@ -68,7 +66,7 @@ jobs:
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 +82,7 @@ jobs:

- name: Load container images
run: |
docker load < nvmeof.tar
docker load < vstart-cluster.tar
docker load < *.tar.xz
- name: Clear space on disk
run: |
Expand Down Expand Up @@ -149,7 +146,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 @@ -191,10 +188,7 @@ jobs:

- name: Load container images
run: |
docker load < nvmeof.tar
docker load < nvmeof-cli.tar
docker load < vstart-cluster.tar
docker load < bdevperf.tar
docker load < *.tar.xz
- name: Start containers
run: |
Expand Down Expand Up @@ -272,9 +266,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 +279,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 +299,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 @@ -324,10 +318,7 @@ jobs:

- name: Load container images
run: |
docker load < nvmeof.tar
docker load < nvmeof-cli.tar
docker load < vstart-cluster.tar
docker load < bdevperf.tar
docker load < *.tar.xz
- name: Start discovery controller
if: matrix.integration == 'container'
Expand Down Expand Up @@ -463,9 +454,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 Expand Up @@ -500,8 +491,7 @@ jobs:

- name: Load container images
run: |
docker load < nvmeof.tar
docker load < nvmeof-cli.tar
docker load < *.tar.xz
- name: Login to quay.io
uses: docker/login-action@v2
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 f28d751

Please sign in to comment.