Skip to content

Commit df24eb2

Browse files
Also build nested directories in build-all
Signed-off-by: Sascha Schwarze <[email protected]>
1 parent b166349 commit df24eb2

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

Diff for: bin/build-all

+14-9
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,25 @@
77
# will fail due to an auth failure. Which means, you also need to be logged
88
# into that registry before you run it.
99

10-
cd $(dirname $0)/..
10+
set -euo pipefail
1111

12-
set -e
13-
for file in */build ; do (
12+
REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd)"
1413

15-
echo -e "\n### `dirname $file`\n"
16-
cd `dirname $file`
14+
find "${REPO_DIR}" -maxdepth 3 -type f -executable -name build | while read -r buildFile; do
15+
sampleDir="$(dirname "${buildFile}")"
16+
echo
17+
echo "### ${sampleDir}"
18+
if [ -f "${sampleDir}/.SKIP" ]; then
19+
echo "SKIPPING"
20+
continue
21+
fi
1722

18-
# Skip this dir
19-
[[ -e .SKIP ]] && echo "SKIPPING `dirname $file`" && continue
23+
pushd "${sampleDir}" >/dev/null
2024

21-
# Build the image(s)
2225
./build
2326

24-
) done
27+
popd >/dev/null
28+
done
2529

30+
echo
2631
echo "All done!"

Diff for: trusted-profiles/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ TRUSTED_PROFILE_NAME=code-engine-cos-access
141141
ibmcloud ce job create --name ${JOB_NAME} \
142142
--build-source https://github.com/IBM/CodeEngine \
143143
--build-context-dir trusted-profiles/${PROGRAMMING_LANGUAGE} \
144-
--trusted-profiles-enabled true \
144+
--trusted-profiles-enabled=true \
145145
--env COS_REGION=${REGION} \
146146
--env COS_BUCKET=${COS_BUCKET} \
147147
--env TRUSTED_PROFILE_NAME=${TRUSTED_PROFILE_NAME}

0 commit comments

Comments
 (0)