diff --git a/build-oxnas820.yaml b/build-oxnas820.yaml new file mode 100644 index 0000000..f6c6106 --- /dev/null +++ b/build-oxnas820.yaml @@ -0,0 +1,84 @@ +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-git + type: git + steps: + - name: get-openwrt + image: cr.lan/debian-kernel-build-stable + script: | + #!/usr/bin/env bash + echo 'deb-src http://apt-cache.lan/deb.debian.org/debian testing main' > /etc/apt/sources.list.d/src-testing.list + echo 'deb http://apt-cache.lan/deb.debian.org/debian testing main' > /etc/apt/sources.list.d/testing.list + apt update -y + - name: build-openwrt + image: cr.lan/debian-kernel-build-stable + script: | + #!/usr/bin/env bash + + echo $PATH + + echo "res.input.ke...path: $(resources.inputs.openwrt-configs.path)" + echo "O_VERS: $(params.version)" + + ls -altr /usr/src/ + cp -v $(resources.inputs.openwrt-configs.path)/$(params.config) \ + /usr/src/openwrt/.config || exit 1 + cd /usr/src/openwrt + #distcc config + echo "localhost/1,cpp,lzo --randomize distcc-0.distcc,cpp,lzo distcc-1.distcc,cpp,lzo distcc-2.distcc,cpp,lzo distcc-3.distcc,cpp,lzo" >/etc/distcc/hosts + echo "ALL DISTCC HOSTS" + distcc --show-hosts + echo "/ALL DISTCC HOSTS" + ls -latr /usr/lib/distcc-pump/ + #distcc-pump make -j20 bindeb-pkg CC=distcc LOCALVERSION=$(params.localversion) $(params.make_flags) + #make -j4 download world $(params.make_flags) + workspaces: + - name: usr-src + mountPath: /usr/src +--- +apiVersion: tekton.dev/v1beta1 +kind: TaskRun +metadata: + name: build-openwrt-oxnas820 +spec: + taskRef: + name: build-openwrt + params: + - name: config + value: dumont.wks-ATHWIFI + 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