forked from pool/rmt-server-image
Accepting request 1219938 from devel:BCI:Tumbleweed
🤖: sync package with devel:BCI:Tumbleweed from OBS OBS-URL: https://build.opensuse.org/request/show/1219938 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rmt-server-image?expand=0&rev=27
This commit is contained in:
commit
cb8785ee81
@ -22,7 +22,7 @@
|
|||||||
FROM opensuse/tumbleweed:latest
|
FROM opensuse/tumbleweed:latest
|
||||||
|
|
||||||
RUN set -euo pipefail; \
|
RUN set -euo pipefail; \
|
||||||
zypper -n install --no-recommends rmt-server catatonit; \
|
zypper -n install --no-recommends rmt-server catatonit bash; \
|
||||||
zypper -n clean; \
|
zypper -n clean; \
|
||||||
rm -rf {/target,}/var/log/{alternatives.log,lastlog,tallylog,zypper.log,zypp/history,YaST2}
|
rm -rf {/target,}/var/log/{alternatives.log,lastlog,tallylog,zypper.log,zypp/history,YaST2}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# PV could be empty, make sure the directories exist
|
# PV could be empty, make sure the directories exist
|
||||||
@ -23,30 +23,46 @@ MYSQL_USER="${MYSQL_USER:-rmt}"
|
|||||||
SCC_SYNC="${SCC_SYNC:-true}"
|
SCC_SYNC="${SCC_SYNC:-true}"
|
||||||
|
|
||||||
# Create adjusted /etc/rmt.conf
|
# Create adjusted /etc/rmt.conf
|
||||||
echo -e "database:\n host: ${MYSQL_HOST}\n database: ${MYSQL_DATABASE}\n username: ${MYSQL_USER}\n password: ${MYSQL_PASSWORD}" > /etc/rmt.conf
|
cat > /etc/rmt.conf <<EOF
|
||||||
echo -e " adapter: mysql2\n encoding: utf8\n timeout: 5000\n pool: 5\n" >> /etc/rmt.conf
|
database:
|
||||||
echo -e "scc:\n username: ${SCC_USERNAME}\n password: ${SCC_PASSWORD}\n sync_systems: true\n scc_sync: ${SCC_SYNC}\n" >> /etc/rmt.conf
|
host: ${MYSQL_HOST}
|
||||||
echo -e "log_level:\n rails: debug" >> /etc/rmt.conf
|
database: ${MYSQL_DATABASE}
|
||||||
|
username: ${MYSQL_USER}
|
||||||
|
password: ${MYSQL_PASSWORD}
|
||||||
|
adapter: mysql2
|
||||||
|
encoding: utf8
|
||||||
|
timeout: 5000
|
||||||
|
pool: 5
|
||||||
|
|
||||||
|
scc:
|
||||||
|
username: ${SCC_USERNAME}
|
||||||
|
password: ${SCC_PASSWORD}
|
||||||
|
sync_systems: true
|
||||||
|
scc_sync: ${SCC_SYNC}
|
||||||
|
|
||||||
|
log_level:
|
||||||
|
rails: debug
|
||||||
|
EOF
|
||||||
|
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
set -- /usr/share/rmt/bin/rails server -e production
|
set -- /usr/share/rmt/bin/rails server -e production
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" == "/usr/share/rmt/bin/rails" -a "$2" == "server" ]; then
|
if [ "$1" = "/usr/share/rmt/bin/rails" ] && [ "$2" = "server" ]; then
|
||||||
echo "Create/migrate SUSE RMT database"
|
echo "Create/migrate SUSE RMT database"
|
||||||
pushd /usr/share/rmt > /dev/null
|
pushd /usr/share/rmt > /dev/null
|
||||||
/usr/share/rmt/bin/rails db:create db:migrate RAILS_ENV=production
|
/usr/share/rmt/bin/rails db:create db:migrate RAILS_ENV=production
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
if [ ${SCC_SYNC} == "true" ]; then
|
if [ "${SCC_SYNC}" = "true" ]; then
|
||||||
echo "Syncing product list"
|
echo "Syncing product list"
|
||||||
rmt-cli sync
|
rmt-cli sync
|
||||||
for PRODUCT in $SCC_PRODUCT_ENABLE
|
for PRODUCT in $SCC_PRODUCT_ENABLE
|
||||||
do
|
do
|
||||||
rmt-cli products enable $PRODUCT
|
rmt-cli products enable "$PRODUCT"
|
||||||
done
|
done
|
||||||
for PRODUCT in $SCC_PRODUCT_DISABLE
|
for PRODUCT in $SCC_PRODUCT_DISABLE
|
||||||
do
|
do
|
||||||
rmt-cli products disable $PRODUCT
|
rmt-cli products disable "$PRODUCT"
|
||||||
done
|
done
|
||||||
rmt-cli repos clean
|
rmt-cli repos clean
|
||||||
fi
|
fi
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Oct 31 16:24:36 UTC 2024 - SUSE Update Bot <bci-internal@suse.de>
|
||||||
|
|
||||||
|
- entry point refactoring
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Oct 30 15:34:45 UTC 2024 - SUSE Update Bot <bci-internal@suse.de>
|
Wed Oct 30 15:34:45 UTC 2024 - SUSE Update Bot <bci-internal@suse.de>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user