Skip to content

Commit 68c5c15

Browse files
committed
Exclude platforms-buildrunner.yaml from tests
1 parent 8ab3eac commit 68c5c15

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -389,16 +389,16 @@ In order to use secrets in buildrunner, you need to do the following:
389389
build:
390390
dockerfile: |
391391
FROM alpine:latest
392-
# Using secrets inline
392+
# Using secrets inline
393393
RUN --mount=type=secret,id=secret1 \
394394
--mount=type=secret,id=secret2 \
395-
echo "Using secrets in my build - secret1 file located at /run/secrets/secret1 with contents $(cat /run/secrets/secret1) and secret2=$(cat /run/secrets/secret2)"
395+
echo Using secrets in my build - secret1 file located at /run/secrets/secret1 with contents $(cat /run/secrets/secret1) and secret2=$(cat /run/secrets/secret2)
396396
# Using secrets in environment variables
397397
RUN --mount=type=secret,id=secret1 \
398398
--mount=type=secret,id=secret2 \
399399
SECRET1_FILE=/run/secrets/secret1 \
400400
SECRET2_VARIABLE=$(cat /run/secrets/secret2) \
401-
&& echo "Using secrets in my build - secret1 file located at $SECRET1_FILE with contents $(cat $SECRET1_FILE) and secret2=$SECRET2_VARIABLE"
401+
&& echo Using secrets in my build - secret1 file located at $SECRET1_FILE with contents $(cat $SECRET1_FILE) and secret2=$SECRET2_VARIABLE
402402
secrets:
403403
# Example of a secret that is a file
404404
- id=secret1,src=examples/build/secrets/secret1.txt

examples/build/secrets/buildrunner.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ steps:
1313
# Using secrets inline
1414
RUN --mount=type=secret,id=secret1 \
1515
--mount=type=secret,id=secret2 \
16-
echo "Using secrets in my build - secret1 file located at /run/secrets/secret1 with contents $(cat /run/secrets/secret1) and secret2=$(cat /run/secrets/secret2)"
16+
echo Using secrets in my build - secret1 file located at /run/secrets/secret1 with contents $(cat /run/secrets/secret1) and secret2=$(cat /run/secrets/secret2)
1717
# Using secrets in environment variables
1818
RUN --mount=type=secret,id=secret1 \
1919
--mount=type=secret,id=secret2 \
2020
SECRET1_FILE=/run/secrets/secret1 \
2121
SECRET2_VARIABLE=$(cat /run/secrets/secret2) \
22-
&& echo "Using secrets in my build - secret1 file located at $SECRET1_FILE with contents $(cat $SECRET1_FILE) and secret2=$SECRET2_VARIABLE"
22+
&& echo Using secrets in my build - secret1 file located at $SECRET1_FILE with contents $(cat $SECRET1_FILE) and secret2=$SECRET2_VARIABLE
2323
secrets:
2424
# Example of a secret that is a file
2525
- id=secret1,src=examples/build/secrets/secret1.txt

examples/build/secrets/platforms-buildrunner.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ steps:
1212
# Using secrets inline
1313
RUN --mount=type=secret,id=secret1 \
1414
--mount=type=secret,id=secret2 \
15-
echo "Using secrets in my build - secret1 file located at /run/secrets/secret1 with contents $(cat /run/secrets/secret1) and secret2=$(cat /run/secrets/secret2)"
15+
echo Using secrets in my build - secret1 file located at /run/secrets/secret1 with contents $(cat /run/secrets/secret1) and secret2=$(cat /run/secrets/secret2)
1616
# Using secrets in environment variables
1717
RUN --mount=type=secret,id=secret1 \
1818
--mount=type=secret,id=secret2 \
1919
SECRET1_FILE=/run/secrets/secret1 \
2020
SECRET2_VARIABLE=$(cat /run/secrets/secret2) \
21-
&& echo "Using secrets in my build - secret1 file located at $SECRET1_FILE with contents $(cat $SECRET1_FILE) and secret2=$SECRET2_VARIABLE"
21+
&& echo Using secrets in my build - secret1 file located at $SECRET1_FILE with contents $(cat $SECRET1_FILE) and secret2=$SECRET2_VARIABLE
2222
secrets:
2323
# Example of a secret that is a file
2424
- id=secret1,src=examples/build/secrets/secret1.txt
2525
# Example of a secret that is an environment variable
2626
- id=secret2,env=SECRET2
2727
platforms:
2828
- linux/amd64
29-
- linux/arm64/v8
29+
- linux/arm64

tests/test_buildrunner_files.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ def _get_example_runs(test_dir: str) -> List[Tuple[str, str, Optional[List[str]]
124124
excluded_example_files = [
125125
"examples/build/import/buildrunner.yaml",
126126
"examples/run/caches/buildrunner.yaml",
127+
# This file is not supported in the github actions runner
128+
"examples/build/secrets/platforms-buildrunner.yaml",
127129
]
128130

129131
# Walk through the examples directory and find all files ending with buildrunner.yaml

0 commit comments

Comments
 (0)