diff --git a/.drone.yml b/.drone.yml index 1a948d1..fff9d49 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,17 +1,24 @@ kind: pipeline +name: openwrt type: docker -name: openwrt-builder-image platform: os: linux arch: arm64 - + +trigger: + branch: + - main + event: + include: + - push + steps: - - name: build - image: 'plugins/docker' - settings: - registry: 'http://cr.wks' - insecure: 'true' - experimental: 'true' - tags: ['latest'] - repo: 'cr.wks/debian-stable-openwrt-build' \ No newline at end of file +- name: openwrt + image: bitnami/git + commands: + - git clone -b openwrt-23.05 --single-branch https://github.com/openwrt/openwrt.git +- name: setup + image: cr.wks/debian-stable-openwrt:latest + commands: + - ls -la diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 47279a3..0000000 --- a/Dockerfile +++ /dev/null @@ -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 \ No newline at end of file diff --git a/build-dir825-rndis.yaml b/build-dir825-rndis.yaml deleted file mode 100644 index f8044f1..0000000 --- a/build-dir825-rndis.yaml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/openwrt-build-image.yaml b/openwrt-build-image.yaml deleted file mode 100644 index 3243bf2..0000000 --- a/openwrt-build-image.yaml +++ /dev/null @@ -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 \ No newline at end of file