-
Notifications
You must be signed in to change notification settings - Fork 32
tw: add pipelines/test/tw/contains-files #247
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
Conversation
e3ea1e0 to
6f7a799
Compare
|
I have a question, what if there are files more than one directory? do we have to have multiple contains-files test for that? |
yes, you can repeat the pipeline as much as you need. |
|
Suggestion: Add As you said Currently, testing files across multiple directories requires multiple test blocks. Consider adding a inputs:
files:
description: |
Exact file paths to check (space-separated).
When provided, ignores dir/name/type and checks these specific files.
Example: files: "/usr/bin/tool /usr/lib/lib.so /opt/app/binary"
required: falseThis would solve a common use case where we need to verify files across different directories: # Instead of:
- uses: test/contains-files
with:
dir: /usr/bin/
name: aws-eks-na-cli
- uses: test/contains-files
with:
dir: /usr/lib/
name: libre2.so
- uses: test/contains-files
with:
dir: /opt/app/
name: controller
# We could do:
- uses: test/contains-files
with:
files: "/usr/bin/aws-eks-na-cli /usr/lib/libre2.so /opt/app/controller"For better readability with many files, you could support multi-line YAML: - uses: test/contains-files
with:
files: |
/usr/bin/aws-eks-na-cli
/usr/lib/libre2.so
/opt/app/controller
/etc/config/app.conf |
6f7a799 to
68f34e6
Compare
|
Update that includes your suggestion. |
68f34e6 to
e7d0957
Compare
Add new pipeline to help us check that a given package contains some files. Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero@chainguard.dev>
e7d0957 to
b7ff2b7
Compare
debasishbsws
left a comment
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.
Nice
Add new pipeline to help us check that a given package contains some files.