gitlab-ci

This commit is contained in:
wt
2024-08-22 14:36:01 +07:00
parent 3b18ffaacc
commit 7b49174a7c
4 changed files with 5323 additions and 3 deletions
+36
View File
@@ -0,0 +1,36 @@
image: ubuntu:18.04
stages:
- build
# needed environment variables
variables:
IMAGE_NAME: SimpleLinux
IMAGE_VERSION: 0.0.1
build-wimic-image:
stage: build
artifacts:
# artifacts archive name
name: "$IMAGE_NAME-$IMAGE_VERSION-$CI_COMMIT_BRANCH-$CI_PIPELINE_ID"
# artifacts path
paths:
- artifacts
# update environments and install needed packages
before_script:
- echo "Hello, $GITLAB_USER_LOGIN"
- ./install_deps.sh
- uname -a
# script for building artifacts
script:
- ./build-image.sh
# installing artifacts to artifacts directory
after_script:
- rm -rvf artifacts
- mkdir -v artifacts
- cp -v build/SimpleLinux.iso artifacts/$IMAGE_NAME-$IMAGE_VERSION-$CI_COMMIT_BRANCH-$CI_PIPELINE_ID.iso
+5 -3
View File
@@ -72,7 +72,9 @@ kernel() {
check $? "Extract Linux Kernel"
cd linux-*
printf "$UGREEN** Configuring Linux Kernel\n$RESET"
make defconfig &>> $fulllogfile
make mrproper &>> $fulllogfile
cp -v $root/kernel/config-6.7.4 .config
make oldconfig
check $? "Configure Linux Kernel"
printf "$UGREEN** Building Linux Kernel\n$RESET"
make $makeflags &>> $fulllogfile
@@ -197,10 +199,10 @@ rootfs() {
cd busybox-*
cp -v $root/busybox/busybox-rootfs-config .config &>> $fulllogfile
printf "$UGREEN** Configuring busybox\n$RESET"
make oldconfig &> $root/.log/busybox-configure.log
make oldconfig &> $fulllogfile
check $? "Configure busybox all logs in .log"
printf "$UGREEN** Building busybox\n$RESET"
make $makeflags &> $root/.log/busybox-build.log
make $makeflags &> $fulllogfile
check $? "Build busybox all logs in .log"
cp -v busybox $rootfspath/usr/bin &>> $fulllogfile
cd $rootfspath/usr/bin
+19
View File
@@ -0,0 +1,19 @@
#!/bin/sh
#---- System update ----
apt update -qq &&
apt upgrade -y -qq &&
#-----------------------
#-------------- Nodejs ---------------------------------------------
apt install -y curl
# curl -sL https://deb.nodesource.com/setup_6.x | bash - &&
apt install -y --force-yes -qq build-essential make cmake u-boot-tools bc file &&
#-------------------------------------------------------------------
#----------- Toolchains --------------------------------------------
mkdir -p /opt/toolchains /var/www/html &&
cd /opt/toolchains &&
tar -xf ${OLDPWD}/toolchains/x86_64-buildroot-linux-uclibc-gcc.tar.gz &&
cd $OLDPWD
#-------------------------------------------------------------------
+5263
View File
File diff suppressed because it is too large Load Diff