Compare commits
14 Commits
4689482c6c
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 1a88160855 | |||
| 3e10d60cdd | |||
| 2abe77794c | |||
| 1e086f8c27 | |||
| 492606d913 | |||
| 1b2455357a | |||
| 9d2dc556a1 | |||
| 72ba57a47b | |||
| b9ac625404 | |||
| 417593b8f0 | |||
| 940405ee69 | |||
| 914dd81c81 | |||
| bce584d6d8 | |||
| 78857d67b6 |
61
.drone.yml
61
.drone.yml
@@ -1,18 +1,57 @@
|
|||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
name: openwrt
|
||||||
type: docker
|
type: docker
|
||||||
name: openwrt-builder-image
|
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
os: linux
|
os: linux
|
||||||
arch: arm64
|
arch: arm64
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
event:
|
||||||
|
include:
|
||||||
|
- push
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: openwrt
|
||||||
image: 'plugins/docker'
|
image: bitnami/git
|
||||||
settings:
|
commands:
|
||||||
registry: 'http://cr.wks'
|
- git clone -b openwrt-23.05 --single-branch http://gitea.service.nr5/mirrors/openwrt.git
|
||||||
insecure: 'true'
|
- name: setup
|
||||||
experimental: 'true'
|
image: cr.wks/debian-stable-openwrt:latest
|
||||||
tags: ['latest']
|
commands:
|
||||||
repo: 'cr.wks/debian-stable-openwrt-build
|
- ls -la
|
||||||
|
- cp -v config-DIR825-rndis openwrt/.config
|
||||||
|
- name: feeds
|
||||||
|
image: cr.wks/debian-stable-openwrt:latest
|
||||||
|
commands:
|
||||||
|
- cd openwrt
|
||||||
|
- ./scripts/feeds update -a
|
||||||
|
- ./scripts/feeds install -a
|
||||||
|
- name: make-prepare
|
||||||
|
image: cr.wks/debian-stable-openwrt:latest
|
||||||
|
commands:
|
||||||
|
- cd openwrt
|
||||||
|
- make -j2 defconfig
|
||||||
|
- make -j2 download
|
||||||
|
- make -j2 clean
|
||||||
|
- name: make-world
|
||||||
|
image: cr.wks/debian-stable-openwrt:latest
|
||||||
|
commands:
|
||||||
|
- cd openwrt
|
||||||
|
- export FORCE_UNSAFE_CONFIGURE=1
|
||||||
|
- make -j2 world
|
||||||
|
- name: deploy
|
||||||
|
image: cr.wks/drone/drone-rsync:latest
|
||||||
|
settings:
|
||||||
|
hosts: ["ebin01.wks"]
|
||||||
|
source: openwrt/bin/
|
||||||
|
target: /data/raid1-ssd/app-data/openwrt/
|
||||||
|
user: admini
|
||||||
|
#exclude: ['sites/default', 'files/kmm', 'files/tmp', '.git*', '*drone.yml', '.settings', '.buildpath', '.editorconfig', '.project']
|
||||||
|
args: '-v --delete'
|
||||||
|
log_level: quiet
|
||||||
|
key:
|
||||||
|
from_secret: admini-ebin01-ssh-rsa
|
||||||
|
command_timeout: 15m
|
||||||
|
|||||||
18
Dockerfile
18
Dockerfile
@@ -1,18 +0,0 @@
|
|||||||
FROM docker.io/openjdk:jdk-buster
|
|
||||||
|
|
||||||
RUN sed -i 's@deb.debian.org@apt-cache.service.nr5/deb.debian.org@g' /etc/apt/sources.list; \
|
|
||||||
sed -i 's@security.debian.org@apt-cache.service.nr5/security.debian.org@g' /etc/apt/sources.list; \
|
|
||||||
apt update -y; \
|
|
||||||
apt install -y build-essential ccache ecj fastjar file g++ gawk \
|
|
||||||
gettext git java-propose-classpath libelf-dev libncurses5-dev \
|
|
||||||
libncursesw5-dev libssl-dev python python2.7-dev python3 unzip wget \
|
|
||||||
python3-distutils python3-setuptools rsync subversion swig time \
|
|
||||||
xsltproc zlib1g-dev make distcc distcc-pump nfs-common; \
|
|
||||||
apt-get remove --purge -y exim* && \
|
|
||||||
apt-get autoremove --purge -y && \
|
|
||||||
apt-get clean -y && \
|
|
||||||
rm -rf /var/lib/apt/lists/* && \
|
|
||||||
rm -rf /var/cache/apt/* && \
|
|
||||||
ln -sv /usr/lib/distcc-pump/lib/python3.7/site-packages/include_server /usr/lib/distcc-pump/include_server && \
|
|
||||||
rm -v /etc/distcc/hosts && \
|
|
||||||
sed -i s/NEED_STATD=$/NEED_STATD=yes/i /etc/default/nfs-common
|
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
# Built in Drone
|
||||||
|
|
||||||
|
|
||||||
# OpenWRT
|
# OpenWRT
|
||||||
|
|
||||||
* Building: https://openwrt.org/docs/guide-developer/toolchain/use-buildsystem
|
* Building: https://openwrt.org/docs/guide-developer/toolchain/use-buildsystem
|
||||||
@@ -12,4 +15,4 @@
|
|||||||
# PogoPlug Pro with 'Qualcomm Atheros AR9462 Wireless Network Adapter'
|
# PogoPlug Pro with 'Qualcomm Atheros AR9462 Wireless Network Adapter'
|
||||||
|
|
||||||
* needs: ATH9K_SUPPORT_PCOEM - in https://openwrt.org/packages/pkgdata/kmod-ath9k
|
* needs: ATH9K_SUPPORT_PCOEM - in https://openwrt.org/packages/pkgdata/kmod-ath9k
|
||||||
`Kernel Modules -> Wireless Drivers -> {*} kmod-ath9k`
|
`Kernel Modules -> Wireless Drivers -> {*} kmod-ath9k`
|
||||||
|
|||||||
@@ -1,131 +0,0 @@
|
|||||||
apiVersion: tekton.dev/v1alpha1
|
|
||||||
kind: PipelineResource
|
|
||||||
metadata:
|
|
||||||
name: openwrt-configs-git
|
|
||||||
spec:
|
|
||||||
type: git
|
|
||||||
params:
|
|
||||||
- name: revision
|
|
||||||
value: master
|
|
||||||
- name: url
|
|
||||||
value: http://git-ui.lan/chaos/openwrt-configs.git
|
|
||||||
---
|
|
||||||
apiVersion: tekton.dev/v1beta1
|
|
||||||
kind: Task
|
|
||||||
metadata:
|
|
||||||
name: build-openwrt
|
|
||||||
spec:
|
|
||||||
params:
|
|
||||||
- name: make_flags
|
|
||||||
type: string
|
|
||||||
default: ""
|
|
||||||
- name: config
|
|
||||||
type: string
|
|
||||||
- name: version
|
|
||||||
type: string
|
|
||||||
default: ""
|
|
||||||
resources:
|
|
||||||
inputs:
|
|
||||||
- name: openwrt-configs
|
|
||||||
type: git
|
|
||||||
workspaces:
|
|
||||||
- name: tmp
|
|
||||||
mountPath: /usr/src/openwrt/tmp
|
|
||||||
steps:
|
|
||||||
- name: openwrt-get
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
memory: 128M
|
|
||||||
cpu: 200m
|
|
||||||
limits:
|
|
||||||
memory: 300M
|
|
||||||
cpu: 800m
|
|
||||||
image: cr.lan/debian-stable-openwrt-build
|
|
||||||
script: |
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
if [ ! -d /usr/src/openwrt ]; then
|
|
||||||
git clone https://github.com/openwrt/openwrt.git /usr/src/openwrt
|
|
||||||
fi
|
|
||||||
cd /usr/src/openwrt
|
|
||||||
echo "O_VERS: $(params.version)"
|
|
||||||
git branch -l
|
|
||||||
git checkout $(params.version) || exit 1
|
|
||||||
git pull
|
|
||||||
- name: build-openwrt
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
memory: 500m
|
|
||||||
cpu: 500m
|
|
||||||
limits:
|
|
||||||
memory: 1Gi
|
|
||||||
cpu: 3000m
|
|
||||||
image: cr.lan/debian-stable-openwrt-build
|
|
||||||
script: |
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
echo $PATH
|
|
||||||
cd /usr/src/openwrt
|
|
||||||
CCACHE_DIR=$(echo staging_dir/target-*)/ccache ccache -s
|
|
||||||
ls -la .
|
|
||||||
export FORCE_UNSAFE_CONFIGURE=1
|
|
||||||
export IGNORE_ERRORS=1
|
|
||||||
### cleanup
|
|
||||||
#make clean
|
|
||||||
#./scripts/feeds clean -a
|
|
||||||
#### /cleanup
|
|
||||||
echo "res.input.ke...path: $(resources.inputs.openwrt-configs.path)"
|
|
||||||
cp -v $(resources.inputs.openwrt-configs.path)/$(params.config) \
|
|
||||||
/usr/src/openwrt/.config || exit 1
|
|
||||||
./scripts/feeds update -a
|
|
||||||
./scripts/feeds install -a -f
|
|
||||||
# build env does not like to be run as root....
|
|
||||||
|
|
||||||
make V=s -j4 download world $(params.make_flags) 2>&1
|
|
||||||
- name: upload-assets
|
|
||||||
image: docker.io/minio/mc
|
|
||||||
env:
|
|
||||||
- name: MINIO_HOST
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: minio-openwrt
|
|
||||||
key: endpoint
|
|
||||||
- name: MINIO_ACCESS_KEY
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: minio-openwrt
|
|
||||||
key: username
|
|
||||||
- name: MINIO_SECRET_KEY
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: minio-openwrt
|
|
||||||
key: password
|
|
||||||
script: |
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
cd /usr/src/openwrt/bin
|
|
||||||
mc alias set minio-openwrt $MINIO_HOST $MINIO_ACCESS_KEY $MINIO_SECRET_KEY
|
|
||||||
mc mirror --remove --insecure -a . minio-openwrt/openwrt
|
|
||||||
workspaces:
|
|
||||||
- name: usr-src
|
|
||||||
mountPath: /usr/src
|
|
||||||
---
|
|
||||||
apiVersion: tekton.dev/v1beta1
|
|
||||||
kind: TaskRun
|
|
||||||
metadata:
|
|
||||||
name: openwrt-dir825-rndis
|
|
||||||
spec:
|
|
||||||
taskRef:
|
|
||||||
name: build-openwrt
|
|
||||||
params:
|
|
||||||
- name: config
|
|
||||||
value: config-DIR825-rndis
|
|
||||||
- name: version
|
|
||||||
value: openwrt-21.02
|
|
||||||
resources:
|
|
||||||
inputs:
|
|
||||||
- name: openwrt-configs
|
|
||||||
resourceRef:
|
|
||||||
name: openwrt-configs-git
|
|
||||||
workspaces:
|
|
||||||
- name: usr-src
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: tektoncd-workspaces
|
|
||||||
subPath: usr_src
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
apiVersion: tekton.dev/v1beta1
|
|
||||||
kind: PipelineRun
|
|
||||||
metadata:
|
|
||||||
name: img-debian-stable-openwrt-build
|
|
||||||
spec:
|
|
||||||
pipelineRef:
|
|
||||||
name: kaniko-pipeline
|
|
||||||
params:
|
|
||||||
- name: git-url
|
|
||||||
value: http://git-ui.lan/chaos/openwrt-configs.git
|
|
||||||
- name: git-revision
|
|
||||||
value: master
|
|
||||||
- name: path-to-image-context
|
|
||||||
value: ./
|
|
||||||
- name: path-to-dockerfile
|
|
||||||
value: Dockerfile
|
|
||||||
- name: image-name
|
|
||||||
value: cr.lan/debian-stable-openwrt-build
|
|
||||||
workspaces:
|
|
||||||
- name: git-source
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: tektoncd-workspaces
|
|
||||||
subPath: tekton/debian-stable-openwrt-build
|
|
||||||
Reference in New Issue
Block a user