Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions bin/build-all
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,25 @@
# will fail due to an auth failure. Which means, you also need to be logged
# into that registry before you run it.

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

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

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

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

# Build the image(s)
./build

) done
popd >/dev/null
done

echo
echo "All done!"
2 changes: 1 addition & 1 deletion trusted-profiles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ TRUSTED_PROFILE_NAME=code-engine-cos-access
ibmcloud ce job create --name ${JOB_NAME} \
--build-source https://github.com/IBM/CodeEngine \
--build-context-dir trusted-profiles/${PROGRAMMING_LANGUAGE} \
--trusted-profiles-enabled true \
--trusted-profiles-enabled=true \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is interesting. Is it by intention?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it has to be there. Boolean flags require the = sign in the Go CLI libraries. Without it, it does not work.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aaah that I didn't know! Thanks for sharing

--env COS_REGION=${REGION} \
--env COS_BUCKET=${COS_BUCKET} \
--env TRUSTED_PROFILE_NAME=${TRUSTED_PROFILE_NAME}
Expand Down