test: copy the plugin in the run scripts
If called from within the source directory, i.e. the local plugin exists, copy those to the share directory so they can be picked up by the entry point scripts, in case the rpms are not found.
This commit is contained in:
parent
b74e440028
commit
d0216a7ef0
2 changed files with 22 additions and 0 deletions
|
|
@ -25,6 +25,17 @@ builder_start() {
|
|||
GATEWAY_IP=$(${CONTAINER_RUNTIME} network inspect org.osbuild.koji | jq -r ".[0].plugins[0].ipam.ranges[0][0].gateway")
|
||||
echo "Gateway IP is $GATEWAY_IP"
|
||||
|
||||
# maybe copy the 'builder' plugin to the share dir
|
||||
PLUGIN_NAME="builder"
|
||||
PLUGIN_PATH="plugins/${PLUGIN_NAME}"
|
||||
if [[ -f "${PLUGIN_PATH}/osbuild.py" ]]; then
|
||||
PLUGIN_DEST="${SHARE_DIR}/${PLUGIN_PATH}"
|
||||
|
||||
echo "[COPY] '${PLUGIN_NAME}' plugin to ${PLUGIN_DEST}"
|
||||
mkdir -p "${PLUGIN_DEST}"
|
||||
cp "${PLUGIN_PATH}/osbuild.py" "${PLUGIN_DEST}"
|
||||
fi
|
||||
|
||||
${CONTAINER_RUNTIME} run ${CONTAINER_FLAGS} \
|
||||
--name org.osbuild.koji.builder --network org.osbuild.koji \
|
||||
-v "${SHARE_DIR}:/share:z" \
|
||||
|
|
|
|||
|
|
@ -108,6 +108,17 @@ koji_start() {
|
|||
# koji data
|
||||
mkdir -p ${DATA_DIR}/koji/{packages,repos,work,scratch,repos-dist}
|
||||
|
||||
# maybe copy the 'hub' plugin to the share dir
|
||||
PLUGIN_NAME="hub"
|
||||
PLUGIN_PATH="plugins/${PLUGIN_NAME}"
|
||||
if [[ -f "${PLUGIN_PATH}/osbuild.py" ]]; then
|
||||
PLUGIN_DEST="${SHARE_DIR}/${PLUGIN_PATH}"
|
||||
|
||||
echo "[COPY] '${PLUGIN_NAME}' plugin to ${PLUGIN_DEST}"
|
||||
mkdir -p "${PLUGIN_DEST}"
|
||||
cp "${PLUGIN_PATH}/osbuild.py" "${PLUGIN_DEST}"
|
||||
fi
|
||||
|
||||
${CONTAINER_RUNTIME} run -d --name org.osbuild.koji.koji --network org.osbuild.koji \
|
||||
-v "${SHARE_DIR}:/share:z" \
|
||||
-v "${DATA_DIR}:/mnt:z" \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue