Compare commits

...

5 Commits

Author SHA1 Message Date
316293ed95
dirty temporary fix
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2023-05-13 20:43:10 +02:00
4ebb1b9a1f
changed registry and updated drone pipeline format
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/tag Build is failing
2023-05-13 20:15:04 +02:00
4d8a9cf78d
fix warning on ISO build
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2020-03-02 00:17:21 +01:00
9dbb80b3ad
upgrade to nethserver 7.7
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2020-03-01 15:15:10 +01:00
9dbe9d74c6
migration to centos base image
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2020-02-29 16:23:26 +01:00
4 changed files with 32 additions and 24 deletions

View File

@ -1,4 +1,5 @@
kind: pipeline
type: docker
name: default
steps:
@ -8,7 +9,7 @@ steps:
settings:
daemon_off: false
dry_run: true
repo: registry.libreschool.org/libreschool-automation/libreschool-iso-builder
repo: git.libreschool.org/libreschool-automation/libreschool-iso-builder
tags:
- latest
when:
@ -21,14 +22,15 @@ steps:
pull: always
settings:
daemon_off: false
password:
from_secret: docker_password
registry: registry.libreschool.org
repo: registry.libreschool.org/libreschool-automation/libreschool-iso-builder
tags:
- latest
force_tag: true
registry: git.libreschool.org
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: git.libreschool.org/libreschool-automation/libreschool-iso-builder
tags:
- latest
when:
event:
- tag

View File

@ -1,7 +1,11 @@
FROM debian:stable
FROM centos:7
RUN apt-get update && \
apt-get install -y curl wget p7zip-full createrepo genisoimage syslinux-utils isomd5sum cpio
RUN yum install -y epel-release && \
yum localinstall -y http://mirror.nethserver.org/nethserver/7/base/x86_64/Packages/nethserver-release-7-19.ns7.noarch.rpm && \
yum localinstall -y https://repo.libreschool.org/nethserver/7/base/x86_64/Packages/libreschool-release-1.0-1.noarch.rpm && \
sed -i 's/^gpgcheck.*/gpgcheck=0/' /etc/yum.repos.d/LibreSchool.repo && \
sed -i 's/^repo_gpgcheck.*/repo_gpgcheck=0/' /etc/yum.repos.d/LibreSchool.repo && \
yum install -y curl wget p7zip p7zip-plugins createrepo genisoimage syslinux isomd5sum cpio
ADD run.sh /usr/local/bin
RUN chmod 755 /usr/local/bin/run.sh

View File

@ -2,12 +2,11 @@
[![Build Status](https://drone.libreschool.org/api/badges/libreschool-automation/libreschool-iso-builder/status.svg)](https://drone.libreschool.org/libreschool-automation/libreschool-iso-builder)
Debian docker image with some packages preinstalled and a script to correctly
Centos 7 docker image with some packages preinstalled and a script to correctly
package the LibreSchool ISO
## Build
```
```bash
docker build . -t libreschool-automation/libreschool-iso-builder:latest
```

25
run.sh
View File

@ -2,7 +2,7 @@
set -e
PLUGIN_SOURCE_ISO_URL=${PLUGIN_SOURCE_ISO_URL:-"http://downloads.sourceforge.net/project/nethserver/nethserver-7.6.1810-x86_64.iso"}
PLUGIN_SOURCE_ISO_URL=${PLUGIN_SOURCE_ISO_URL:-"http://downloads.sourceforge.net/project/nethserver/nethserver-7.7.1908-x86_64.iso"}
PLUGIN_OUTPUT_ISO=${PLUGIN_OUTPUT_ISO:-"output.iso"}
echo "+ PWD: $PWD"
@ -13,6 +13,11 @@ if [ ! -r /source.iso ] ; then
wget -qO/source.iso "$PLUGIN_SOURCE_ISO_URL" || exit 1
fi
if [ ! -r /drone/src/packages.list ] ; then
echo "! missing packages.list"
exit 1
fi
mkdir /src
echo "+ Extracting source ISO"
7z x -o/src -bd /source.iso || exit 1
@ -21,21 +26,19 @@ echo "+ Removing all TRANS.TBL files"
find /src -name TRANS.TBL -delete
echo "+ Adding custom files from 'root'"
cp -vr /drone/src/root/* /src/
cp -vfr /drone/src/root/* /src/
echo "+ Adding GPG signing key"
curl -s "http://repo.libreschool.org/nethserver/RPM-GPG-KEY-LibreSchool" > /src/RPM-GPG-KEY-LibreSchool
rpm --import /src/RPM-GPG-KEY-LibreSchool
echo "+ Adding custom packages"
if [ ! -r /drone/src/packages.list ] ; then
echo "! missing packages.list"
exit 1
fi
# TODO: find a way to remove packages already on ISO
mkdir -p /src/libreschool /drone/src/package_cache
cd /drone/src/package_cache
rm /drone/src/wget.log
wget -ci /drone/src/packages.list -o /drone/src/wget.log || ( echo "! cannot download all packages." ; exit 1 )
cp *.rpm /src/libreschool
cat /drone/src/packages.list | xargs yum install --downloaddir=/drone/src/package_cache --downloadonly && \
cat /drone/src/packages.list | xargs yumdownloader --destdir=/drone/src/package_cache --downloadonly --archlist=x86_64 \
|| ( echo "! cannot download all packages." ; exit 1 )
cp /drone/src/package_cache/*.rpm /src/libreschool
cd /src/libreschool
if [ -r comps.xml ] ; then
@ -63,4 +66,4 @@ implantisomd5 /output.iso
echo "+ Renaming file"
mv /output.iso "/drone/src/$PLUGIN_OUTPUT_ISO"
echo "+ Done"
echo "+ Done"