-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add redis-valkey pipelines #1551
Open
jamonation
wants to merge
1
commit into
chainguard-dev:main
Choose a base branch
from
jamonation:pipeline-redis-valkey
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Run make for redis/valkey | ||
|
||
inputs: | ||
dir: | ||
description: | | ||
The directory containing the codebase. | ||
default: . | ||
opts: | ||
description: | | ||
Options to pass to the make command. | ||
default: '' | ||
|
||
needs: | ||
packages: | ||
- make | ||
|
||
pipeline: | ||
- runs: | | ||
export CFLAGS="$CFLAGS -DUSE_MALLOC_USABLE_SIZE ${{inputs.opts}}" | ||
make \ | ||
BUILD_TLS=yes \ | ||
all -j$(nproc) | ||
make install PREFIX=/usr INSTALL_BIN="${{targets.destdir}}/usr/bin" |
17 changes: 17 additions & 0 deletions
17
pkg/build/pipelines/redis-valkey/subpackage-benchmark.yaml
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,17 @@ | ||
name: Create benchamark subpackage for redis/valkey | ||
|
||
inputs: | ||
project: | ||
description: | | ||
The project name (redis or valkey) | ||
required: true | ||
|
||
pipeline: | ||
- runs: | | ||
mkdir -p "${{targets.subpkgdir}}"/usr/bin | ||
mv "${{targets.destdir}}"/usr/bin/${{inputs.project}}-benchmark "${{targets.subpkgdir}}"/usr/bin/${{inputs.project}}-benchmark | ||
|
||
description: ${{inputs.project}}-benchmark utility that simulates running commands done by N clients while at the same time sending M total queries | ||
|
||
provides: | ||
- ${{inputs.project}}-benchmark=${{package.full-version}} |
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,17 @@ | ||
name: Create cli subpackage for redis/valkey | ||
|
||
inputs: | ||
project: | ||
description: | | ||
The project name (redis or valkey) | ||
required: true | ||
|
||
pipeline: | ||
- runs: | | ||
mkdir -p "${{targets.subpkgdir}}"/usr/bin | ||
mv "${{targets.destdir}}"/usr/bin/${{inputs.project}}-cli "${{targets.subpkgdir}}"/usr/bin/${{inputs.project}}-cli | ||
|
||
description: ${{inputs.project}}-cli is the command line interface utility to talk with ${{inputs.project}}. | ||
|
||
provides: | ||
- ${{inputs.project}}-cli=${{package.full-version}} | ||
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,40 @@ | ||
name: Run tests for redis/valkey | ||
|
||
needs: | ||
packages: | ||
- make | ||
|
||
inputs: | ||
project: | ||
description: | | ||
The project name (redis or valkey) | ||
required: true | ||
|
||
pipeline: | ||
- runs: | | ||
cat <<EOF >> /tmp/config | ||
dbfilename dump.rdb | ||
pidfile /tmp/6379.pid | ||
dir /tmp/ | ||
EOF | ||
|
||
${{inputs.project}}-server /tmp/config & | ||
sleep 2 # wait for ${{inputs.project}} to start | ||
${{inputs.project}}-cli SET bike:1 "Process 134" || exit 1 | ||
${{inputs.project}}-cli GET bike:1 | grep 'Process 134' || exit 1 | ||
${{inputs.project}}-cli exists bike:1 | grep 1 || exit 1 | ||
${{inputs.project}}-cli exists bike:2 | grep 0 || exit 1 | ||
${{inputs.project}}-cli save | ||
# these are used in the case of symlinks in valkey packages | ||
if [ "${{inputs.project}}" -eq "valkey" ]; then | ||
redis-check-aof --version | ||
redis-check-rdb --version | ||
redis-sentinel --version | ||
redis-server --version | ||
fi | ||
${{inputs.project}}-check-rdb /tmp/dump.rdb | ||
${{inputs.project}}-sentinel --version | ||
${{inputs.project}}-server --version | ||
|
||
- runs: | | ||
${{inputs.project}}-server --version | grep "jemalloc" || exit 1 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've never seen such syntax before. Is there an example build of how this will be used? I.e. draft pr against wolfi with these pipelines added into ./pipelines/ directory to see this in action?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah @xnox I made a PR here that will use this pipeline once it is merged: wolfi-dev/os#30469