diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2835179..22e0c6b 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -14,7 +14,7 @@ // "forwardPorts": [], // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "npm install", + "postCreateCommand": "/bin/bash .devcontainer/postCreate.sh", // Configure tool-specific properties. "customizations": { diff --git a/.devcontainer/postCreate.sh b/.devcontainer/postCreate.sh new file mode 100755 index 0000000..1f1cee7 --- /dev/null +++ b/.devcontainer/postCreate.sh @@ -0,0 +1,12 @@ +#!/bin/env bash + +npm install + +git clone https://github.com/kubernetes-csi/csi-test /tmp/csi-test +pushd /tmp/csi-test +make +sudo cp /tmp/csi-test/cmd/csi-sanity/csi-sanity /usr/local/bin +popd +rm -rf /tmp/csi-test + +sudo apt update \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f9b1bc8..50dbc88 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -191,7 +191,7 @@ jobs: max-parallel: 1 matrix: config: - - zfs-generic/iscsi-pcs.yaml + #- zfs-generic/iscsi-pcs.yaml # TODO: enable this once the server is setup - zfs-generic/iscsi-targetcli.yaml - zfs-generic/nfs.yaml - zfs-generic/smb.yaml diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a770271..f9965b6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,6 +29,11 @@ To use the devcontainer: 3. Click "Reopen in Container" when prompted 4. Start coding with pre-configured environment +> [!Note] +> For `iSCSI` it's mandatory to use the Vagrant VM, due to the need of a kernel driver. +> However for other tests the container is probably enough. It's possible to run the `dev/run.sh` +> as explained below in the devcontainer and see if it's possible, before spinning up a full VM. + #### 2. System Testing with Vagrant Vagrant provides a full virtual machine environment for: