gitlab-ci
This commit is contained in:
1 parent
3b18ffaacc
commit
7b49174a7c
4 files changed
+5323
-3
No files matched your search
@@ -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
@@ -72,7 +72,9 @@ kernel() {
|
|||||||
check $? "Extract Linux Kernel"
|
check $? "Extract Linux Kernel"
|
||||||
cd linux-*
|
cd linux-*
|
||||||
printf "$UGREEN** Configuring Linux Kernel\n$RESET"
|
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"
|
check $? "Configure Linux Kernel"
|
||||||
printf "$UGREEN** Building Linux Kernel\n$RESET"
|
printf "$UGREEN** Building Linux Kernel\n$RESET"
|
||||||
make $makeflags &>> $fulllogfile
|
make $makeflags &>> $fulllogfile
|
||||||
@@ -197,10 +199,10 @@ rootfs() {
|
|||||||
cd busybox-*
|
cd busybox-*
|
||||||
cp -v $root/busybox/busybox-rootfs-config .config &>> $fulllogfile
|
cp -v $root/busybox/busybox-rootfs-config .config &>> $fulllogfile
|
||||||
printf "$UGREEN** Configuring busybox\n$RESET"
|
printf "$UGREEN** Configuring busybox\n$RESET"
|
||||||
make oldconfig &> $root/.log/busybox-configure.log
|
make oldconfig &> $fulllogfile
|
||||||
check $? "Configure busybox all logs in .log"
|
check $? "Configure busybox all logs in .log"
|
||||||
printf "$UGREEN** Building busybox\n$RESET"
|
printf "$UGREEN** Building busybox\n$RESET"
|
||||||
make $makeflags &> $root/.log/busybox-build.log
|
make $makeflags &> $fulllogfile
|
||||||
check $? "Build busybox all logs in .log"
|
check $? "Build busybox all logs in .log"
|
||||||
cp -v busybox $rootfspath/usr/bin &>> $fulllogfile
|
cp -v busybox $rootfspath/usr/bin &>> $fulllogfile
|
||||||
cd $rootfspath/usr/bin
|
cd $rootfspath/usr/bin
|
||||||
|
|||||||
@@ -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
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user