Skip to content

Commit

Permalink
Align all configuration to use external packages
Browse files Browse the repository at this point in the history
  • Loading branch information
ayufan committed Jul 5, 2018
1 parent a20acd5 commit 801fd41
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 70 deletions.
69 changes: 1 addition & 68 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,38 +37,6 @@ node('docker && linux-build') {
'''
}

stage('Sources') {
sh '''#!/bin/bash
set -xe
export HOME=$WORKSPACE
export USER=jenkins
repo init -u https://github.com/ayufan-rock64/linux-manifests -b default --depth=1 --no-clone-bundle
repo sync -j 20 -c --force-sync
'''
}

stage('U-boot') {
sh '''#!/bin/bash
set -xe
export CCACHE_DIR=$WORKSPACE/ccache
for i in $BOARD_TARGETs; do
make u-boot-build BOARD_TARGET=$i
done
'''
}

stage('Kernel') {
sh '''#!/bin/bash
set -xe
export CCACHE_DIR=$WORKSPACE/ccache
for i in $BOARD_TARGETs; do
make kernel-build KERNEL_DIR=kernel BOARD_TARGET=$i
done
'''
}

stage('Images') {
sh '''#!/bin/bash
set -xe
Expand All @@ -87,41 +55,6 @@ node('docker && linux-build') {
"GITHUB_USER=$GITHUB_USER",
"GITHUB_REPO=$GITHUB_REPO"
]) {
stage('Freeze') {
sh '''#!/bin/bash
# use -ve, otherwise we could leak GITHUB_TOKEN...
set -ve
shopt -s nullglob
export HOME=$WORKSPACE
export USER=jenkins
repo manifest -r -o manifest.xml
'''
}

stage('Tagging') {
sh '''#!/bin/bash
# use -ve, otherwise we could leak GITHUB_TOKEN...
set -ve
repo forall -g tagged -e -c git tag "$GITHUB_USER/$GITHUB_REPO/$VERSION"
'''

if (params.GITHUB_UPLOAD) {
retry(2) {
sh '''#!/bin/bash
# use -ve, otherwise we could leak GITHUB_TOKEN...
set -ve
echo "machine github.com login user password $GITHUB_TOKEN" > ~/.netrc
repo forall -g tagged -e -c git push ayufan "$GITHUB_USER/$GITHUB_REPO/$VERSION" -f
rm ~/.netrc
'''
}
} else {
echo 'Flagged as an no tagging release job'
}
}

stage('Release') {
if (params.GITHUB_UPLOAD) {
sh '''#!/bin/bash
Expand All @@ -139,7 +72,7 @@ node('docker && linux-build') {
--name "manifest.xml" \
--file "manifest.xml"
for file in *.xz *.deb; do
for file in *.xz; do
github-release upload \
--tag "${VERSION}" \
--name "$(basename "$file")" \
Expand Down
2 changes: 1 addition & 1 deletion recipes/release-contents.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Every build contains the following files available for download:
* U-boot flash and erase images (since `0.6.10`)
* Source code for all build scripts

Let's focus on the Debian package `linux-rock64-package-0.x.x_all.deb`, whose contents can be [found here](https://github.com/ayufan-rock64/linux-build/tree/master/package/root).
Let's focus on the Debian package `linux-rock64-package-0.x.x_all.deb`, whose contents can be [found here](https://github.com/ayufan-rock64/linux-package).

This package is installed on all builds. It's essentially the _"custom"_ stuff added to each base OS.

Expand Down
3 changes: 2 additions & 1 deletion rootfs/make_rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ do_chroot apt-get -y install dosfstools curl xz-utils iw rfkill wpasupplicant op
nano git build-essential vim jq wget ca-certificates software-properties-common dirmngr \
gdisk parted figlet htop fake-hwclock usbutils sysstat fping iperf3 iozone3 ntp \
network-manager psmisc u-boot-tools ifupdown resolvconf \
net-tools mtd-utils rsync device-tree-compiler debsums pciutils
net-tools mtd-utils rsync device-tree-compiler debsums pciutils \
linux-${MODEL}

if [[ "$DISTRIB" == "debian" ]]; then
do_chroot apt-get -y install firmware-realtek
Expand Down

0 comments on commit 801fd41

Please sign in to comment.