From 5454fb8c395126c65e548286f27431119537de1b Mon Sep 17 00:00:00 2001 From: prabhu Date: Tue, 21 Nov 2023 20:54:07 +0000 Subject: [PATCH] Do not ignore node_modules Signed-off-by: prabhu nydus test Signed-off-by: Prabhu Subramanian --- .github/workflows/java-reachables-test.yml | 2 +- .github/workflows/nydus-demo.yml | 60 ++++++++++++++++++++++ ci/containerd-config.toml | 4 ++ ci/nydusd-config.fusedev.json | 30 +++++++++++ 4 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/nydus-demo.yml create mode 100644 ci/containerd-config.toml create mode 100644 ci/nydusd-config.fusedev.json diff --git a/.github/workflows/java-reachables-test.yml b/.github/workflows/java-reachables-test.yml index 17d746115..606e84e35 100644 --- a/.github/workflows/java-reachables-test.yml +++ b/.github/workflows/java-reachables-test.yml @@ -35,7 +35,7 @@ jobs: - name: compile run: | cd repotests/dependency-track - mvn clean compile -DskipTests -Dmaven.test.skip=true + mvn -q clean compile -DskipTests -Dmaven.test.skip=true - name: repotests run: | bin/cdxgen.js -p -t java --profile research -o repotests/dependency-track/bom.json repotests/dependency-track diff --git a/.github/workflows/nydus-demo.yml b/.github/workflows/nydus-demo.yml new file mode 100644 index 000000000..848cd4d5d --- /dev/null +++ b/.github/workflows/nydus-demo.yml @@ -0,0 +1,60 @@ +name: nydus tests + +on: + pull_request: + workflow_dispatch: +jobs: + build: + strategy: + fail-fast: false + matrix: + node-version: ['21.x'] + os: ['ubuntu-latest'] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - name: Set up JDK + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '19' + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - uses: actions/checkout@v4 + with: + repository: 'DependencyTrack/dependency-track' + path: 'repotests/dependency-track' + - name: setup nydus + run: | + curl -LO https://github.com/dragonflyoss/nydus/releases/download/v2.2.4/nydus-static-v2.2.4-linux-amd64.tgz + tar -xvf nydus-static-v2.2.4-linux-amd64.tgz + chmod +x nydus-static/* + mv nydus-static/* /usr/local/bin/ + rm -rf nydus-static-v2.2.4-linux-amd64.tgz nydus-static + curl -LO https://github.com/containerd/nerdctl/releases/download/v1.7.0/nerdctl-full-1.7.0-linux-amd64.tar.gz + sudo tar Cxzvf /usr/local nerdctl-full-1.7.0-linux-amd64.tar.gz + sudo mkdir -p /etc/nydus/ + sudo rm -rf /var/lib/containerd-nydus + curl -LO https://github.com/containerd/nydus-snapshotter/releases/download/v0.13.3/nydus-snapshotter-v0.13.3-x86_64.tgz + sudo tar Cxzvf /usr/local/bin nydus-snapshotter-v0.13.3-x86_64.tgz + sudo mv /usr/local/bin/nydus-snapshotter/* /usr/local/bin/ + sudo cp ./ci/nydusd-config.fusedev.json /etc/nydus/nydusd-config.fusedev.json + sudo mkdir -p /etc/containerd + sudo cp ./ci/containerd-config.toml /etc/containerd/config.toml + sudo systemctl enable --now containerd + sudo systemctl restart containerd + - name: compile + run: | + cd repotests/dependency-track + mvn -q clean compile -DskipTests -Dmaven.test.skip=true + - name: repotests + run: | + sudo /usr/local/bin/containerd-nydus-grpc --nydusd-config /etc/nydus/nydusd-config.fusedev.json & + sleep 30 + cd repotests/dependency-track + sudo nerdctl --snapshotter nydus run --rm -e CDXGEN_DEBUG_MODE -v $HOME/.m2:/root/.m2 -v $(pwd):/app ghcr.io/cyclonedx/cdxgen:master-nydus -p --profile research -t java /app + ls -ltr + env: + CDXGEN_DEBUG_MODE: debug diff --git a/ci/containerd-config.toml b/ci/containerd-config.toml new file mode 100644 index 000000000..399e4d0d5 --- /dev/null +++ b/ci/containerd-config.toml @@ -0,0 +1,4 @@ +[proxy_plugins] + [proxy_plugins.nydus] + type = "snapshot" + address = "/run/containerd-nydus/containerd-nydus-grpc.sock" diff --git a/ci/nydusd-config.fusedev.json b/ci/nydusd-config.fusedev.json new file mode 100644 index 000000000..9b67291ad --- /dev/null +++ b/ci/nydusd-config.fusedev.json @@ -0,0 +1,30 @@ +{ + "device": { + "backend": { + "type": "registry", + "config": { + "scheme": "", + "skip_verify": true, + "timeout": 5, + "connect_timeout": 5, + "retry_limit": 4, + "auth": "" + } + }, + "cache": { + "type": "blobcache", + "config": { + "work_dir": "cache" + } + } + }, + "mode": "direct", + "digest_validate": false, + "iostats_files": false, + "enable_xattr": true, + "fs_prefetch": { + "enable": true, + "threads_count": 4 + } + } + \ No newline at end of file