-
-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: prabhu <prabhu@appthreat.com> nydus test Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
- Loading branch information
Showing
4 changed files
with
95 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[proxy_plugins] | ||
[proxy_plugins.nydus] | ||
type = "snapshot" | ||
address = "/run/containerd-nydus/containerd-nydus-grpc.sock" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
} | ||
|