mirror of
https://github.com/xcp-ng/xcp.git
synced 2026-10-11 22:29:52 +00:00
Modification on the script gen-iso.sh to take into account the renaming of the file create-install-iso.sh into scripts/create-iso.sh We need to merge this at the same time or Jenkins won't be able to generate iso. Signed-off-by: Gael Duperrey <[email protected]>
52 lines
1.6 KiB
Bash
Executable File
52 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -ueE
|
|
|
|
usage()
|
|
{
|
|
echo "----------------------------------------------------------------------------------------"
|
|
echo "- The purpose of this script is to be executed inside the container of our development environment to generate ISO files for XCP-ng."
|
|
echo "- Usage: $0 <XCP-ng version> <REPOSITORY>"
|
|
echo "- All options are mandatory."
|
|
echo "- VERSION of XCP-ng: 8.2 or 8.3"
|
|
echo "- REPOSITORY: update, testing, ci, ..."
|
|
echo "- Example: $0 8.3 testing"
|
|
echo "----------------------------------------------------------------------------------------"
|
|
}
|
|
|
|
if [ $# -lt 2 ]; then
|
|
echo "Missing argument(s)"
|
|
echo
|
|
usage
|
|
exit 1
|
|
fi
|
|
|
|
VERSION="$1"
|
|
|
|
if [ "$VERSION" != "8.3" ] && [ "$VERSION" != "8.2" ]; then
|
|
echo "Unsupported version. Please choose between 8.2 and 8.3."
|
|
exit
|
|
fi
|
|
|
|
REPOSITORY="$2"
|
|
|
|
THEDATE=$(date +%Y%m%d)
|
|
|
|
set -x
|
|
|
|
NAMEIMG="install-${VERSION}-${REPOSITORY}.img"
|
|
NAMEISO="xcp-ng-${VERSION}-${REPOSITORY}-nightly-${THEDATE}.iso"
|
|
NAMEISONI="xcp-ng-${VERSION}-${REPOSITORY}-netinstall-nightly-${THEDATE}.iso"
|
|
|
|
MNTVOL="XCP-ng ${VERSION} ${REPOSITORY} ${THEDATE}"
|
|
|
|
sudo yum install -y genisoimage syslinux grub-tools createrepo_c libfaketime
|
|
|
|
cd /data
|
|
|
|
sudo ./scripts/create-installimg.sh --srcurl "https://updates.xcp-ng.org/8/${VERSION}" -o "${NAMEIMG}" "${VERSION}":"${REPOSITORY}"
|
|
|
|
./scripts/create-iso.sh --netinstall --srcurl "https://updates.xcp-ng.org/8/${VERSION}" -V "${MNTVOL}" -o "${NAMEISONI}" "${VERSION}":"${REPOSITORY}" "${NAMEIMG}"
|
|
|
|
./scripts/create-iso.sh --srcurl "https://updates.xcp-ng.org/8/${VERSION}" -V "${MNTVOL}" -o "${NAMEISO}" "${VERSION}":"${REPOSITORY}" "${NAMEIMG}"
|